pb

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAddServer

func RegisterAddServer(s *grpc.Server, srv AddServer)

Types

type AddClient

type AddClient interface {
	// Sums two integers.
	Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumReply, error)
	// Concatenates two strings
	Concat(ctx context.Context, in *ConcatRequest, opts ...grpc.CallOption) (*ConcatReply, error)
}

AddClient is the client API for Add service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAddClient

func NewAddClient(cc *grpc.ClientConn) AddClient

type AddServer

type AddServer interface {
	// Sums two integers.
	Sum(context.Context, *SumRequest) (*SumReply, error)
	// Concatenates two strings
	Concat(context.Context, *ConcatRequest) (*ConcatReply, error)
}

AddServer is the server API for Add service.

type ConcatReply

type ConcatReply struct {
	V                    string   `protobuf:"bytes,1,opt,name=v,proto3" json:"v,omitempty"`
	Err                  string   `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The Concat response contains the result of the concatenation.

func (*ConcatReply) Descriptor

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

func (*ConcatReply) GetErr added in v0.6.0

func (m *ConcatReply) GetErr() string

func (*ConcatReply) GetV added in v0.6.0

func (m *ConcatReply) GetV() string

func (*ConcatReply) ProtoMessage

func (*ConcatReply) ProtoMessage()

func (*ConcatReply) Reset

func (m *ConcatReply) Reset()

func (*ConcatReply) String

func (m *ConcatReply) String() string

func (*ConcatReply) XXX_DiscardUnknown added in v0.9.0

func (m *ConcatReply) XXX_DiscardUnknown()

func (*ConcatReply) XXX_Marshal added in v0.9.0

func (m *ConcatReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConcatReply) XXX_Merge added in v0.9.0

func (m *ConcatReply) XXX_Merge(src proto.Message)

func (*ConcatReply) XXX_Size added in v0.9.0

func (m *ConcatReply) XXX_Size() int

func (*ConcatReply) XXX_Unmarshal added in v0.9.0

func (m *ConcatReply) XXX_Unmarshal(b []byte) error

type ConcatRequest

type ConcatRequest struct {
	A                    string   `protobuf:"bytes,1,opt,name=a,proto3" json:"a,omitempty"`
	B                    string   `protobuf:"bytes,2,opt,name=b,proto3" json:"b,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The Concat request contains two parameters.

func (*ConcatRequest) Descriptor

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

func (*ConcatRequest) GetA added in v0.6.0

func (m *ConcatRequest) GetA() string

func (*ConcatRequest) GetB added in v0.6.0

func (m *ConcatRequest) GetB() string

func (*ConcatRequest) ProtoMessage

func (*ConcatRequest) ProtoMessage()

func (*ConcatRequest) Reset

func (m *ConcatRequest) Reset()

func (*ConcatRequest) String

func (m *ConcatRequest) String() string

func (*ConcatRequest) XXX_DiscardUnknown added in v0.9.0

func (m *ConcatRequest) XXX_DiscardUnknown()

func (*ConcatRequest) XXX_Marshal added in v0.9.0

func (m *ConcatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConcatRequest) XXX_Merge added in v0.9.0

func (m *ConcatRequest) XXX_Merge(src proto.Message)

func (*ConcatRequest) XXX_Size added in v0.9.0

func (m *ConcatRequest) XXX_Size() int

func (*ConcatRequest) XXX_Unmarshal added in v0.9.0

func (m *ConcatRequest) XXX_Unmarshal(b []byte) error

type SumReply

type SumReply struct {
	V                    int64    `protobuf:"varint,1,opt,name=v,proto3" json:"v,omitempty"`
	Err                  string   `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The sum response contains the result of the calculation.

func (*SumReply) Descriptor

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

func (*SumReply) GetErr added in v0.6.0

func (m *SumReply) GetErr() string

func (*SumReply) GetV added in v0.6.0

func (m *SumReply) GetV() int64

func (*SumReply) ProtoMessage

func (*SumReply) ProtoMessage()

func (*SumReply) Reset

func (m *SumReply) Reset()

func (*SumReply) String

func (m *SumReply) String() string

func (*SumReply) XXX_DiscardUnknown added in v0.9.0

func (m *SumReply) XXX_DiscardUnknown()

func (*SumReply) XXX_Marshal added in v0.9.0

func (m *SumReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SumReply) XXX_Merge added in v0.9.0

func (m *SumReply) XXX_Merge(src proto.Message)

func (*SumReply) XXX_Size added in v0.9.0

func (m *SumReply) XXX_Size() int

func (*SumReply) XXX_Unmarshal added in v0.9.0

func (m *SumReply) XXX_Unmarshal(b []byte) error

type SumRequest

type SumRequest struct {
	A                    int64    `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
	B                    int64    `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The sum request contains two parameters.

func (*SumRequest) Descriptor

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

func (*SumRequest) GetA added in v0.6.0

func (m *SumRequest) GetA() int64

func (*SumRequest) GetB added in v0.6.0

func (m *SumRequest) GetB() int64

func (*SumRequest) ProtoMessage

func (*SumRequest) ProtoMessage()

func (*SumRequest) Reset

func (m *SumRequest) Reset()

func (*SumRequest) String

func (m *SumRequest) String() string

func (*SumRequest) XXX_DiscardUnknown added in v0.9.0

func (m *SumRequest) XXX_DiscardUnknown()

func (*SumRequest) XXX_Marshal added in v0.9.0

func (m *SumRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SumRequest) XXX_Merge added in v0.9.0

func (m *SumRequest) XXX_Merge(src proto.Message)

func (*SumRequest) XXX_Size added in v0.9.0

func (m *SumRequest) XXX_Size() int

func (*SumRequest) XXX_Unmarshal added in v0.9.0

func (m *SumRequest) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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