internal

package
v0.0.0-...-e3ab1ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2016 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package internal provides a VDL specification for a service used in the unittest of the access package.

Index

Constants

View Source
const Execute = MyTag("X")
View Source
const Read = MyTag("R")

For this example/unittest, there are three possible values of MyTag, each represented by a single-character string.

View Source
const Write = MyTag("W")

Variables

View Source
var MyObjectDesc rpc.InterfaceDesc = descMyObject

MyObjectDesc describes the MyObject interface.

Functions

This section is empty.

Types

type MyObjectClientMethods

type MyObjectClientMethods interface {
	Get(*context.T, ...rpc.CallOpt) error
	Put(*context.T, ...rpc.CallOpt) error
	Resolve(*context.T, ...rpc.CallOpt) error
	NoTags(*context.T, ...rpc.CallOpt) error // No tags attached to this.
}

MyObjectClientMethods is the client interface containing MyObject methods.

MyObject demonstrates how tags are attached to methods.

type MyObjectClientStub

type MyObjectClientStub interface {
	MyObjectClientMethods
	rpc.UniversalServiceMethods
}

MyObjectClientStub adds universal methods to MyObjectClientMethods.

func MyObjectClient

func MyObjectClient(name string) MyObjectClientStub

MyObjectClient returns a client stub for MyObject.

type MyObjectServerMethods

type MyObjectServerMethods interface {
	Get(*context.T, rpc.ServerCall) error
	Put(*context.T, rpc.ServerCall) error
	Resolve(*context.T, rpc.ServerCall) error
	NoTags(*context.T, rpc.ServerCall) error // No tags attached to this.
}

MyObjectServerMethods is the interface a server writer implements for MyObject.

MyObject demonstrates how tags are attached to methods.

type MyObjectServerStub

type MyObjectServerStub interface {
	MyObjectServerStubMethods
	// Describe the MyObject interfaces.
	Describe__() []rpc.InterfaceDesc
}

MyObjectServerStub adds universal methods to MyObjectServerStubMethods.

func MyObjectServer

func MyObjectServer(impl MyObjectServerMethods) MyObjectServerStub

MyObjectServer returns a server stub for MyObject. It converts an implementation of MyObjectServerMethods into an object that may be used by rpc.Server.

type MyObjectServerStubMethods

type MyObjectServerStubMethods MyObjectServerMethods

MyObjectServerStubMethods is the server interface containing MyObject methods, as expected by rpc.Server. There is no difference between this interface and MyObjectServerMethods since there are no streaming methods.

type MyTag

type MyTag string

Any package can define tags (of arbitrary types) to be attached to methods. This type can be used to index into a Permissions.

func (*MyTag) FillVDLTarget

func (m *MyTag) FillVDLTarget(t vdl.Target, tt *vdl.Type) error

func (*MyTag) MakeVDLTarget

func (m *MyTag) MakeVDLTarget() vdl.Target

func (MyTag) VDLIsZero

func (x MyTag) VDLIsZero() bool

func (*MyTag) VDLRead

func (x *MyTag) VDLRead(dec vdl.Decoder) error

func (MyTag) VDLWrite

func (x MyTag) VDLWrite(enc vdl.Encoder) error

type MyTagTarget

type MyTagTarget struct {
	Value *MyTag
	vdl.TargetBase
}

func (*MyTagTarget) FromString

func (t *MyTagTarget) FromString(src string, tt *vdl.Type) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL