hello

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

code generated by orbit

Index

Constants

View Source
const (
	ErrCodeIAmAnError  = 2
	ErrCodeThisIsATest = 1
)
View Source
const (
	CallIDSayHi = "SayHi"
	CallIDTest  = "Test"
	// StreamIDs
	StreamIDLul           = "Lul"
	StreamIDTimeStream    = "TimeStream"
	StreamIDClockTime     = "ClockTime"
	StreamIDBidirectional = "Bidirectional"
)

CallIDs

Variables

View Source
var (
	ErrIAmAnError  = errors.New("i am an error")
	ErrThisIsATest = errors.New("this is a test")
)
View Source
var ErrClosed = errors.New("closed")

Functions

This section is empty.

Types

type BidirectionalArg added in v1.5.0

type BidirectionalArg struct {
	Question string
}

func (*BidirectionalArg) DecodeMsg added in v1.5.0

func (z *BidirectionalArg) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (BidirectionalArg) EncodeMsg added in v1.5.0

func (z BidirectionalArg) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (BidirectionalArg) MarshalMsg added in v1.5.0

func (z BidirectionalArg) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (BidirectionalArg) Msgsize added in v1.5.0

func (z BidirectionalArg) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BidirectionalArg) UnmarshalMsg added in v1.5.0

func (z *BidirectionalArg) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BidirectionalClientStream added in v1.5.0

type BidirectionalClientStream struct {
	oclient.TypedStreamCloser
	// contains filtered or unexported fields
}

func (*BidirectionalClientStream) Read added in v1.5.0

func (v1 *BidirectionalClientStream) Read() (ret BidirectionalRet, err error)

func (*BidirectionalClientStream) Write added in v1.5.0

func (v1 *BidirectionalClientStream) Write(arg BidirectionalArg) (err error)

type BidirectionalRet added in v1.5.0

type BidirectionalRet struct {
	Answer string
}

func (*BidirectionalRet) DecodeMsg added in v1.5.0

func (z *BidirectionalRet) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (BidirectionalRet) EncodeMsg added in v1.5.0

func (z BidirectionalRet) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (BidirectionalRet) MarshalMsg added in v1.5.0

func (z BidirectionalRet) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (BidirectionalRet) Msgsize added in v1.5.0

func (z BidirectionalRet) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BidirectionalRet) UnmarshalMsg added in v1.5.0

func (z *BidirectionalRet) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BidirectionalServiceStream added in v1.5.0

type BidirectionalServiceStream struct {
	oservice.TypedStreamCloser
	// contains filtered or unexported fields
}

func (*BidirectionalServiceStream) Read added in v1.5.0

func (v1 *BidirectionalServiceStream) Read() (arg BidirectionalArg, err error)

func (*BidirectionalServiceStream) Write added in v1.5.0

func (v1 *BidirectionalServiceStream) Write(ret BidirectionalRet) (err error)

type Client added in v0.3.0

type Client interface {
	closer.Closer
	// Calls
	SayHi(ctx context.Context, arg SayHiArg) (ret SayHiRet, err error)
	Test(ctx context.Context, arg TestArg) (ret TestRet, err error)
	// Streams
	Lul(ctx context.Context) (stream transport.Stream, err error)
	TimeStream(ctx context.Context) (stream *TimeStreamClientStream, err error)
	ClockTime(ctx context.Context) (stream *ClockTimeClientStream, err error)
	Bidirectional(ctx context.Context) (stream *BidirectionalClientStream, err error)
}

func NewClient added in v0.3.0

func NewClient(opts *oclient.Options) (c Client, err error)

type ClockTimeClientStream added in v1.5.0

type ClockTimeClientStream struct {
	oclient.TypedStreamCloser
	// contains filtered or unexported fields
}

func (*ClockTimeClientStream) Read added in v1.5.0

func (v1 *ClockTimeClientStream) Read() (ret ClockTimeRet, err error)

type ClockTimeRet added in v1.4.0

type ClockTimeRet struct {
	Ts time.Time `validate:"required"`
}

func (*ClockTimeRet) DecodeMsg added in v1.4.0

func (z *ClockTimeRet) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (ClockTimeRet) EncodeMsg added in v1.4.0

func (z ClockTimeRet) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (ClockTimeRet) MarshalMsg added in v1.4.0

func (z ClockTimeRet) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (ClockTimeRet) Msgsize added in v1.4.0

func (z ClockTimeRet) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*ClockTimeRet) UnmarshalMsg added in v1.4.0

func (z *ClockTimeRet) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ClockTimeServiceStream added in v1.5.0

type ClockTimeServiceStream struct {
	oservice.TypedStreamCloser
	// contains filtered or unexported fields
}

func (*ClockTimeServiceStream) Write added in v1.5.0

