testservice

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_dogmatiq_protean_internal_testservice_service_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Input

type Input struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Input is the message used as inputs to all of the RPC methods in the test service.

func (*Input) Descriptor deprecated

func (*Input) Descriptor() ([]byte, []int)

Deprecated: Use Input.ProtoReflect.Descriptor instead.

func (*Input) GetData

func (x *Input) GetData() string

func (*Input) GetId

func (x *Input) GetId() string

func (*Input) ProtoMessage

func (*Input) ProtoMessage()

func (*Input) ProtoReflect

func (x *Input) ProtoReflect() protoreflect.Message

func (*Input) Reset

func (x *Input) Reset()

func (*Input) String

func (x *Input) String() string

func (*Input) Validate

func (m *Input) Validate() error

Validate returns an error if the message is invalid.

type Output

type Output struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Output is the message used as outputs from all of the RPC methods in the test service.

func (*Output) Descriptor deprecated

func (*Output) Descriptor() ([]byte, []int)

Deprecated: Use Output.ProtoReflect.Descriptor instead.

func (*Output) GetData

func (x *Output) GetData() string

func (*Output) GetId

func (x *Output) GetId() string

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) ProtoReflect

func (x *Output) ProtoReflect() protoreflect.Message

func (*Output) Reset

func (x *Output) Reset()

func (*Output) String

func (x *Output) String() string

func (*Output) Validate

func (m *Output) Validate() error

Validate returns an error if the message is invalid.

type Stub

type Stub struct {
	UnaryFunc               func(context.Context, *Input) (*Output, error)
	ServerStreamFunc        func(context.Context, *Input, chan<- *Output) error
	ClientStreamFunc        func(context.Context, <-chan *Input) (*Output, error)
	BidirectionalStreamFunc func(context.Context, <-chan *Input, chan<- *Output) error
}

Stub is a test implementation of the API interface.

func (*Stub) BidirectionalStream

func (s *Stub) BidirectionalStream(ctx context.Context, in <-chan *Input, out chan<- *Output) error

BidirectionalStream calls s.BidirectionalStreamFunc(ctx, in, out) if s.BidirectionalStreamFunc is not nil. Otherwise, it reads all of the input messages without producing any output messages.

func (*Stub) ClientStream

func (s *Stub) ClientStream(ctx context.Context, in <-chan *Input) (*Output, error)

ClientStream calls s.ClientStreamFunc(ctx, in) if s.ClientStreamFunc is not nil. Otherwise, it reads all the input messages and returns an empty output message.

func (*Stub) ServerStream

func (s *Stub) ServerStream(ctx context.Context, in *Input, out chan<- *Output) error

ServerStream calls s.ServerStreamFunc(ctx, in, out) if s.ServerStreamFunc is not nil. Otherwise, it returns nil without producing any output messages.

func (*Stub) Unary

func (s *Stub) Unary(ctx context.Context, in *Input) (*Output, error)

Unary calls s.UnaryFunc(ctx, in) if s.UnaryFunc is not nil. Otherwise, it returns a zero-value output message.

Jump to

Keyboard shortcuts

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