Documentation ¶
Overview ¶
Package testproto is a generated protocol buffer package.
It is generated from these files:
hello.proto
It has these top-level messages:
HelloRequest HelloReply
Index ¶
- Variables
- func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
- type GreeterClient
- type GreeterServer
- type Greeter_StreamHelloClient
- type Greeter_StreamHelloServer
- type HelloReply
- func (*HelloReply) Descriptor() ([]byte, []int)
- func (m *HelloReply) Marshal() (dAtA []byte, err error)
- func (m *HelloReply) MarshalTo(dAtA []byte) (int, error)
- func (*HelloReply) ProtoMessage()
- func (m *HelloReply) Reset()
- func (m *HelloReply) Size() (n int)
- func (m *HelloReply) String() string
- func (m *HelloReply) Unmarshal(dAtA []byte) error
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)
- func (m *HelloRequest) Marshal() (dAtA []byte, err error)
- func (m *HelloRequest) MarshalTo(dAtA []byte) (int, error)
- func (*HelloRequest) ProtoMessage()
- func (m *HelloRequest) Reset()
- func (m *HelloRequest) Size() (n int)
- func (m *HelloRequest) String() string
- func (m *HelloRequest) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthHello = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHello = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterGreeterServer ¶
func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
Types ¶
type GreeterClient ¶
type GreeterClient interface { // Sends a greeting SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) // A bidirectional streaming RPC call recvice HelloRequest return HelloReply StreamHello(ctx context.Context, opts ...grpc.CallOption) (Greeter_StreamHelloClient, error) }
func NewGreeterClient ¶
func NewGreeterClient(cc *grpc.ClientConn) GreeterClient
type GreeterServer ¶
type GreeterServer interface { // Sends a greeting SayHello(context.Context, *HelloRequest) (*HelloReply, error) // A bidirectional streaming RPC call recvice HelloRequest return HelloReply StreamHello(Greeter_StreamHelloServer) error }
type Greeter_StreamHelloClient ¶
type Greeter_StreamHelloClient interface { Send(*HelloRequest) error Recv() (*HelloReply, error) grpc.ClientStream }
type Greeter_StreamHelloServer ¶
type Greeter_StreamHelloServer interface { Send(*HelloReply) error Recv() (*HelloRequest, error) grpc.ServerStream }
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` }
The response message containing the greetings
func (*HelloReply) Descriptor ¶
func (*HelloReply) Descriptor() ([]byte, []int)
func (*HelloReply) Marshal ¶
func (m *HelloReply) Marshal() (dAtA []byte, err error)
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) Reset ¶
func (m *HelloReply) Reset()
func (*HelloReply) Size ¶
func (m *HelloReply) Size() (n int)
func (*HelloReply) String ¶
func (m *HelloReply) String() string
func (*HelloReply) Unmarshal ¶
func (m *HelloReply) Unmarshal(dAtA []byte) error
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" validate:"required"` Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age" validate:"min=0"` }
The request message containing the user's name.
func (*HelloRequest) Descriptor ¶
func (*HelloRequest) Descriptor() ([]byte, []int)
func (*HelloRequest) Marshal ¶
func (m *HelloRequest) Marshal() (dAtA []byte, err error)
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) Reset ¶
func (m *HelloRequest) Reset()
func (*HelloRequest) Size ¶
func (m *HelloRequest) Size() (n int)
func (*HelloRequest) String ¶
func (m *HelloRequest) String() string
func (*HelloRequest) Unmarshal ¶
func (m *HelloRequest) Unmarshal(dAtA []byte) error
Click to show internal directories.
Click to hide internal directories.