| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // This file was auto-generated by the vanadium vdl tool. |
| // Source: app.vdl |
| |
| // The app package contains the struct that keeps per javascript app state and handles translating |
| // javascript requests to vanadium requests and vice versa. |
| package app |
| |
| import ( |
| // VDL system imports |
| "v.io/v23/vdl" |
| |
| // VDL user imports |
| "time" |
| "v.io/v23/security" |
| time_2 "v.io/v23/vdlroot/time" |
| "v.io/v23/vtrace" |
| ) |
| |
| type RpcRequest struct { |
| Name string |
| Method string |
| NumInArgs int32 |
| NumOutArgs int32 |
| IsStreaming bool |
| Deadline time_2.Deadline |
| TraceRequest vtrace.Request |
| CallOptions []RpcCallOption |
| } |
| |
| func (RpcRequest) __VDLReflect(struct { |
| Name string "v.io/x/ref/services/wspr/internal/app.RpcRequest" |
| }) { |
| } |
| |
| type ( |
| // RpcCallOption represents any single field of the RpcCallOption union type. |
| RpcCallOption interface { |
| // Index returns the field index. |
| Index() int |
| // Interface returns the field value as an interface. |
| Interface() interface{} |
| // Name returns the field name. |
| Name() string |
| // __VDLReflect describes the RpcCallOption union type. |
| __VDLReflect(__RpcCallOptionReflect) |
| } |
| // RpcCallOptionAllowedServersPolicy represents field AllowedServersPolicy of the RpcCallOption union type. |
| RpcCallOptionAllowedServersPolicy struct{ Value []security.BlessingPattern } |
| // RpcCallOptionRetryTimeout represents field RetryTimeout of the RpcCallOption union type. |
| RpcCallOptionRetryTimeout struct{ Value time.Duration } |
| // __RpcCallOptionReflect describes the RpcCallOption union type. |
| __RpcCallOptionReflect struct { |
| Name string "v.io/x/ref/services/wspr/internal/app.RpcCallOption" |
| Type RpcCallOption |
| Union struct { |
| AllowedServersPolicy RpcCallOptionAllowedServersPolicy |
| RetryTimeout RpcCallOptionRetryTimeout |
| } |
| } |
| ) |
| |
| func (x RpcCallOptionAllowedServersPolicy) Index() int { return 0 } |
| func (x RpcCallOptionAllowedServersPolicy) Interface() interface{} { return x.Value } |
| func (x RpcCallOptionAllowedServersPolicy) Name() string { return "AllowedServersPolicy" } |
| func (x RpcCallOptionAllowedServersPolicy) __VDLReflect(__RpcCallOptionReflect) {} |
| |
| func (x RpcCallOptionRetryTimeout) Index() int { return 1 } |
| func (x RpcCallOptionRetryTimeout) Interface() interface{} { return x.Value } |
| func (x RpcCallOptionRetryTimeout) Name() string { return "RetryTimeout" } |
| func (x RpcCallOptionRetryTimeout) __VDLReflect(__RpcCallOptionReflect) {} |
| |
| type RpcResponse struct { |
| OutArgs []*vdl.Value |
| TraceResponse vtrace.Response |
| } |
| |
| func (RpcResponse) __VDLReflect(struct { |
| Name string "v.io/x/ref/services/wspr/internal/app.RpcResponse" |
| }) { |
| } |
| |
| func init() { |
| vdl.Register((*RpcRequest)(nil)) |
| vdl.Register((*RpcCallOption)(nil)) |
| vdl.Register((*RpcResponse)(nil)) |
| } |