Documentation ¶
Index ¶
- Constants
- Variables
- func Get_helloworldFullEmptyResponseFromFullMethodName(fullMethodName string) func() interface{}
- func Get_helloworldFullEmptyResponseWithErrorFromFullMethodName(fullMethodName string) func() interface{}
- func New_helloworldFullMethodNameSlice() []string
- func RegisterGreeter2Server(s grpc.ServiceRegistrar, srv Greeter2Server)
- func RegisterGreeter2ServerDI(s grpc.ServiceRegistrar) interface{}
- func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
- func RegisterGreeterServerDI(s grpc.ServiceRegistrar) interface{}
- type Greeter2Client
- type Greeter2Server
- type GreeterClient
- type GreeterServer
- type HelloReply
- func (*HelloReply) Descriptor() ([]byte, []int)deprecated
- func (x *HelloReply) GetError() *error1.Error
- func (x *HelloReply) GetMessage() string
- func (*HelloReply) ProtoMessage()
- func (x *HelloReply) ProtoReflect() protoreflect.Message
- func (x *HelloReply) Reset()
- func (x *HelloReply) String() string
- type HelloReply2
- type HelloRequest
- type IGreeter2Server
- type IGreeter2Service
- type IGreeterServer
- type IGreeterService
- type UnimplementedGreeter2Server
- type UnimplementedGreeterServer
- type UnsafeGreeter2Server
- type UnsafeGreeterServer
Constants ¶
const (
FMN_helloworld_Greeter2_SayHello = "/helloworld.Greeter2/SayHello"
)
FullMethodNames for Greeter2
const (
FMN_helloworld_Greeter_SayHello = "/helloworld.Greeter/SayHello"
)
FullMethodNames for Greeter
Variables ¶
var File_helloworld_helloworld_proto protoreflect.FileDescriptor
var Greeter2_ServiceDesc = grpc.ServiceDesc{ ServiceName: "helloworld.Greeter2", HandlerType: (*Greeter2Server)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _Greeter2_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "helloworld/helloworld.proto", }
Greeter2_ServiceDesc is the grpc.ServiceDesc for Greeter2 service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Greeter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "helloworld.Greeter", HandlerType: (*GreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _Greeter_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "helloworld/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 M_helloworld_Greeter2FullMethodNameExecuteMap = map[string]func(service IGreeter2Server, ctx context.Context, request interface{}) (interface{}, error){ "/helloworld.Greeter2/SayHello": func(service IGreeter2Server, ctx context.Context, request interface{}) (interface{}, error) { req := request.(*HelloRequest) return service.SayHello(ctx, req) }, }
M_helloworld_Greeter2FullMethodNameExecuteMap keys match that of grpc.UnaryServerInfo.FullMethodName
var M_helloworld_GreeterFullMethodNameExecuteMap = map[string]func(service IGreeterServer, ctx context.Context, request interface{}) (interface{}, error){ "/helloworld.Greeter/SayHello": func(service IGreeterServer, ctx context.Context, request interface{}) (interface{}, error) { req := request.(*HelloRequest) return service.SayHello(ctx, req) }, }
M_helloworld_GreeterFullMethodNameExecuteMap keys match that of grpc.UnaryServerInfo.FullMethodName
var TypeIGreeter2Service = sarulabsdi.GetInterfaceReflectType((*IGreeter2Service)(nil))
IGreeter2Service reflect type
var TypeIGreeterService = sarulabsdi.GetInterfaceReflectType((*IGreeterService)(nil))
IGreeterService reflect type
Functions ¶
func Get_helloworldFullEmptyResponseFromFullMethodName ¶ added in v0.0.22
func Get_helloworldFullEmptyResponseFromFullMethodName(fullMethodName string) func() interface{}
func Get_helloworldFullEmptyResponseWithErrorFromFullMethodName ¶ added in v0.0.22
func Get_helloworldFullEmptyResponseWithErrorFromFullMethodName(fullMethodName string) func() interface{}
func New_helloworldFullMethodNameSlice ¶ added in v0.0.22
func New_helloworldFullMethodNameSlice() []string
New_helloworldFullMethodNameSLice create a new map of fullMethodNames to []string i.e. /helloworld.Greeter/SayHello
func RegisterGreeter2Server ¶ added in v0.0.10
func RegisterGreeter2Server(s grpc.ServiceRegistrar, srv Greeter2Server)
func RegisterGreeter2ServerDI ¶ added in v0.0.10
func RegisterGreeter2ServerDI(s grpc.ServiceRegistrar) interface{}
func RegisterGreeterServer ¶
func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
func RegisterGreeterServerDI ¶
func RegisterGreeterServerDI(s grpc.ServiceRegistrar) interface{}
Types ¶
type Greeter2Client ¶ added in v0.0.10
type Greeter2Client interface { // Sends a greeting SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply2, error) }
Greeter2Client is the client API for Greeter2 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 NewGreeter2Client ¶ added in v0.0.10
func NewGreeter2Client(cc grpc.ClientConnInterface) Greeter2Client
type Greeter2Server ¶ added in v0.0.10
type Greeter2Server interface { // Sends a greeting SayHello(context.Context, *HelloRequest) (*HelloReply2, error) // contains filtered or unexported methods }
Greeter2Server is the server API for Greeter2 service. All implementations must embed UnimplementedGreeter2Server for forward compatibility
type GreeterClient ¶
type GreeterClient interface { // Sends a greeting SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, 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 { // Sends a greeting SayHello(context.Context, *HelloRequest) (*HelloReply, error) // contains filtered or unexported methods }
GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Error *error1.Error `protobuf:"bytes,999,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetError ¶ added in v0.0.12
func (x *HelloReply) GetError() *error1.Error
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 HelloReply2 ¶ added in v0.0.12
type HelloReply2 struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*HelloReply2) Descriptor
deprecated
added in
v0.0.12
func (*HelloReply2) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply2.ProtoReflect.Descriptor instead.
func (*HelloReply2) GetMessage ¶ added in v0.0.12
func (x *HelloReply2) GetMessage() string
func (*HelloReply2) ProtoMessage ¶ added in v0.0.12
func (*HelloReply2) ProtoMessage()
func (*HelloReply2) ProtoReflect ¶ added in v0.0.12
func (x *HelloReply2) ProtoReflect() protoreflect.Message
func (*HelloReply2) Reset ¶ added in v0.0.12
func (x *HelloReply2) Reset()
func (*HelloReply2) String ¶ added in v0.0.12
func (x *HelloReply2) String() string
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
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 IGreeter2Server ¶ added in v0.0.15
type IGreeter2Server interface {
SayHello(ctx context.Context, request *HelloRequest) (*HelloReply2, error)
}
IGreeter2Server defines the grpc server
type IGreeter2Service ¶ added in v0.0.10
type IGreeter2Service interface {
SayHello(request *HelloRequest) (*HelloReply2, error)
}
IGreeter2Service defines the required downstream service interface
func GetGreeter2ServiceFromContainer ¶ added in v0.0.10
func GetGreeter2ServiceFromContainer(ctn sarulabsdi.Container) IGreeter2Service
GetGreeter2ServiceFromContainer fetches the downstream di.Request scoped service
type IGreeterServer ¶ added in v0.0.15
type IGreeterServer interface {
SayHello(ctx context.Context, request *HelloRequest) (*HelloReply, error)
}
IGreeterServer defines the grpc server
type IGreeterService ¶ added in v0.0.9
type IGreeterService interface {
SayHello(request *HelloRequest) (*HelloReply, error)
}
IGreeterService defines the required downstream service interface
func GetGreeterServiceFromContainer ¶ added in v0.0.9
func GetGreeterServiceFromContainer(ctn sarulabsdi.Container) IGreeterService
GetGreeterServiceFromContainer fetches the downstream di.Request scoped service
type UnimplementedGreeter2Server ¶ added in v0.0.10
type UnimplementedGreeter2Server struct { }
UnimplementedGreeter2Server must be embedded to have forward compatible implementations.
func (UnimplementedGreeter2Server) SayHello ¶ added in v0.0.10
func (UnimplementedGreeter2Server) SayHello(context.Context, *HelloRequest) (*HelloReply2, error)
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer must be embedded to have forward compatible implementations.
func (UnimplementedGreeterServer) SayHello ¶
func (UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error)
type UnsafeGreeter2Server ¶ added in v0.0.10
type UnsafeGreeter2Server interface {
// contains filtered or unexported methods
}
UnsafeGreeter2Server may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to Greeter2Server 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.