pb

package
Version: v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: MIT Imports: 5 Imported by: 37

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

func (m *ConcatReply) GetErr() string

func (*ConcatReply) GetV

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

func (m *ConcatReply) XXX_DiscardUnknown()

func (*ConcatReply) XXX_Marshal

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

func (*ConcatReply) XXX_Merge

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

func (*ConcatReply) XXX_Size

func (m *ConcatReply) XXX_Size() int

func (*ConcatReply) XXX_Unmarshal

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

func (m *ConcatRequest) GetA() string

func (*ConcatRequest) GetB

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

func (m *ConcatRequest) XXX_DiscardUnknown()

func (*ConcatRequest) XXX_Marshal

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

func (*ConcatRequest) XXX_Merge

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

func (*ConcatRequest) XXX_Size

func (m *ConcatRequest) XXX_Size() int

func (*ConcatRequest) XXX_Unmarshal

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

func (m *SumReply) GetErr() string

func (*SumReply) GetV

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

func (m *SumReply) XXX_DiscardUnknown()

func (*SumReply) XXX_Marshal

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

func (*SumReply) XXX_Merge

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

func (*SumReply) XXX_Size

func (m *SumReply) XXX_Size() int

func (*SumReply) XXX_Unmarshal

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

func (m *SumRequest) GetA() int64

func (*SumRequest) GetB

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

func (m *SumRequest) XXX_DiscardUnknown()

func (*SumRequest) XXX_Marshal

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

func (*SumRequest) XXX_Merge

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

func (*SumRequest) XXX_Size

func (m *SumRequest) XXX_Size() int

func (*SumRequest) XXX_Unmarshal

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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto