Documentation ¶
Index ¶
- Variables
- func RegisterBarAPIServer(s grpc.ServiceRegistrar, srv BarAPIServer)
- func RegisterFooAPIServer(s grpc.ServiceRegistrar, srv FooAPIServer)
- type BarAPIClient
- type BarAPIServer
- type BarRequest
- type BarResponse
- type ExampleRequest
- type ExampleResponse
- type FooAPIClient
- type FooAPIServer
- type UnimplementedBarAPIServer
- type UnimplementedFooAPIServer
- type UnsafeBarAPIServer
- type UnsafeFooAPIServer
Constants ¶
This section is empty.
Variables ¶
var BarAPI_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example.BarAPI", HandlerType: (*BarAPIServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListBars", Handler: _BarAPI_ListBars_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api.proto", }
BarAPI_ServiceDesc is the grpc.ServiceDesc for BarAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_proto protoreflect.FileDescriptor
var FooAPI_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example.FooAPI", HandlerType: (*FooAPIServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Hello", Handler: _FooAPI_Hello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api.proto", }
FooAPI_ServiceDesc is the grpc.ServiceDesc for FooAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterBarAPIServer ¶
func RegisterBarAPIServer(s grpc.ServiceRegistrar, srv BarAPIServer)
func RegisterFooAPIServer ¶
func RegisterFooAPIServer(s grpc.ServiceRegistrar, srv FooAPIServer)
Types ¶
type BarAPIClient ¶
type BarAPIClient interface {
ListBars(ctx context.Context, in *BarRequest, opts ...grpc.CallOption) (*BarResponse, error)
}
BarAPIClient is the client API for BarAPI 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 NewBarAPIClient ¶
func NewBarAPIClient(cc grpc.ClientConnInterface) BarAPIClient
type BarAPIServer ¶
type BarAPIServer interface { ListBars(context.Context, *BarRequest) (*BarResponse, error) // contains filtered or unexported methods }
BarAPIServer is the server API for BarAPI service. All implementations must embed UnimplementedBarAPIServer for forward compatibility
type BarRequest ¶
type BarRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*BarRequest) Descriptor
deprecated
func (*BarRequest) Descriptor() ([]byte, []int)
Deprecated: Use BarRequest.ProtoReflect.Descriptor instead.
func (*BarRequest) GetMessage ¶
func (x *BarRequest) GetMessage() string
func (*BarRequest) ProtoMessage ¶
func (*BarRequest) ProtoMessage()
func (*BarRequest) ProtoReflect ¶
func (x *BarRequest) ProtoReflect() protoreflect.Message
func (*BarRequest) Reset ¶
func (x *BarRequest) Reset()
func (*BarRequest) String ¶
func (x *BarRequest) String() string
type BarResponse ¶
type BarResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*BarResponse) Descriptor
deprecated
func (*BarResponse) Descriptor() ([]byte, []int)
Deprecated: Use BarResponse.ProtoReflect.Descriptor instead.
func (*BarResponse) GetMessage ¶
func (x *BarResponse) GetMessage() string
func (*BarResponse) ProtoMessage ¶
func (*BarResponse) ProtoMessage()
func (*BarResponse) ProtoReflect ¶
func (x *BarResponse) ProtoReflect() protoreflect.Message
func (*BarResponse) Reset ¶
func (x *BarResponse) Reset()
func (*BarResponse) String ¶
func (x *BarResponse) String() string
type ExampleRequest ¶
type ExampleRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ExampleRequest) Descriptor
deprecated
func (*ExampleRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExampleRequest.ProtoReflect.Descriptor instead.
func (*ExampleRequest) GetMessage ¶
func (x *ExampleRequest) GetMessage() string
func (*ExampleRequest) ProtoMessage ¶
func (*ExampleRequest) ProtoMessage()
func (*ExampleRequest) ProtoReflect ¶
func (x *ExampleRequest) ProtoReflect() protoreflect.Message
func (*ExampleRequest) Reset ¶
func (x *ExampleRequest) Reset()
func (*ExampleRequest) String ¶
func (x *ExampleRequest) String() string
type ExampleResponse ¶
type ExampleResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ExampleResponse) Descriptor
deprecated
func (*ExampleResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExampleResponse.ProtoReflect.Descriptor instead.
func (*ExampleResponse) GetMessage ¶
func (x *ExampleResponse) GetMessage() string
func (*ExampleResponse) ProtoMessage ¶
func (*ExampleResponse) ProtoMessage()
func (*ExampleResponse) ProtoReflect ¶
func (x *ExampleResponse) ProtoReflect() protoreflect.Message
func (*ExampleResponse) Reset ¶
func (x *ExampleResponse) Reset()
func (*ExampleResponse) String ¶
func (x *ExampleResponse) String() string
type FooAPIClient ¶
type FooAPIClient interface {
Hello(ctx context.Context, in *ExampleRequest, opts ...grpc.CallOption) (*ExampleResponse, error)
}
FooAPIClient is the client API for FooAPI 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 NewFooAPIClient ¶
func NewFooAPIClient(cc grpc.ClientConnInterface) FooAPIClient
type FooAPIServer ¶
type FooAPIServer interface { Hello(context.Context, *ExampleRequest) (*ExampleResponse, error) // contains filtered or unexported methods }
FooAPIServer is the server API for FooAPI service. All implementations must embed UnimplementedFooAPIServer for forward compatibility
type UnimplementedBarAPIServer ¶
type UnimplementedBarAPIServer struct{}
UnimplementedBarAPIServer must be embedded to have forward compatible implementations.
func (UnimplementedBarAPIServer) ListBars ¶
func (UnimplementedBarAPIServer) ListBars(context.Context, *BarRequest) (*BarResponse, error)
type UnimplementedFooAPIServer ¶
type UnimplementedFooAPIServer struct{}
UnimplementedFooAPIServer must be embedded to have forward compatible implementations.
func (UnimplementedFooAPIServer) Hello ¶
func (UnimplementedFooAPIServer) Hello(context.Context, *ExampleRequest) (*ExampleResponse, error)
type UnsafeBarAPIServer ¶
type UnsafeBarAPIServer interface {
// contains filtered or unexported methods
}
UnsafeBarAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BarAPIServer will result in compilation errors.
type UnsafeFooAPIServer ¶
type UnsafeFooAPIServer interface {
// contains filtered or unexported methods
}
UnsafeFooAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FooAPIServer will result in compilation errors.