Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_api_grpc_proto protoreflect.FileDescriptor
var Greeter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.Greeter", HandlerType: (*GreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Greet", Handler: _Greeter_Greet_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/grpc.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 GreetRequest ¶
type GreetRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*GreetRequest) Descriptor
deprecated
func (*GreetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GreetRequest.ProtoReflect.Descriptor instead.
func (*GreetRequest) GetName ¶
func (x *GreetRequest) GetName() string
func (*GreetRequest) ProtoMessage ¶
func (*GreetRequest) ProtoMessage()
func (*GreetRequest) ProtoReflect ¶
func (x *GreetRequest) ProtoReflect() protoreflect.Message
func (*GreetRequest) Reset ¶
func (x *GreetRequest) Reset()
func (*GreetRequest) String ¶
func (x *GreetRequest) String() string
type GreetResponse ¶
type GreetResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*GreetResponse) Descriptor
deprecated
func (*GreetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GreetResponse.ProtoReflect.Descriptor instead.
func (*GreetResponse) GetMessage ¶
func (x *GreetResponse) GetMessage() string
func (*GreetResponse) ProtoMessage ¶
func (*GreetResponse) ProtoMessage()
func (*GreetResponse) ProtoReflect ¶
func (x *GreetResponse) ProtoReflect() protoreflect.Message
func (*GreetResponse) Reset ¶
func (x *GreetResponse) Reset()
func (*GreetResponse) String ¶
func (x *GreetResponse) String() string
type GreeterClient ¶
type GreeterClient interface {
Greet(ctx context.Context, in *GreetRequest, opts ...grpc.CallOption) (*GreetResponse, 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 { Greet(context.Context, *GreetRequest) (*GreetResponse, error) // contains filtered or unexported methods }
GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer must be embedded to have forward compatible implementations.
func (UnimplementedGreeterServer) Greet ¶
func (UnimplementedGreeterServer) Greet(context.Context, *GreetRequest) (*GreetResponse, 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.