blob: 76358f73637975b72c6125430c3c7a9de18cc140 [file] [log] [blame]
// 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"
"v.io/x/ref/services/wspr/internal/principal"
"v.io/x/ref/services/wspr/internal/rpc/server"
)
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 }
// RpcCallOptionUseGranter represents field UseGranter of the RpcCallOption union type.
RpcCallOptionUseGranter struct{ Value GranterHandle }
// __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
UseGranter RpcCallOptionUseGranter
}
}
)
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) {}
func (x RpcCallOptionUseGranter) Index() int { return 2 }
func (x RpcCallOptionUseGranter) Interface() interface{} { return x.Value }
func (x RpcCallOptionUseGranter) Name() string { return "UseGranter" }
func (x RpcCallOptionUseGranter) __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"
}) {
}
type GranterHandle int32
func (GranterHandle) __VDLReflect(struct {
Name string "v.io/x/ref/services/wspr/internal/app.GranterHandle"
}) {
}
type GranterRequest struct {
GranterHandle GranterHandle
Call server.SecurityCall
}
func (GranterRequest) __VDLReflect(struct {
Name string "v.io/x/ref/services/wspr/internal/app.GranterRequest"
}) {
}
type GranterResponse struct {
Blessings principal.BlessingsHandle
Err error
}
func (GranterResponse) __VDLReflect(struct {
Name string "v.io/x/ref/services/wspr/internal/app.GranterResponse"
}) {
}
func init() {
vdl.Register((*RpcRequest)(nil))
vdl.Register((*RpcCallOption)(nil))
vdl.Register((*RpcResponse)(nil))
vdl.Register((*GranterHandle)(nil))
vdl.Register((*GranterRequest)(nil))
vdl.Register((*GranterResponse)(nil))
}