Documentation ¶
Index ¶
- Variables
- func RegisterGreeterHTTPServer(s *http.Server, srv GreeterHTTPServer)
- func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type GreeterClient
- type GreeterHTTPClient
- type GreeterHTTPClientImpl
- type GreeterHTTPServer
- type GreeterSayHelloRequest
- func (*GreeterSayHelloRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GreeterSayHelloRequest) GetDevice() string
- func (x *GreeterSayHelloRequest) GetFrom() string
- func (x *GreeterSayHelloRequest) GetName() string
- func (*GreeterSayHelloRequest) ProtoMessage()
- func (x *GreeterSayHelloRequest) ProtoReflect() protoreflect.Message
- func (x *GreeterSayHelloRequest) Reset()
- func (x *GreeterSayHelloRequest) String() string
- type GreeterServer
- type GreeterV1HelloReply
- func (*GreeterV1HelloReply) Descriptor() ([]byte, []int)deprecated
- func (x *GreeterV1HelloReply) GetMessage() string
- func (*GreeterV1HelloReply) ProtoMessage()
- func (x *GreeterV1HelloReply) ProtoReflect() protoreflect.Message
- func (x *GreeterV1HelloReply) Reset()
- func (x *GreeterV1HelloReply) String() string
- type UnimplementedGreeterServer
- type UnsafeGreeterServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "GEETER_UNSPECIFIED", 1: "USER_NOT_FOUND", } ErrorReason_value = map[string]int32{ "GEETER_UNSPECIFIED": 0, "USER_NOT_FOUND": 1, } )
Enum value maps for ErrorReason.
var File_api_greeter_v1_greeter_proto protoreflect.FileDescriptor
var File_greeter_v1_error_reason_proto protoreflect.FileDescriptor
var Greeter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "greeter.Greeter", HandlerType: (*GreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GreeterSayHello", Handler: _Greeter_GreeterSayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/greeter/v1/greeter.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 RegisterGreeterHTTPServer ¶
func RegisterGreeterHTTPServer(s *http.Server, srv GreeterHTTPServer)
func RegisterGreeterServer ¶
func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
Types ¶
type ErrorReason ¶
type ErrorReason int32
const ( ErrorReason_GEETER_UNSPECIFIED ErrorReason = 0 ErrorReason_USER_NOT_FOUND ErrorReason = 1 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType
type GreeterClient ¶
type GreeterClient interface {
GreeterSayHello(ctx context.Context, in *GreeterSayHelloRequest, opts ...grpc.CallOption) (*GreeterV1HelloReply, 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 GreeterHTTPClient ¶
type GreeterHTTPClient interface {
GreeterSayHello(ctx context.Context, req *GreeterSayHelloRequest, opts ...http.CallOption) (rsp *GreeterV1HelloReply, err error)
}
func NewGreeterHTTPClient ¶
func NewGreeterHTTPClient(client *http.Client) GreeterHTTPClient
type GreeterHTTPClientImpl ¶
type GreeterHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*GreeterHTTPClientImpl) GreeterSayHello ¶
func (c *GreeterHTTPClientImpl) GreeterSayHello(ctx context.Context, in *GreeterSayHelloRequest, opts ...http.CallOption) (*GreeterV1HelloReply, error)
type GreeterHTTPServer ¶
type GreeterHTTPServer interface {
GreeterSayHello(context.Context, *GreeterSayHelloRequest) (*GreeterV1HelloReply, error)
}
type GreeterSayHelloRequest ¶
type GreeterSayHelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` Device string `protobuf:"bytes,3,opt,name=device,proto3" json:"device,omitempty"` // contains filtered or unexported fields }
Greeter_SayHelloParameters holds parameters to Greeter_SayHello
func (*GreeterSayHelloRequest) Descriptor
deprecated
func (*GreeterSayHelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use GreeterSayHelloRequest.ProtoReflect.Descriptor instead.
func (*GreeterSayHelloRequest) GetDevice ¶
func (x *GreeterSayHelloRequest) GetDevice() string
func (*GreeterSayHelloRequest) GetFrom ¶
func (x *GreeterSayHelloRequest) GetFrom() string
func (*GreeterSayHelloRequest) GetName ¶
func (x *GreeterSayHelloRequest) GetName() string
func (*GreeterSayHelloRequest) ProtoMessage ¶
func (*GreeterSayHelloRequest) ProtoMessage()
func (*GreeterSayHelloRequest) ProtoReflect ¶
func (x *GreeterSayHelloRequest) ProtoReflect() protoreflect.Message
func (*GreeterSayHelloRequest) Reset ¶
func (x *GreeterSayHelloRequest) Reset()
func (*GreeterSayHelloRequest) String ¶
func (x *GreeterSayHelloRequest) String() string
type GreeterServer ¶
type GreeterServer interface { GreeterSayHello(context.Context, *GreeterSayHelloRequest) (*GreeterV1HelloReply, error) // contains filtered or unexported methods }
GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility
type GreeterV1HelloReply ¶
type GreeterV1HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*GreeterV1HelloReply) Descriptor
deprecated
func (*GreeterV1HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use GreeterV1HelloReply.ProtoReflect.Descriptor instead.
func (*GreeterV1HelloReply) GetMessage ¶
func (x *GreeterV1HelloReply) GetMessage() string
func (*GreeterV1HelloReply) ProtoMessage ¶
func (*GreeterV1HelloReply) ProtoMessage()
func (*GreeterV1HelloReply) ProtoReflect ¶
func (x *GreeterV1HelloReply) ProtoReflect() protoreflect.Message
func (*GreeterV1HelloReply) Reset ¶
func (x *GreeterV1HelloReply) Reset()
func (*GreeterV1HelloReply) String ¶
func (x *GreeterV1HelloReply) String() string
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer must be embedded to have forward compatible implementations.
func (UnimplementedGreeterServer) GreeterSayHello ¶
func (UnimplementedGreeterServer) GreeterSayHello(context.Context, *GreeterSayHelloRequest) (*GreeterV1HelloReply, 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.