func (v1 *ClockTimeServiceStream) Write(ret ClockTimeRet) (err error)

type Info

type Info struct {
	Name    string `validate:"required,min=1"`
	Age     int    `validate:"required,min=1,max=155"`
	Locale  string `validate:"required,len=5"`
	Address string `validate:"omitempty"`
}

func (*Info) DecodeMsg

func (z *Info) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Info) EncodeMsg

func (z *Info) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Info) MarshalMsg

func (z *Info) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Info) Msgsize

func (z *Info) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Info) UnmarshalMsg

func (z *Info) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SayHiArg added in v0.3.0

type SayHiArg struct {
	Name string `validate:"required,min=1"`
	Ts   time.Time
}

func (*SayHiArg) DecodeMsg added in v0.3.0

func (z *SayHiArg) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (SayHiArg) EncodeMsg added in v0.3.0

func (z SayHiArg) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (SayHiArg) MarshalMsg added in v0.3.0

func (z SayHiArg) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (SayHiArg) Msgsize added in v0.3.0

func (z SayHiArg) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*SayHiArg) UnmarshalMsg added in v0.3.0

func (z *SayHiArg) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SayHiRet added in v1.4.0

type SayHiRet struct {
	Res []int `validate:"required,min=1"`
}

func (*SayHiRet) DecodeMsg added in v1.4.0

func (z *SayHiRet) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*SayHiRet) EncodeMsg added in v1.4.0

func (z *SayHiRet) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*SayHiRet) MarshalMsg added in v1.4.0

func (z *SayHiRet) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*SayHiRet) Msgsize added in v1.4.0

func (z *SayHiRet) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*SayHiRet) UnmarshalMsg added in v1.4.0

func (z *SayHiRet) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Service added in v0.3.0

type Service interface {
	closer.Closer
	Run() error
}

func NewService added in v0.3.0

func NewService(h ServiceHandler, opts *oservice.Options) (s Service, err error)

type ServiceHandler added in v0.3.0

type ServiceHandler interface {
	// Calls
	SayHi(ctx oservice.Context, arg SayHiArg) (ret SayHiRet, err error)
	Test(ctx oservice.Context, arg TestArg) (ret TestRet, err error)
	// Streams
	Lul(ctx oservice.Context, stream transport.Stream)
	TimeStream(ctx oservice.Context, stream *TimeStreamServiceStream) error
	ClockTime(ctx oservice.Context, stream *ClockTimeServiceStream) error
	Bidirectional(ctx oservice.Context, stream *BidirectionalServiceStream) error
}

type TestArg added in v1.4.0

type TestArg struct {
	S string
}

func (*TestArg) DecodeMsg added in v1.4.0

func (z *TestArg) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (TestArg) EncodeMsg added in v1.4.0

func (z TestArg) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (TestArg) MarshalMsg added in v1.4.0

func (z TestArg) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (TestArg) Msgsize added in v1.4.0

func (z TestArg) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*TestArg) UnmarshalMsg added in v1.4.0

func (z *TestArg) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type TestRet added in v0.3.0

type TestRet struct {
	Name string `validate:"required,min=1"`
	Ts   time.Time
}

func (*TestRet) DecodeMsg added in v0.3.0

func (z *TestRet) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (TestRet) EncodeMsg added in v0.3.0

func (z TestRet) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (TestRet) MarshalMsg added in v0.3.0

func (z TestRet) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (TestRet) Msgsize added in v0.3.0

func (z TestRet) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*TestRet) UnmarshalMsg added in v0.3.0

func (z *TestRet) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type TimeStreamClientStream added in v1.5.0

type TimeStreamClientStream struct {
	oclient.TypedStreamCloser
	// contains filtered or unexported fields
}

func (*TimeStreamClientStream) Write added in v1.5.0

func (v1 *TimeStreamClientStream) Write(arg Info) (err error)

type TimeStreamServiceStream added in v1.5.0

type TimeStreamServiceStream struct {
	oservice.TypedStreamCloser
	// contains filtered or unexported fields
}

func (*TimeStreamServiceStream) Read added in v1.5.0

func (v1 *TimeStreamServiceStream) Read() (arg Info, err error)

type Vehicle added in v0.3.0

type Vehicle int
const (
	Car    Vehicle = 1
	Pickup Vehicle = 2
)

func (*Vehicle) DecodeMsg added in v0.3.0

func (z *Vehicle) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (Vehicle) EncodeMsg added in v0.3.0

func (z Vehicle) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Vehicle) MarshalMsg added in v0.3.0

func (z Vehicle) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Vehicle) Msgsize added in v0.3.0

func (z Vehicle) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Vehicle) UnmarshalMsg added in v0.3.0

func (z *Vehicle) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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