Documentation ¶
Index ¶
- Variables
- func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer)
- func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
- func RegisterTestImportServer(s grpc.ServiceRegistrar, srv TestImportServer)
- type EchoMsg
- type EchoServiceClient
- type EchoServiceServer
- type ErrorDetail
- func (*ErrorDetail) Descriptor() ([]byte, []int)deprecated
- func (x *ErrorDetail) GetCode() int64
- func (x *ErrorDetail) GetMessage() string
- func (x *ErrorDetail) GetType() string
- func (*ErrorDetail) ProtoMessage()
- func (x *ErrorDetail) ProtoReflect() protoreflect.Message
- func (x *ErrorDetail) Reset()
- func (x *ErrorDetail) String() string
- type Gender
- type GreeterClient
- type GreeterServer
- type Greeter_SayHelloBidirectionalStreamClient
- type Greeter_SayHelloBidirectionalStreamServer
- type Greeter_SayHelloClientStreamClient
- type Greeter_SayHelloClientStreamServer
- type Greeter_SayHelloServerStreamClient
- type Greeter_SayHelloServerStreamServer
- type HelloReply
- func (*HelloReply) Descriptor() ([]byte, []int)deprecated
- func (x *HelloReply) GetGender() Gender
- func (x *HelloReply) GetItems() []string
- func (x *HelloReply) GetMessage() string
- func (*HelloReply) ProtoMessage()
- func (x *HelloReply) ProtoReflect() protoreflect.Message
- func (x *HelloReply) Reset()
- func (x *HelloReply) String() string
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HelloRequest) GetGender() Gender
- func (x *HelloRequest) GetItems() []string
- func (x *HelloRequest) GetName() string
- func (x *HelloRequest) GetPerson() *Person
- func (*HelloRequest) ProtoMessage()
- func (x *HelloRequest) ProtoReflect() protoreflect.Message
- func (x *HelloRequest) Reset()
- func (x *HelloRequest) String() string
- type Person
- type PlusReply
- type PlusRequest
- type Request
- type Response
- type TestImportClient
- type TestImportServer
- type UnimplementedEchoServiceServer
- type UnimplementedGreeterServer
- func (UnimplementedGreeterServer) GetErrResp(context.Context, *HelloRequest) (*HelloReply, error)
- func (UnimplementedGreeterServer) Plus(context.Context, *PlusRequest) (*PlusReply, error)
- func (UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error)
- func (UnimplementedGreeterServer) SayHelloAfterDelay(context.Context, *HelloRequest) (*HelloReply, error)
- func (UnimplementedGreeterServer) SayHelloBidirectionalStream(Greeter_SayHelloBidirectionalStreamServer) error
- func (UnimplementedGreeterServer) SayHelloClientStream(Greeter_SayHelloClientStreamServer) error
- func (UnimplementedGreeterServer) SayHelloServerStream(*HelloRequest, Greeter_SayHelloServerStreamServer) error
- type UnimplementedTestImportServer
- type UnsafeEchoServiceServer
- type UnsafeGreeterServer
- type UnsafeTestImportServer
- type User
Constants ¶
This section is empty.
Variables ¶
var ( Gender_name = map[int32]string{ 0: "GENDER_UNKNOWN", 1: "GENDER_MALE", 2: "GENDER_FEMALE", } Gender_value = map[string]int32{ "GENDER_UNKNOWN": 0, "GENDER_MALE": 1, "GENDER_FEMALE": 2, } )
Enum value maps for Gender.
var EchoService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "echo.EchoService", HandlerType: (*EchoServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Echo", Handler: _EchoService_Echo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/echo.proto", }
EchoService_ServiceDesc is the grpc.ServiceDesc for EchoService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_echo_proto protoreflect.FileDescriptor
var File_proto_helloworld_proto protoreflect.FileDescriptor
var File_proto_import_proto protoreflect.FileDescriptor
var File_proto_src_proto protoreflect.FileDescriptor
var Greeter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "helloworld.Greeter", HandlerType: (*GreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _Greeter_SayHello_Handler, }, { MethodName: "GetErrResp", Handler: _Greeter_GetErrResp_Handler, }, { MethodName: "Plus", Handler: _Greeter_Plus_Handler, }, { MethodName: "SayHelloAfterDelay", Handler: _Greeter_SayHelloAfterDelay_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "SayHelloServerStream", Handler: _Greeter_SayHelloServerStream_Handler, ServerStreams: true, }, { StreamName: "SayHelloClientStream", Handler: _Greeter_SayHelloClientStream_Handler, ClientStreams: true, }, { StreamName: "SayHelloBidirectionalStream", Handler: _Greeter_SayHelloBidirectionalStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "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)
var TestImport_ServiceDesc = grpc.ServiceDesc{ ServiceName: "helloworld.TestImport", HandlerType: (*TestImportServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Run", Handler: _TestImport_Run_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/src.proto", }
TestImport_ServiceDesc is the grpc.ServiceDesc for TestImport service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterEchoServiceServer ¶
func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer)
func RegisterGreeterServer ¶
func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
func RegisterTestImportServer ¶
func RegisterTestImportServer(s grpc.ServiceRegistrar, srv TestImportServer)
Types ¶
type EchoMsg ¶
type EchoMsg struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*EchoMsg) Descriptor
deprecated
func (*EchoMsg) ProtoMessage ¶
func (*EchoMsg) ProtoMessage()
func (*EchoMsg) ProtoReflect ¶
func (x *EchoMsg) ProtoReflect() protoreflect.Message
type EchoServiceClient ¶
type EchoServiceClient interface {
Echo(ctx context.Context, in *EchoMsg, opts ...grpc.CallOption) (*EchoMsg, error)
}
EchoServiceClient is the client API for EchoService 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 NewEchoServiceClient ¶
func NewEchoServiceClient(cc grpc.ClientConnInterface) EchoServiceClient
type EchoServiceServer ¶
type EchoServiceServer interface { Echo(context.Context, *EchoMsg) (*EchoMsg, error) // contains filtered or unexported methods }
EchoServiceServer is the server API for EchoService service. All implementations must embed UnimplementedEchoServiceServer for forward compatibility
type ErrorDetail ¶
type ErrorDetail struct { Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*ErrorDetail) Descriptor
deprecated
func (*ErrorDetail) Descriptor() ([]byte, []int)
Deprecated: Use ErrorDetail.ProtoReflect.Descriptor instead.
func (*ErrorDetail) GetCode ¶
func (x *ErrorDetail) GetCode() int64
func (*ErrorDetail) GetMessage ¶
func (x *ErrorDetail) GetMessage() string
func (*ErrorDetail) GetType ¶
func (x *ErrorDetail) GetType() string
func (*ErrorDetail) ProtoMessage ¶
func (*ErrorDetail) ProtoMessage()
func (*ErrorDetail) ProtoReflect ¶
func (x *ErrorDetail) ProtoReflect() protoreflect.Message
func (*ErrorDetail) Reset ¶
func (x *ErrorDetail) Reset()
func (*ErrorDetail) String ¶
func (x *ErrorDetail) String() string
type Gender ¶
type Gender int32
func (Gender) Descriptor ¶
func (Gender) Descriptor() protoreflect.EnumDescriptor
func (Gender) EnumDescriptor
deprecated
func (Gender) Number ¶
func (x Gender) Number() protoreflect.EnumNumber
func (Gender) Type ¶
func (Gender) Type() protoreflect.EnumType
type GreeterClient ¶
type GreeterClient interface { // Unary RPC. SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) GetErrResp(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) Plus(ctx context.Context, in *PlusRequest, opts ...grpc.CallOption) (*PlusReply, error) SayHelloAfterDelay(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) // Server side streaming. SayHelloServerStream(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (Greeter_SayHelloServerStreamClient, error) // Client side streaming. SayHelloClientStream(ctx context.Context, opts ...grpc.CallOption) (Greeter_SayHelloClientStreamClient, error) // Bidirectional streaming. SayHelloBidirectionalStream(ctx context.Context, opts ...grpc.CallOption) (Greeter_SayHelloBidirectionalStreamClient, 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 { // Unary RPC. SayHello(context.Context, *HelloRequest) (*HelloReply, error) GetErrResp(context.Context, *HelloRequest) (*HelloReply, error) Plus(context.Context, *PlusRequest) (*PlusReply, error) SayHelloAfterDelay(context.Context, *HelloRequest) (*HelloReply, error) // Server side streaming. SayHelloServerStream(*HelloRequest, Greeter_SayHelloServerStreamServer) error // Client side streaming. SayHelloClientStream(Greeter_SayHelloClientStreamServer) error // Bidirectional streaming. SayHelloBidirectionalStream(Greeter_SayHelloBidirectionalStreamServer) error // contains filtered or unexported methods }
GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility
type Greeter_SayHelloBidirectionalStreamClient ¶
type Greeter_SayHelloBidirectionalStreamClient interface { Send(*HelloRequest) error Recv() (*HelloReply, error) grpc.ClientStream }
type Greeter_SayHelloBidirectionalStreamServer ¶
type Greeter_SayHelloBidirectionalStreamServer interface { Send(*HelloReply) error Recv() (*HelloRequest, error) grpc.ServerStream }
type Greeter_SayHelloClientStreamClient ¶
type Greeter_SayHelloClientStreamClient interface { Send(*HelloRequest) error CloseAndRecv() (*HelloReply, error) grpc.ClientStream }
type Greeter_SayHelloClientStreamServer ¶
type Greeter_SayHelloClientStreamServer interface { SendAndClose(*HelloReply) error Recv() (*HelloRequest, error) grpc.ServerStream }
type Greeter_SayHelloServerStreamClient ¶
type Greeter_SayHelloServerStreamClient interface { Recv() (*HelloReply, error) grpc.ClientStream }
type Greeter_SayHelloServerStreamServer ¶
type Greeter_SayHelloServerStreamServer interface { Send(*HelloReply) error grpc.ServerStream }
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Items []string `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` Gender Gender `protobuf:"varint,3,opt,name=gender,proto3,enum=helloworld.Gender" json:"gender,omitempty"` // contains filtered or unexported fields }
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetGender ¶
func (x *HelloReply) GetGender() Gender
func (*HelloReply) GetItems ¶
func (x *HelloReply) GetItems() []string
func (*HelloReply) GetMessage ¶
func (x *HelloReply) GetMessage() string
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) ProtoReflect ¶
func (x *HelloReply) ProtoReflect() protoreflect.Message
func (*HelloReply) Reset ¶
func (x *HelloReply) Reset()
func (*HelloReply) String ¶
func (x *HelloReply) String() string
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Items []string `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` Gender Gender `protobuf:"varint,3,opt,name=gender,proto3,enum=helloworld.Gender" json:"gender,omitempty"` Person *Person `protobuf:"bytes,4,opt,name=person,proto3" json:"person,omitempty"` // contains filtered or unexported fields }
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetGender ¶
func (x *HelloRequest) GetGender() Gender
func (*HelloRequest) GetItems ¶
func (x *HelloRequest) GetItems() []string
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
func (*HelloRequest) GetPerson ¶
func (x *HelloRequest) GetPerson() *Person
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type Person ¶
type Person 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"` // contains filtered or unexported fields }
func (*Person) Descriptor
deprecated
func (*Person) ProtoMessage ¶
func (*Person) ProtoMessage()
func (*Person) ProtoReflect ¶
func (x *Person) ProtoReflect() protoreflect.Message
type PlusReply ¶
type PlusReply struct { Result int64 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*PlusReply) Descriptor
deprecated
func (*PlusReply) ProtoMessage ¶
func (*PlusReply) ProtoMessage()
func (*PlusReply) ProtoReflect ¶
func (x *PlusReply) ProtoReflect() protoreflect.Message
type PlusRequest ¶
type PlusRequest struct { A int64 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` B int64 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"` // contains filtered or unexported fields }
func (*PlusRequest) Descriptor
deprecated
func (*PlusRequest) Descriptor() ([]byte, []int)
Deprecated: Use PlusRequest.ProtoReflect.Descriptor instead.
func (*PlusRequest) GetA ¶
func (x *PlusRequest) GetA() int64
func (*PlusRequest) GetB ¶
func (x *PlusRequest) GetB() int64
func (*PlusRequest) ProtoMessage ¶
func (*PlusRequest) ProtoMessage()
func (*PlusRequest) ProtoReflect ¶
func (x *PlusRequest) ProtoReflect() protoreflect.Message
func (*PlusRequest) Reset ¶
func (x *PlusRequest) Reset()
func (*PlusRequest) String ¶
func (x *PlusRequest) String() string
type Request ¶
type Request struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,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 { Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` // 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 TestImportClient ¶
type TestImportClient interface {
Run(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
TestImportClient is the client API for TestImport 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 NewTestImportClient ¶
func NewTestImportClient(cc grpc.ClientConnInterface) TestImportClient
type TestImportServer ¶
type TestImportServer interface { Run(context.Context, *Request) (*Response, error) // contains filtered or unexported methods }
TestImportServer is the server API for TestImport service. All implementations must embed UnimplementedTestImportServer for forward compatibility
type UnimplementedEchoServiceServer ¶
type UnimplementedEchoServiceServer struct { }
UnimplementedEchoServiceServer must be embedded to have forward compatible implementations.
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer must be embedded to have forward compatible implementations.
func (UnimplementedGreeterServer) GetErrResp ¶
func (UnimplementedGreeterServer) GetErrResp(context.Context, *HelloRequest) (*HelloReply, error)
func (UnimplementedGreeterServer) Plus ¶
func (UnimplementedGreeterServer) Plus(context.Context, *PlusRequest) (*PlusReply, error)
func (UnimplementedGreeterServer) SayHello ¶
func (UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error)
func (UnimplementedGreeterServer) SayHelloAfterDelay ¶
func (UnimplementedGreeterServer) SayHelloAfterDelay(context.Context, *HelloRequest) (*HelloReply, error)
func (UnimplementedGreeterServer) SayHelloBidirectionalStream ¶
func (UnimplementedGreeterServer) SayHelloBidirectionalStream(Greeter_SayHelloBidirectionalStreamServer) error
func (UnimplementedGreeterServer) SayHelloClientStream ¶
func (UnimplementedGreeterServer) SayHelloClientStream(Greeter_SayHelloClientStreamServer) error
func (UnimplementedGreeterServer) SayHelloServerStream ¶
func (UnimplementedGreeterServer) SayHelloServerStream(*HelloRequest, Greeter_SayHelloServerStreamServer) error
type UnimplementedTestImportServer ¶
type UnimplementedTestImportServer struct { }
UnimplementedTestImportServer must be embedded to have forward compatible implementations.
type UnsafeEchoServiceServer ¶
type UnsafeEchoServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEchoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EchoServiceServer will result in compilation errors.
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.
type UnsafeTestImportServer ¶
type UnsafeTestImportServer interface {
// contains filtered or unexported methods
}
UnsafeTestImportServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TestImportServer will result in compilation errors.
type User ¶
type User struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message