Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterGameHTTPServer(s *http.Server, srv GameHTTPServer)
- func RegisterGameServer(s grpc.ServiceRegistrar, srv GameServer)
- type GameClient
- type GameHTTPClient
- type GameHTTPClientImpl
- type GameHTTPServer
- type GameServer
- type HelloWorldReply
- func (*HelloWorldReply) Descriptor() ([]byte, []int)deprecated
- func (*HelloWorldReply) ProtoMessage()
- func (x *HelloWorldReply) ProtoReflect() protoreflect.Message
- func (x *HelloWorldReply) Reset()
- func (x *HelloWorldReply) String() string
- func (m *HelloWorldReply) Validate() error
- func (m *HelloWorldReply) ValidateAll() error
- type HelloWorldReplyMultiError
- type HelloWorldReplyValidationError
- func (e HelloWorldReplyValidationError) Cause() error
- func (e HelloWorldReplyValidationError) Error() string
- func (e HelloWorldReplyValidationError) ErrorName() string
- func (e HelloWorldReplyValidationError) Field() string
- func (e HelloWorldReplyValidationError) Key() bool
- func (e HelloWorldReplyValidationError) Reason() string
- type HelloWorldRequest
- func (*HelloWorldRequest) Descriptor() ([]byte, []int)deprecated
- func (*HelloWorldRequest) ProtoMessage()
- func (x *HelloWorldRequest) ProtoReflect() protoreflect.Message
- func (x *HelloWorldRequest) Reset()
- func (x *HelloWorldRequest) String() string
- func (m *HelloWorldRequest) Validate() error
- func (m *HelloWorldRequest) ValidateAll() error
- type HelloWorldRequestMultiError
- type HelloWorldRequestValidationError
- func (e HelloWorldRequestValidationError) Cause() error
- func (e HelloWorldRequestValidationError) Error() string
- func (e HelloWorldRequestValidationError) ErrorName() string
- func (e HelloWorldRequestValidationError) Field() string
- func (e HelloWorldRequestValidationError) Key() bool
- func (e HelloWorldRequestValidationError) Reason() string
- type UnimplementedGameServer
- type UnsafeGameServer
Constants ¶
const (
Game_HelloWorld_FullMethodName = "/game.v1.Game/HelloWorld"
)
const OperationGameHelloWorld = "/game.v1.Game/HelloWorld"
Variables ¶
var File_game_proto_game_proto protoreflect.FileDescriptor
var Game_ServiceDesc = grpc.ServiceDesc{ ServiceName: "game.v1.Game", HandlerType: (*GameServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "HelloWorld", Handler: _Game_HelloWorld_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "game-proto/game.proto", }
Game_ServiceDesc is the grpc.ServiceDesc for Game service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGameHTTPServer ¶
func RegisterGameHTTPServer(s *http.Server, srv GameHTTPServer)
func RegisterGameServer ¶
func RegisterGameServer(s grpc.ServiceRegistrar, srv GameServer)
Types ¶
type GameClient ¶
type GameClient interface {
HelloWorld(ctx context.Context, in *HelloWorldRequest, opts ...grpc.CallOption) (*HelloWorldReply, error)
}
GameClient is the client API for Game 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 NewGameClient ¶
func NewGameClient(cc grpc.ClientConnInterface) GameClient
type GameHTTPClient ¶
type GameHTTPClient interface {
HelloWorld(ctx context.Context, req *HelloWorldRequest, opts ...http.CallOption) (rsp *HelloWorldReply, err error)
}
func NewGameHTTPClient ¶
func NewGameHTTPClient(client *http.Client) GameHTTPClient
type GameHTTPClientImpl ¶
type GameHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*GameHTTPClientImpl) HelloWorld ¶ added in v1.0.3
func (c *GameHTTPClientImpl) HelloWorld(ctx context.Context, in *HelloWorldRequest, opts ...http.CallOption) (*HelloWorldReply, error)
type GameHTTPServer ¶
type GameHTTPServer interface {
HelloWorld(context.Context, *HelloWorldRequest) (*HelloWorldReply, error)
}
type GameServer ¶
type GameServer interface {
HelloWorld(context.Context, *HelloWorldRequest) (*HelloWorldReply, error)
// contains filtered or unexported methods
}
GameServer is the server API for Game service. All implementations must embed UnimplementedGameServer for forward compatibility
type HelloWorldReply ¶ added in v1.0.3
type HelloWorldReply struct {
// contains filtered or unexported fields
}
func (*HelloWorldReply) Descriptor
deprecated
added in
v1.0.3
func (*HelloWorldReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloWorldReply.ProtoReflect.Descriptor instead.
func (*HelloWorldReply) ProtoMessage ¶ added in v1.0.3
func (*HelloWorldReply) ProtoMessage()
func (*HelloWorldReply) ProtoReflect ¶ added in v1.0.3
func (x *HelloWorldReply) ProtoReflect() protoreflect.Message
func (*HelloWorldReply) Reset ¶ added in v1.0.3
func (x *HelloWorldReply) Reset()
func (*HelloWorldReply) String ¶ added in v1.0.3
func (x *HelloWorldReply) String() string
func (*HelloWorldReply) Validate ¶ added in v1.0.3
func (m *HelloWorldReply) Validate() error
Validate checks the field values on HelloWorldReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HelloWorldReply) ValidateAll ¶ added in v1.0.3
func (m *HelloWorldReply) ValidateAll() error
ValidateAll checks the field values on HelloWorldReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HelloWorldReplyMultiError, or nil if none found.
type HelloWorldReplyMultiError ¶ added in v1.0.3
type HelloWorldReplyMultiError []error
HelloWorldReplyMultiError is an error wrapping multiple validation errors returned by HelloWorldReply.ValidateAll() if the designated constraints aren't met.
func (HelloWorldReplyMultiError) AllErrors ¶ added in v1.0.3
func (m HelloWorldReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HelloWorldReplyMultiError) Error ¶ added in v1.0.3
func (m HelloWorldReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HelloWorldReplyValidationError ¶ added in v1.0.3
type HelloWorldReplyValidationError struct {
// contains filtered or unexported fields
}
HelloWorldReplyValidationError is the validation error returned by HelloWorldReply.Validate if the designated constraints aren't met.
func (HelloWorldReplyValidationError) Cause ¶ added in v1.0.3
func (e HelloWorldReplyValidationError) Cause() error
Cause function returns cause value.
func (HelloWorldReplyValidationError) Error ¶ added in v1.0.3
func (e HelloWorldReplyValidationError) Error() string
Error satisfies the builtin error interface
func (HelloWorldReplyValidationError) ErrorName ¶ added in v1.0.3
func (e HelloWorldReplyValidationError) ErrorName() string
ErrorName returns error name.
func (HelloWorldReplyValidationError) Field ¶ added in v1.0.3
func (e HelloWorldReplyValidationError) Field() string
Field function returns field value.
func (HelloWorldReplyValidationError) Key ¶ added in v1.0.3
func (e HelloWorldReplyValidationError) Key() bool
Key function returns key value.
func (HelloWorldReplyValidationError) Reason ¶ added in v1.0.3
func (e HelloWorldReplyValidationError) Reason() string
Reason function returns reason value.
type HelloWorldRequest ¶ added in v1.0.3
type HelloWorldRequest struct {
// contains filtered or unexported fields
}
func (*HelloWorldRequest) Descriptor
deprecated
added in
v1.0.3
func (*HelloWorldRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloWorldRequest.ProtoReflect.Descriptor instead.
func (*HelloWorldRequest) ProtoMessage ¶ added in v1.0.3
func (*HelloWorldRequest) ProtoMessage()
func (*HelloWorldRequest) ProtoReflect ¶ added in v1.0.3
func (x *HelloWorldRequest) ProtoReflect() protoreflect.Message
func (*HelloWorldRequest) Reset ¶ added in v1.0.3
func (x *HelloWorldRequest) Reset()
func (*HelloWorldRequest) String ¶ added in v1.0.3
func (x *HelloWorldRequest) String() string
func (*HelloWorldRequest) Validate ¶ added in v1.0.3
func (m *HelloWorldRequest) Validate() error
Validate checks the field values on HelloWorldRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HelloWorldRequest) ValidateAll ¶ added in v1.0.3
func (m *HelloWorldRequest) ValidateAll() error
ValidateAll checks the field values on HelloWorldRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HelloWorldRequestMultiError, or nil if none found.
type HelloWorldRequestMultiError ¶ added in v1.0.3
type HelloWorldRequestMultiError []error
HelloWorldRequestMultiError is an error wrapping multiple validation errors returned by HelloWorldRequest.ValidateAll() if the designated constraints aren't met.
func (HelloWorldRequestMultiError) AllErrors ¶ added in v1.0.3
func (m HelloWorldRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HelloWorldRequestMultiError) Error ¶ added in v1.0.3
func (m HelloWorldRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HelloWorldRequestValidationError ¶ added in v1.0.3
type HelloWorldRequestValidationError struct {
// contains filtered or unexported fields
}
HelloWorldRequestValidationError is the validation error returned by HelloWorldRequest.Validate if the designated constraints aren't met.
func (HelloWorldRequestValidationError) Cause ¶ added in v1.0.3
func (e HelloWorldRequestValidationError) Cause() error
Cause function returns cause value.
func (HelloWorldRequestValidationError) Error ¶ added in v1.0.3
func (e HelloWorldRequestValidationError) Error() string
Error satisfies the builtin error interface
func (HelloWorldRequestValidationError) ErrorName ¶ added in v1.0.3
func (e HelloWorldRequestValidationError) ErrorName() string
ErrorName returns error name.
func (HelloWorldRequestValidationError) Field ¶ added in v1.0.3
func (e HelloWorldRequestValidationError) Field() string
Field function returns field value.
func (HelloWorldRequestValidationError) Key ¶ added in v1.0.3
func (e HelloWorldRequestValidationError) Key() bool
Key function returns key value.
func (HelloWorldRequestValidationError) Reason ¶ added in v1.0.3
func (e HelloWorldRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedGameServer ¶
type UnimplementedGameServer struct {
}
UnimplementedGameServer must be embedded to have forward compatible implementations.
func (UnimplementedGameServer) HelloWorld ¶ added in v1.0.3
func (UnimplementedGameServer) HelloWorld(context.Context, *HelloWorldRequest) (*HelloWorldReply, error)
type UnsafeGameServer ¶
type UnsafeGameServer interface {
// contains filtered or unexported methods
}
UnsafeGameServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GameServer will result in compilation errors.