Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterMyServiceHTTPServer(s *http.Server, srv MyServiceHTTPServer)
- func RegisterMyServiceServer(s grpc.ServiceRegistrar, srv MyServiceServer)
- 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 MsgInline
- type MyServiceClient
- type MyServiceHTTPClient
- type MyServiceHTTPClientImpl
- type MyServiceHTTPServer
- type MyServiceServer
- type Request
- type Response
- type UnimplementedMyServiceServer
- type UnsafeMyServiceServer
Constants ¶
const (
MyService_Call_FullMethodName = "/helloworld.v1.MyService/Call"
)
const OperationMyServiceCall = "/helloworld.v1.MyService/Call"
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "GREETER_UNSPECIFIED", 1: "USER_NOT_FOUND", } ErrorReason_value = map[string]int32{ "GREETER_UNSPECIFIED": 0, "USER_NOT_FOUND": 1, } )
Enum value maps for ErrorReason.
var File_helloworld_v1_error_reason_proto protoreflect.FileDescriptor
var File_helloworld_v1_greeter_proto protoreflect.FileDescriptor
var MyService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "helloworld.v1.MyService", HandlerType: (*MyServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Call", Handler: _MyService_Call_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "helloworld/v1/greeter.proto", }
MyService_ServiceDesc is the grpc.ServiceDesc for MyService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMyServiceHTTPServer ¶
func RegisterMyServiceHTTPServer(s *http.Server, srv MyServiceHTTPServer)
func RegisterMyServiceServer ¶
func RegisterMyServiceServer(s grpc.ServiceRegistrar, srv MyServiceServer)
Types ¶
type ErrorReason ¶
type ErrorReason int32
const ( ErrorReason_GREETER_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 MsgInline ¶
type MsgInline struct {
// contains filtered or unexported fields
}
func (*MsgInline) Descriptor
deprecated
func (*MsgInline) ProtoMessage ¶
func (*MsgInline) ProtoMessage()
func (*MsgInline) ProtoReflect ¶
func (x *MsgInline) ProtoReflect() protoreflect.Message
type MyServiceClient ¶
type MyServiceClient interface {
Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
MyServiceClient is the client API for MyService 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 NewMyServiceClient ¶
func NewMyServiceClient(cc grpc.ClientConnInterface) MyServiceClient
type MyServiceHTTPClient ¶
type MyServiceHTTPClient interface {
Call(ctx context.Context, req *Request, opts ...http.CallOption) (rsp *Response, err error)
}
func NewMyServiceHTTPClient ¶
func NewMyServiceHTTPClient(client *http.Client) MyServiceHTTPClient
type MyServiceHTTPClientImpl ¶
type MyServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*MyServiceHTTPClientImpl) Call ¶
func (c *MyServiceHTTPClientImpl) Call(ctx context.Context, in *Request, opts ...http.CallOption) (*Response, error)
type MyServiceHTTPServer ¶
type MyServiceServer ¶
type MyServiceServer interface { Call(context.Context, *Request) (*Response, error) // contains filtered or unexported methods }
MyServiceServer is the server API for MyService service. All implementations must embed UnimplementedMyServiceServer for forward compatibility
type Request ¶
type Request struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Msg []*MsgInline `protobuf:"bytes,2,rep,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedMyServiceServer ¶
type UnimplementedMyServiceServer struct { }
UnimplementedMyServiceServer must be embedded to have forward compatible implementations.
type UnsafeMyServiceServer ¶
type UnsafeMyServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMyServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MyServiceServer will result in compilation errors.