Documentation ¶
Index ¶
- Variables
- func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
- type GreeterClient
- type GreeterServer
- type Person
- func (*Person) Descriptor() ([]byte, []int)
- func (m *Person) GetEmail() string
- func (m *Person) GetId() uint64
- func (m *Person) GetMobile() string
- func (m *Person) Marshal() (dAtA []byte, err error)
- func (m *Person) MarshalTo(dAtA []byte) (int, error)
- func (m *Person) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Person) ProtoMessage()
- func (m *Person) Reset()
- func (m *Person) Size() (n int)
- func (m *Person) String() string
- func (m *Person) Unmarshal(dAtA []byte) error
- func (m *Person) XXX_DiscardUnknown()
- func (m *Person) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Person) XXX_Merge(src proto.Message)
- func (m *Person) XXX_Size() int
- func (m *Person) XXX_Unmarshal(b []byte) error
- type UnimplementedGreeterServer
- type UnsafeGreeterServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthHelloworld = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHelloworld = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupHelloworld = fmt.Errorf("proto: unexpected end of group") )
var Greeter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Greeter", HandlerType: (*GreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _Greeter_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "09_grpc_validate/proto/helloworld.proto", }
Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGreeterServer ¶
func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
Types ¶
type GreeterClient ¶
type GreeterClient interface {
SayHello(ctx context.Context, in *Person, opts ...grpc.CallOption) (*Person, error)
}
GreeterClient is the client API for Greeter service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewGreeterClient ¶
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient
type GreeterServer ¶
type GreeterServer interface { SayHello(context.Context, *Person) (*Person, error) // contains filtered or unexported methods }
GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility
type Person ¶
type Person struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Mobile string `protobuf:"bytes,3,opt,name=mobile,proto3" json:"mobile,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Person) Descriptor ¶
func (*Person) MarshalToSizedBuffer ¶
func (*Person) ProtoMessage ¶
func (*Person) ProtoMessage()
func (*Person) XXX_DiscardUnknown ¶
func (m *Person) XXX_DiscardUnknown()
func (*Person) XXX_Marshal ¶
func (*Person) XXX_Unmarshal ¶
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer must be embedded to have forward compatible implementations.
type UnsafeGreeterServer ¶
type UnsafeGreeterServer interface {
// contains filtered or unexported methods
}
UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreeterServer will result in compilation errors.