Documentation ¶
Index ¶
- Variables
- func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
- type Address
- func (m *Address) CloneMessageVT() proto.Message
- func (m *Address) CloneVT() *Address
- func (*Address) Descriptor() ([]byte, []int)deprecated
- func (this *Address) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Address) EqualVT(that *Address) bool
- func (x *Address) GetCity() string
- func (x *Address) GetState() string
- func (x *Address) GetStreet() string
- func (x *Address) GetZipcode() int32
- func (m *Address) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Address) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *Address) MarshalToVT(dAtA []byte) (int, error)
- func (m *Address) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *Address) MarshalVT() (dAtA []byte, err error)
- func (m *Address) MarshalVTStrict() (dAtA []byte, err error)
- func (*Address) ProtoMessage()
- func (x *Address) ProtoReflect() protoreflect.Message
- func (x *Address) Reset()
- func (m *Address) SizeVT() (n int)
- func (x *Address) String() string
- func (m *Address) UnmarshalVT(dAtA []byte) error
- type GreeterClient
- type GreeterServer
- type HelloReply
- func (m *HelloReply) CloneMessageVT() proto.Message
- func (m *HelloReply) CloneVT() *HelloReply
- func (*HelloReply) Descriptor() ([]byte, []int)deprecated
- func (this *HelloReply) EqualMessageVT(thatMsg proto.Message) bool
- func (this *HelloReply) EqualVT(that *HelloReply) bool
- func (x *HelloReply) GetMessage() string
- func (m *HelloReply) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *HelloReply) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *HelloReply) MarshalToVT(dAtA []byte) (int, error)
- func (m *HelloReply) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *HelloReply) MarshalVT() (dAtA []byte, err error)
- func (m *HelloReply) MarshalVTStrict() (dAtA []byte, err error)
- func (*HelloReply) ProtoMessage()
- func (x *HelloReply) ProtoReflect() protoreflect.Message
- func (x *HelloReply) Reset()
- func (m *HelloReply) SizeVT() (n int)
- func (x *HelloReply) String() string
- func (m *HelloReply) UnmarshalVT(dAtA []byte) error
- type HelloRequest
- func (m *HelloRequest) CloneMessageVT() proto.Message
- func (m *HelloRequest) CloneVT() *HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)deprecated
- func (this *HelloRequest) EqualMessageVT(thatMsg proto.Message) bool
- func (this *HelloRequest) EqualVT(that *HelloRequest) bool
- func (x *HelloRequest) GetAddress() *Address
- func (x *HelloRequest) GetAge() int32
- func (x *HelloRequest) GetName() string
- func (m *HelloRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *HelloRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *HelloRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *HelloRequest) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *HelloRequest) MarshalVT() (dAtA []byte, err error)
- func (m *HelloRequest) MarshalVTStrict() (dAtA []byte, err error)
- func (*HelloRequest) ProtoMessage()
- func (x *HelloRequest) ProtoReflect() protoreflect.Message
- func (x *HelloRequest) Reset()
- func (m *HelloRequest) SizeVT() (n int)
- func (x *HelloRequest) String() string
- func (m *HelloRequest) UnmarshalVT(dAtA []byte) error
- type UnimplementedGreeterServer
- type UnsafeGreeterServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflow = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") )
var File_github_com_element_of_surprise_examples_testing_servwithclients_proto_greeter_proto_server_proto protoreflect.FileDescriptor
var Greeter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "greeter.Greeter", HandlerType: (*GreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _Greeter_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/element-of-surprise/examples/testing/servwithclients/proto/greeter/proto/server.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 Address ¶
type Address struct { Street string `protobuf:"bytes,1,opt,name=street,proto3" json:"street,omitempty"` City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` Zipcode int32 `protobuf:"varint,4,opt,name=zipcode,proto3" json:"zipcode,omitempty"` // contains filtered or unexported fields }
func (*Address) CloneMessageVT ¶
func (*Address) Descriptor
deprecated
func (*Address) GetZipcode ¶
func (*Address) MarshalToSizedBufferVT ¶
func (*Address) MarshalToSizedBufferVTStrict ¶
func (*Address) MarshalVTStrict ¶
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
func (*Address) ProtoReflect ¶
func (x *Address) ProtoReflect() protoreflect.Message
func (*Address) UnmarshalVT ¶
type GreeterClient ¶
type GreeterClient interface { // Sends a greeting SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, 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 { // Sends a greeting SayHello(context.Context, *HelloRequest) (*HelloReply, error) // contains filtered or unexported methods }
GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*HelloReply) CloneMessageVT ¶
func (m *HelloReply) CloneMessageVT() proto.Message
func (*HelloReply) CloneVT ¶
func (m *HelloReply) CloneVT() *HelloReply
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) EqualMessageVT ¶
func (this *HelloReply) EqualMessageVT(thatMsg proto.Message) bool
func (*HelloReply) EqualVT ¶
func (this *HelloReply) EqualVT(that *HelloReply) bool
func (*HelloReply) GetMessage ¶
func (x *HelloReply) GetMessage() string
func (*HelloReply) MarshalToSizedBufferVT ¶
func (m *HelloReply) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*HelloReply) MarshalToSizedBufferVTStrict ¶
func (m *HelloReply) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
func (*HelloReply) MarshalToVT ¶
func (m *HelloReply) MarshalToVT(dAtA []byte) (int, error)
func (*HelloReply) MarshalToVTStrict ¶
func (m *HelloReply) MarshalToVTStrict(dAtA []byte) (int, error)
func (*HelloReply) MarshalVT ¶
func (m *HelloReply) MarshalVT() (dAtA []byte, err error)
func (*HelloReply) MarshalVTStrict ¶
func (m *HelloReply) MarshalVTStrict() (dAtA []byte, err error)
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) ProtoReflect ¶
func (x *HelloReply) ProtoReflect() protoreflect.Message
func (*HelloReply) Reset ¶
func (x *HelloReply) Reset()
func (*HelloReply) SizeVT ¶
func (m *HelloReply) SizeVT() (n int)
func (*HelloReply) String ¶
func (x *HelloReply) String() string
func (*HelloReply) UnmarshalVT ¶
func (m *HelloReply) UnmarshalVT(dAtA []byte) error
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` Address *Address `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*HelloRequest) CloneMessageVT ¶
func (m *HelloRequest) CloneMessageVT() proto.Message
func (*HelloRequest) CloneVT ¶
func (m *HelloRequest) CloneVT() *HelloRequest
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) EqualMessageVT ¶
func (this *HelloRequest) EqualMessageVT(thatMsg proto.Message) bool
func (*HelloRequest) EqualVT ¶
func (this *HelloRequest) EqualVT(that *HelloRequest) bool
func (*HelloRequest) GetAddress ¶
func (x *HelloRequest) GetAddress() *Address
func (*HelloRequest) GetAge ¶
func (x *HelloRequest) GetAge() int32
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
func (*HelloRequest) MarshalToSizedBufferVT ¶
func (m *HelloRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*HelloRequest) MarshalToSizedBufferVTStrict ¶
func (m *HelloRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
func (*HelloRequest) MarshalToVT ¶
func (m *HelloRequest) MarshalToVT(dAtA []byte) (int, error)
func (*HelloRequest) MarshalToVTStrict ¶
func (m *HelloRequest) MarshalToVTStrict(dAtA []byte) (int, error)
func (*HelloRequest) MarshalVT ¶
func (m *HelloRequest) MarshalVT() (dAtA []byte, err error)
func (*HelloRequest) MarshalVTStrict ¶
func (m *HelloRequest) MarshalVTStrict() (dAtA []byte, err error)
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) SizeVT ¶
func (m *HelloRequest) SizeVT() (n int)
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
func (*HelloRequest) UnmarshalVT ¶
func (m *HelloRequest) UnmarshalVT(dAtA []byte) error
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer must be embedded to have forward compatible implementations.
func (UnimplementedGreeterServer) SayHello ¶
func (UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error)
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.