Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterGameHTTPServer(s *http.Server, srv GameHTTPServer)
- func RegisterGameServer(s grpc.ServiceRegistrar, srv GameServer)
- type CreateGameRequest
- func (*CreateGameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateGameRequest) GetAge() int32
- func (x *CreateGameRequest) GetName() string
- func (*CreateGameRequest) ProtoMessage()
- func (x *CreateGameRequest) ProtoReflect() protoreflect.Message
- func (x *CreateGameRequest) Reset()
- func (x *CreateGameRequest) String() string
- func (m *CreateGameRequest) Validate() error
- func (m *CreateGameRequest) ValidateAll() error
- type CreateGameRequestMultiError
- type CreateGameRequestValidationError
- func (e CreateGameRequestValidationError) Cause() error
- func (e CreateGameRequestValidationError) Error() string
- func (e CreateGameRequestValidationError) ErrorName() string
- func (e CreateGameRequestValidationError) Field() string
- func (e CreateGameRequestValidationError) Key() bool
- func (e CreateGameRequestValidationError) Reason() string
- type FindGameReply
- func (*FindGameReply) Descriptor() ([]byte, []int)deprecated
- func (x *FindGameReply) GetList() []*GameReply
- func (x *FindGameReply) GetPage() *Page
- func (*FindGameReply) ProtoMessage()
- func (x *FindGameReply) ProtoReflect() protoreflect.Message
- func (x *FindGameReply) Reset()
- func (x *FindGameReply) String() string
- func (m *FindGameReply) Validate() error
- func (m *FindGameReply) ValidateAll() error
- type FindGameReplyMultiError
- type FindGameReplyValidationError
- func (e FindGameReplyValidationError) Cause() error
- func (e FindGameReplyValidationError) Error() string
- func (e FindGameReplyValidationError) ErrorName() string
- func (e FindGameReplyValidationError) Field() string
- func (e FindGameReplyValidationError) Key() bool
- func (e FindGameReplyValidationError) Reason() string
- type FindGameRequest
- func (*FindGameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FindGameRequest) GetAge() int32
- func (x *FindGameRequest) GetName() string
- func (x *FindGameRequest) GetPage() *Page
- func (*FindGameRequest) ProtoMessage()
- func (x *FindGameRequest) ProtoReflect() protoreflect.Message
- func (x *FindGameRequest) Reset()
- func (x *FindGameRequest) String() string
- func (m *FindGameRequest) Validate() error
- func (m *FindGameRequest) ValidateAll() error
- type FindGameRequestMultiError
- type FindGameRequestValidationError
- func (e FindGameRequestValidationError) Cause() error
- func (e FindGameRequestValidationError) Error() string
- func (e FindGameRequestValidationError) ErrorName() string
- func (e FindGameRequestValidationError) Field() string
- func (e FindGameRequestValidationError) Key() bool
- func (e FindGameRequestValidationError) Reason() string
- type GameClient
- type GameHTTPClient
- type GameHTTPClientImpl
- func (c *GameHTTPClientImpl) CreateGame(ctx context.Context, in *CreateGameRequest, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *GameHTTPClientImpl) DeleteGame(ctx context.Context, in *IdsRequest, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *GameHTTPClientImpl) FindGame(ctx context.Context, in *FindGameRequest, opts ...http.CallOption) (*FindGameReply, error)
- func (c *GameHTTPClientImpl) GetGame(ctx context.Context, in *GetGameRequest, opts ...http.CallOption) (*GetGameReply, error)
- func (c *GameHTTPClientImpl) Idempotent(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*IdempotentReply, error)
- func (c *GameHTTPClientImpl) UpdateGame(ctx context.Context, in *UpdateGameRequest, opts ...http.CallOption) (*emptypb.Empty, error)
- type GameHTTPServer
- type GameReply
- func (*GameReply) Descriptor() ([]byte, []int)deprecated
- func (x *GameReply) GetAge() int32
- func (x *GameReply) GetId() uint64
- func (x *GameReply) GetName() string
- func (*GameReply) ProtoMessage()
- func (x *GameReply) ProtoReflect() protoreflect.Message
- func (x *GameReply) Reset()
- func (x *GameReply) String() string
- func (m *GameReply) Validate() error
- func (m *GameReply) ValidateAll() error
- type GameReplyMultiError
- type GameReplyValidationError
- type GameServer
- type GetGameReply
- func (*GetGameReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetGameReply) GetAge() int32
- func (x *GetGameReply) GetId() uint64
- func (x *GetGameReply) GetName() string
- func (*GetGameReply) ProtoMessage()
- func (x *GetGameReply) ProtoReflect() protoreflect.Message
- func (x *GetGameReply) Reset()
- func (x *GetGameReply) String() string
- func (m *GetGameReply) Validate() error
- func (m *GetGameReply) ValidateAll() error
- type GetGameReplyMultiError
- type GetGameReplyValidationError
- func (e GetGameReplyValidationError) Cause() error
- func (e GetGameReplyValidationError) Error() string
- func (e GetGameReplyValidationError) ErrorName() string
- func (e GetGameReplyValidationError) Field() string
- func (e GetGameReplyValidationError) Key() bool
- func (e GetGameReplyValidationError) Reason() string
- type GetGameRequest
- func (*GetGameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetGameRequest) GetId() uint64
- func (*GetGameRequest) ProtoMessage()
- func (x *GetGameRequest) ProtoReflect() protoreflect.Message
- func (x *GetGameRequest) Reset()
- func (x *GetGameRequest) String() string
- func (m *GetGameRequest) Validate() error
- func (m *GetGameRequest) ValidateAll() error
- type GetGameRequestMultiError
- type GetGameRequestValidationError
- func (e GetGameRequestValidationError) Cause() error
- func (e GetGameRequestValidationError) Error() string
- func (e GetGameRequestValidationError) ErrorName() string
- func (e GetGameRequestValidationError) Field() string
- func (e GetGameRequestValidationError) Key() bool
- func (e GetGameRequestValidationError) Reason() string
- type IdempotentReply
- func (*IdempotentReply) Descriptor() ([]byte, []int)deprecated
- func (x *IdempotentReply) GetToken() string
- func (*IdempotentReply) ProtoMessage()
- func (x *IdempotentReply) ProtoReflect() protoreflect.Message
- func (x *IdempotentReply) Reset()
- func (x *IdempotentReply) String() string
- func (m *IdempotentReply) Validate() error
- func (m *IdempotentReply) ValidateAll() error
- type IdempotentReplyMultiError
- type IdempotentReplyValidationError
- func (e IdempotentReplyValidationError) Cause() error
- func (e IdempotentReplyValidationError) Error() string
- func (e IdempotentReplyValidationError) ErrorName() string
- func (e IdempotentReplyValidationError) Field() string
- func (e IdempotentReplyValidationError) Key() bool
- func (e IdempotentReplyValidationError) Reason() string
- type IdsRequest
- func (*IdsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *IdsRequest) GetIds() string
- func (*IdsRequest) ProtoMessage()
- func (x *IdsRequest) ProtoReflect() protoreflect.Message
- func (x *IdsRequest) Reset()
- func (x *IdsRequest) String() string
- func (m *IdsRequest) Validate() error
- func (m *IdsRequest) ValidateAll() error
- type IdsRequestMultiError
- type IdsRequestValidationError
- type Page
- func (*Page) Descriptor() ([]byte, []int)deprecated
- func (x *Page) GetDisable() bool
- func (x *Page) GetNum() uint64
- func (x *Page) GetSize() uint64
- func (x *Page) GetTotal() int64
- func (*Page) ProtoMessage()
- func (x *Page) ProtoReflect() protoreflect.Message
- func (x *Page) Reset()
- func (x *Page) String() string
- func (m *Page) Validate() error
- func (m *Page) ValidateAll() error
- type PageMultiError
- type PageValidationError
- type UnimplementedGameServer
- func (UnimplementedGameServer) CreateGame(context.Context, *CreateGameRequest) (*emptypb.Empty, error)
- func (UnimplementedGameServer) DeleteGame(context.Context, *IdsRequest) (*emptypb.Empty, error)
- func (UnimplementedGameServer) FindGame(context.Context, *FindGameRequest) (*FindGameReply, error)
- func (UnimplementedGameServer) GetGame(context.Context, *GetGameRequest) (*GetGameReply, error)
- func (UnimplementedGameServer) Idempotent(context.Context, *emptypb.Empty) (*IdempotentReply, error)
- func (UnimplementedGameServer) UpdateGame(context.Context, *UpdateGameRequest) (*emptypb.Empty, error)
- type UnsafeGameServer
- type UpdateGameRequest
- func (*UpdateGameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateGameRequest) GetAge() int32
- func (x *UpdateGameRequest) GetId() uint64
- func (x *UpdateGameRequest) GetName() string
- func (*UpdateGameRequest) ProtoMessage()
- func (x *UpdateGameRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateGameRequest) Reset()
- func (x *UpdateGameRequest) String() string
- func (m *UpdateGameRequest) Validate() error
- func (m *UpdateGameRequest) ValidateAll() error
- type UpdateGameRequestMultiError
- type UpdateGameRequestValidationError
- func (e UpdateGameRequestValidationError) Cause() error
- func (e UpdateGameRequestValidationError) Error() string
- func (e UpdateGameRequestValidationError) ErrorName() string
- func (e UpdateGameRequestValidationError) Field() string
- func (e UpdateGameRequestValidationError) Key() bool
- func (e UpdateGameRequestValidationError) Reason() string
Constants ¶
const ( Game_Idempotent_FullMethodName = "/game.v1.Game/Idempotent" Game_CreateGame_FullMethodName = "/game.v1.Game/CreateGame" Game_GetGame_FullMethodName = "/game.v1.Game/GetGame" Game_FindGame_FullMethodName = "/game.v1.Game/FindGame" Game_UpdateGame_FullMethodName = "/game.v1.Game/UpdateGame" Game_DeleteGame_FullMethodName = "/game.v1.Game/DeleteGame" )
const OperationGameCreateGame = "/game.v1.Game/CreateGame"
const OperationGameDeleteGame = "/game.v1.Game/DeleteGame"
const OperationGameFindGame = "/game.v1.Game/FindGame"
const OperationGameGetGame = "/game.v1.Game/GetGame"
const OperationGameIdempotent = "/game.v1.Game/Idempotent"
const OperationGameUpdateGame = "/game.v1.Game/UpdateGame"
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: "Idempotent", Handler: _Game_Idempotent_Handler, }, { MethodName: "CreateGame", Handler: _Game_CreateGame_Handler, }, { MethodName: "GetGame", Handler: _Game_GetGame_Handler, }, { MethodName: "FindGame", Handler: _Game_FindGame_Handler, }, { MethodName: "UpdateGame", Handler: _Game_UpdateGame_Handler, }, { MethodName: "DeleteGame", Handler: _Game_DeleteGame_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 CreateGameRequest ¶
type CreateGameRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // the name of string must be between 2 and 50 character
Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` // the age of int32 must be >= 0
// contains filtered or unexported fields
}
func (*CreateGameRequest) Descriptor
deprecated
func (*CreateGameRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateGameRequest.ProtoReflect.Descriptor instead.
func (*CreateGameRequest) GetAge ¶
func (x *CreateGameRequest) GetAge() int32
func (*CreateGameRequest) GetName ¶
func (x *CreateGameRequest) GetName() string
func (*CreateGameRequest) ProtoMessage ¶
func (*CreateGameRequest) ProtoMessage()
func (*CreateGameRequest) ProtoReflect ¶
func (x *CreateGameRequest) ProtoReflect() protoreflect.Message
func (*CreateGameRequest) Reset ¶
func (x *CreateGameRequest) Reset()
func (*CreateGameRequest) String ¶
func (x *CreateGameRequest) String() string
func (*CreateGameRequest) Validate ¶
func (m *CreateGameRequest) Validate() error
Validate checks the field values on CreateGameRequest 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 (*CreateGameRequest) ValidateAll ¶
func (m *CreateGameRequest) ValidateAll() error
ValidateAll checks the field values on CreateGameRequest 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 CreateGameRequestMultiError, or nil if none found.
type CreateGameRequestMultiError ¶
type CreateGameRequestMultiError []error
CreateGameRequestMultiError is an error wrapping multiple validation errors returned by CreateGameRequest.ValidateAll() if the designated constraints aren't met.
func (CreateGameRequestMultiError) AllErrors ¶
func (m CreateGameRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateGameRequestMultiError) Error ¶
func (m CreateGameRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateGameRequestValidationError ¶
type CreateGameRequestValidationError struct {
// contains filtered or unexported fields
}
CreateGameRequestValidationError is the validation error returned by CreateGameRequest.Validate if the designated constraints aren't met.
func (CreateGameRequestValidationError) Cause ¶
func (e CreateGameRequestValidationError) Cause() error
Cause function returns cause value.
func (CreateGameRequestValidationError) Error ¶
func (e CreateGameRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreateGameRequestValidationError) ErrorName ¶
func (e CreateGameRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreateGameRequestValidationError) Field ¶
func (e CreateGameRequestValidationError) Field() string
Field function returns field value.
func (CreateGameRequestValidationError) Key ¶
func (e CreateGameRequestValidationError) Key() bool
Key function returns key value.
func (CreateGameRequestValidationError) Reason ¶
func (e CreateGameRequestValidationError) Reason() string
Reason function returns reason value.
type FindGameReply ¶
type FindGameReply struct {
Page *Page `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"`
List []*GameReply `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"`
// contains filtered or unexported fields
}
func (*FindGameReply) Descriptor
deprecated
func (*FindGameReply) Descriptor() ([]byte, []int)
Deprecated: Use FindGameReply.ProtoReflect.Descriptor instead.
func (*FindGameReply) GetList ¶
func (x *FindGameReply) GetList() []*GameReply
func (*FindGameReply) GetPage ¶
func (x *FindGameReply) GetPage() *Page
func (*FindGameReply) ProtoMessage ¶
func (*FindGameReply) ProtoMessage()
func (*FindGameReply) ProtoReflect ¶
func (x *FindGameReply) ProtoReflect() protoreflect.Message
func (*FindGameReply) Reset ¶
func (x *FindGameReply) Reset()
func (*FindGameReply) String ¶
func (x *FindGameReply) String() string
func (*FindGameReply) Validate ¶
func (m *FindGameReply) Validate() error
Validate checks the field values on FindGameReply 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 (*FindGameReply) ValidateAll ¶
func (m *FindGameReply) ValidateAll() error
ValidateAll checks the field values on FindGameReply 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 FindGameReplyMultiError, or nil if none found.
type FindGameReplyMultiError ¶
type FindGameReplyMultiError []error
FindGameReplyMultiError is an error wrapping multiple validation errors returned by FindGameReply.ValidateAll() if the designated constraints aren't met.
func (FindGameReplyMultiError) AllErrors ¶
func (m FindGameReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FindGameReplyMultiError) Error ¶
func (m FindGameReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FindGameReplyValidationError ¶
type FindGameReplyValidationError struct {
// contains filtered or unexported fields
}
FindGameReplyValidationError is the validation error returned by FindGameReply.Validate if the designated constraints aren't met.
func (FindGameReplyValidationError) Cause ¶
func (e FindGameReplyValidationError) Cause() error
Cause function returns cause value.
func (FindGameReplyValidationError) Error ¶
func (e FindGameReplyValidationError) Error() string
Error satisfies the builtin error interface
func (FindGameReplyValidationError) ErrorName ¶
func (e FindGameReplyValidationError) ErrorName() string
ErrorName returns error name.
func (FindGameReplyValidationError) Field ¶
func (e FindGameReplyValidationError) Field() string
Field function returns field value.
func (FindGameReplyValidationError) Key ¶
func (e FindGameReplyValidationError) Key() bool
Key function returns key value.
func (FindGameReplyValidationError) Reason ¶
func (e FindGameReplyValidationError) Reason() string
Reason function returns reason value.
type FindGameRequest ¶
type FindGameRequest struct {
Page *Page `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"`
Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
Age *int32 `protobuf:"varint,3,opt,name=age,proto3,oneof" json:"age,omitempty"`
// contains filtered or unexported fields
}
func (*FindGameRequest) Descriptor
deprecated
func (*FindGameRequest) Descriptor() ([]byte, []int)
Deprecated: Use FindGameRequest.ProtoReflect.Descriptor instead.
func (*FindGameRequest) GetAge ¶
func (x *FindGameRequest) GetAge() int32
func (*FindGameRequest) GetName ¶
func (x *FindGameRequest) GetName() string
func (*FindGameRequest) GetPage ¶
func (x *FindGameRequest) GetPage() *Page
func (*FindGameRequest) ProtoMessage ¶
func (*FindGameRequest) ProtoMessage()
func (*FindGameRequest) ProtoReflect ¶
func (x *FindGameRequest) ProtoReflect() protoreflect.Message
func (*FindGameRequest) Reset ¶
func (x *FindGameRequest) Reset()
func (*FindGameRequest) String ¶
func (x *FindGameRequest) String() string
func (*FindGameRequest) Validate ¶
func (m *FindGameRequest) Validate() error
Validate checks the field values on FindGameRequest 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 (*FindGameRequest) ValidateAll ¶
func (m *FindGameRequest) ValidateAll() error
ValidateAll checks the field values on FindGameRequest 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 FindGameRequestMultiError, or nil if none found.
type FindGameRequestMultiError ¶
type FindGameRequestMultiError []error
FindGameRequestMultiError is an error wrapping multiple validation errors returned by FindGameRequest.ValidateAll() if the designated constraints aren't met.
func (FindGameRequestMultiError) AllErrors ¶
func (m FindGameRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FindGameRequestMultiError) Error ¶
func (m FindGameRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FindGameRequestValidationError ¶
type FindGameRequestValidationError struct {
// contains filtered or unexported fields
}
FindGameRequestValidationError is the validation error returned by FindGameRequest.Validate if the designated constraints aren't met.
func (FindGameRequestValidationError) Cause ¶
func (e FindGameRequestValidationError) Cause() error
Cause function returns cause value.
func (FindGameRequestValidationError) Error ¶
func (e FindGameRequestValidationError) Error() string
Error satisfies the builtin error interface
func (FindGameRequestValidationError) ErrorName ¶
func (e FindGameRequestValidationError) ErrorName() string
ErrorName returns error name.
func (FindGameRequestValidationError) Field ¶
func (e FindGameRequestValidationError) Field() string
Field function returns field value.
func (FindGameRequestValidationError) Key ¶
func (e FindGameRequestValidationError) Key() bool
Key function returns key value.
func (FindGameRequestValidationError) Reason ¶
func (e FindGameRequestValidationError) Reason() string
Reason function returns reason value.
type GameClient ¶
type GameClient interface {
Idempotent(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*IdempotentReply, error)
CreateGame(ctx context.Context, in *CreateGameRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetGame(ctx context.Context, in *GetGameRequest, opts ...grpc.CallOption) (*GetGameReply, error)
FindGame(ctx context.Context, in *FindGameRequest, opts ...grpc.CallOption) (*FindGameReply, error)
UpdateGame(ctx context.Context, in *UpdateGameRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
DeleteGame(ctx context.Context, in *IdsRequest, opts ...grpc.CallOption) (*emptypb.Empty, 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 {
CreateGame(ctx context.Context, req *CreateGameRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
DeleteGame(ctx context.Context, req *IdsRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
FindGame(ctx context.Context, req *FindGameRequest, opts ...http.CallOption) (rsp *FindGameReply, err error)
GetGame(ctx context.Context, req *GetGameRequest, opts ...http.CallOption) (rsp *GetGameReply, err error)
Idempotent(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *IdempotentReply, err error)
UpdateGame(ctx context.Context, req *UpdateGameRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
}
func NewGameHTTPClient ¶
func NewGameHTTPClient(client *http.Client) GameHTTPClient
type GameHTTPClientImpl ¶
type GameHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*GameHTTPClientImpl) CreateGame ¶
func (c *GameHTTPClientImpl) CreateGame(ctx context.Context, in *CreateGameRequest, opts ...http.CallOption) (*emptypb.Empty, error)
func (*GameHTTPClientImpl) DeleteGame ¶
func (c *GameHTTPClientImpl) DeleteGame(ctx context.Context, in *IdsRequest, opts ...http.CallOption) (*emptypb.Empty, error)
func (*GameHTTPClientImpl) FindGame ¶
func (c *GameHTTPClientImpl) FindGame(ctx context.Context, in *FindGameRequest, opts ...http.CallOption) (*FindGameReply, error)
func (*GameHTTPClientImpl) GetGame ¶
func (c *GameHTTPClientImpl) GetGame(ctx context.Context, in *GetGameRequest, opts ...http.CallOption) (*GetGameReply, error)
func (*GameHTTPClientImpl) Idempotent ¶
func (c *GameHTTPClientImpl) Idempotent(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*IdempotentReply, error)
func (*GameHTTPClientImpl) UpdateGame ¶
func (c *GameHTTPClientImpl) UpdateGame(ctx context.Context, in *UpdateGameRequest, opts ...http.CallOption) (*emptypb.Empty, error)
type GameHTTPServer ¶
type GameHTTPServer interface {
CreateGame(context.Context, *CreateGameRequest) (*emptypb.Empty, error)
DeleteGame(context.Context, *IdsRequest) (*emptypb.Empty, error)
FindGame(context.Context, *FindGameRequest) (*FindGameReply, error)
GetGame(context.Context, *GetGameRequest) (*GetGameReply, error)
Idempotent(context.Context, *emptypb.Empty) (*IdempotentReply, error)
UpdateGame(context.Context, *UpdateGameRequest) (*emptypb.Empty, error)
}
type GameReply ¶
type GameReply struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Age int32 `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"`
// contains filtered or unexported fields
}
func (*GameReply) Descriptor
deprecated
func (*GameReply) ProtoMessage ¶
func (*GameReply) ProtoMessage()
func (*GameReply) ProtoReflect ¶
func (x *GameReply) ProtoReflect() protoreflect.Message
func (*GameReply) Validate ¶
Validate checks the field values on GameReply 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 (*GameReply) ValidateAll ¶
ValidateAll checks the field values on GameReply 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 GameReplyMultiError, or nil if none found.
type GameReplyMultiError ¶
type GameReplyMultiError []error
GameReplyMultiError is an error wrapping multiple validation errors returned by GameReply.ValidateAll() if the designated constraints aren't met.
func (GameReplyMultiError) AllErrors ¶
func (m GameReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GameReplyMultiError) Error ¶
func (m GameReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GameReplyValidationError ¶
type GameReplyValidationError struct {
// contains filtered or unexported fields
}
GameReplyValidationError is the validation error returned by GameReply.Validate if the designated constraints aren't met.
func (GameReplyValidationError) Cause ¶
func (e GameReplyValidationError) Cause() error
Cause function returns cause value.
func (GameReplyValidationError) Error ¶
func (e GameReplyValidationError) Error() string
Error satisfies the builtin error interface
func (GameReplyValidationError) ErrorName ¶
func (e GameReplyValidationError) ErrorName() string
ErrorName returns error name.
func (GameReplyValidationError) Field ¶
func (e GameReplyValidationError) Field() string
Field function returns field value.
func (GameReplyValidationError) Key ¶
func (e GameReplyValidationError) Key() bool
Key function returns key value.
func (GameReplyValidationError) Reason ¶
func (e GameReplyValidationError) Reason() string
Reason function returns reason value.
type GameServer ¶
type GameServer interface {
Idempotent(context.Context, *emptypb.Empty) (*IdempotentReply, error)
CreateGame(context.Context, *CreateGameRequest) (*emptypb.Empty, error)
GetGame(context.Context, *GetGameRequest) (*GetGameReply, error)
FindGame(context.Context, *FindGameRequest) (*FindGameReply, error)
UpdateGame(context.Context, *UpdateGameRequest) (*emptypb.Empty, error)
DeleteGame(context.Context, *IdsRequest) (*emptypb.Empty, error)
// contains filtered or unexported methods
}
GameServer is the server API for Game service. All implementations must embed UnimplementedGameServer for forward compatibility
type GetGameReply ¶
type GetGameReply struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Age int32 `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"`
// contains filtered or unexported fields
}
func (*GetGameReply) Descriptor
deprecated
func (*GetGameReply) Descriptor() ([]byte, []int)
Deprecated: Use GetGameReply.ProtoReflect.Descriptor instead.
func (*GetGameReply) GetAge ¶
func (x *GetGameReply) GetAge() int32
func (*GetGameReply) GetId ¶
func (x *GetGameReply) GetId() uint64
func (*GetGameReply) GetName ¶
func (x *GetGameReply) GetName() string
func (*GetGameReply) ProtoMessage ¶
func (*GetGameReply) ProtoMessage()
func (*GetGameReply) ProtoReflect ¶
func (x *GetGameReply) ProtoReflect() protoreflect.Message
func (*GetGameReply) Reset ¶
func (x *GetGameReply) Reset()
func (*GetGameReply) String ¶
func (x *GetGameReply) String() string
func (*GetGameReply) Validate ¶
func (m *GetGameReply) Validate() error
Validate checks the field values on GetGameReply 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 (*GetGameReply) ValidateAll ¶
func (m *GetGameReply) ValidateAll() error
ValidateAll checks the field values on GetGameReply 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 GetGameReplyMultiError, or nil if none found.
type GetGameReplyMultiError ¶
type GetGameReplyMultiError []error
GetGameReplyMultiError is an error wrapping multiple validation errors returned by GetGameReply.ValidateAll() if the designated constraints aren't met.
func (GetGameReplyMultiError) AllErrors ¶
func (m GetGameReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetGameReplyMultiError) Error ¶
func (m GetGameReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetGameReplyValidationError ¶
type GetGameReplyValidationError struct {
// contains filtered or unexported fields
}
GetGameReplyValidationError is the validation error returned by GetGameReply.Validate if the designated constraints aren't met.
func (GetGameReplyValidationError) Cause ¶
func (e GetGameReplyValidationError) Cause() error
Cause function returns cause value.
func (GetGameReplyValidationError) Error ¶
func (e GetGameReplyValidationError) Error() string
Error satisfies the builtin error interface
func (GetGameReplyValidationError) ErrorName ¶
func (e GetGameReplyValidationError) ErrorName() string
ErrorName returns error name.
func (GetGameReplyValidationError) Field ¶
func (e GetGameReplyValidationError) Field() string
Field function returns field value.
func (GetGameReplyValidationError) Key ¶
func (e GetGameReplyValidationError) Key() bool
Key function returns key value.
func (GetGameReplyValidationError) Reason ¶
func (e GetGameReplyValidationError) Reason() string
Reason function returns reason value.
type GetGameRequest ¶
type GetGameRequest struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*GetGameRequest) Descriptor
deprecated
func (*GetGameRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetGameRequest.ProtoReflect.Descriptor instead.
func (*GetGameRequest) GetId ¶
func (x *GetGameRequest) GetId() uint64
func (*GetGameRequest) ProtoMessage ¶
func (*GetGameRequest) ProtoMessage()
func (*GetGameRequest) ProtoReflect ¶
func (x *GetGameRequest) ProtoReflect() protoreflect.Message
func (*GetGameRequest) Reset ¶
func (x *GetGameRequest) Reset()
func (*GetGameRequest) String ¶
func (x *GetGameRequest) String() string
func (*GetGameRequest) Validate ¶
func (m *GetGameRequest) Validate() error
Validate checks the field values on GetGameRequest 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 (*GetGameRequest) ValidateAll ¶
func (m *GetGameRequest) ValidateAll() error
ValidateAll checks the field values on GetGameRequest 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 GetGameRequestMultiError, or nil if none found.
type GetGameRequestMultiError ¶
type GetGameRequestMultiError []error
GetGameRequestMultiError is an error wrapping multiple validation errors returned by GetGameRequest.ValidateAll() if the designated constraints aren't met.
func (GetGameRequestMultiError) AllErrors ¶
func (m GetGameRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetGameRequestMultiError) Error ¶
func (m GetGameRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetGameRequestValidationError ¶
type GetGameRequestValidationError struct {
// contains filtered or unexported fields
}
GetGameRequestValidationError is the validation error returned by GetGameRequest.Validate if the designated constraints aren't met.
func (GetGameRequestValidationError) Cause ¶
func (e GetGameRequestValidationError) Cause() error
Cause function returns cause value.
func (GetGameRequestValidationError) Error ¶
func (e GetGameRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetGameRequestValidationError) ErrorName ¶
func (e GetGameRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetGameRequestValidationError) Field ¶
func (e GetGameRequestValidationError) Field() string
Field function returns field value.
func (GetGameRequestValidationError) Key ¶
func (e GetGameRequestValidationError) Key() bool
Key function returns key value.
func (GetGameRequestValidationError) Reason ¶
func (e GetGameRequestValidationError) Reason() string
Reason function returns reason value.
type IdempotentReply ¶
type IdempotentReply struct {
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
// contains filtered or unexported fields
}
func (*IdempotentReply) Descriptor
deprecated
func (*IdempotentReply) Descriptor() ([]byte, []int)
Deprecated: Use IdempotentReply.ProtoReflect.Descriptor instead.
func (*IdempotentReply) GetToken ¶
func (x *IdempotentReply) GetToken() string
func (*IdempotentReply) ProtoMessage ¶
func (*IdempotentReply) ProtoMessage()
func (*IdempotentReply) ProtoReflect ¶
func (x *IdempotentReply) ProtoReflect() protoreflect.Message
func (*IdempotentReply) Reset ¶
func (x *IdempotentReply) Reset()
func (*IdempotentReply) String ¶
func (x *IdempotentReply) String() string
func (*IdempotentReply) Validate ¶
func (m *IdempotentReply) Validate() error
Validate checks the field values on IdempotentReply 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 (*IdempotentReply) ValidateAll ¶
func (m *IdempotentReply) ValidateAll() error
ValidateAll checks the field values on IdempotentReply 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 IdempotentReplyMultiError, or nil if none found.
type IdempotentReplyMultiError ¶
type IdempotentReplyMultiError []error
IdempotentReplyMultiError is an error wrapping multiple validation errors returned by IdempotentReply.ValidateAll() if the designated constraints aren't met.
func (IdempotentReplyMultiError) AllErrors ¶
func (m IdempotentReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IdempotentReplyMultiError) Error ¶
func (m IdempotentReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IdempotentReplyValidationError ¶
type IdempotentReplyValidationError struct {
// contains filtered or unexported fields
}
IdempotentReplyValidationError is the validation error returned by IdempotentReply.Validate if the designated constraints aren't met.
func (IdempotentReplyValidationError) Cause ¶
func (e IdempotentReplyValidationError) Cause() error
Cause function returns cause value.
func (IdempotentReplyValidationError) Error ¶
func (e IdempotentReplyValidationError) Error() string
Error satisfies the builtin error interface
func (IdempotentReplyValidationError) ErrorName ¶
func (e IdempotentReplyValidationError) ErrorName() string
ErrorName returns error name.
func (IdempotentReplyValidationError) Field ¶
func (e IdempotentReplyValidationError) Field() string
Field function returns field value.
func (IdempotentReplyValidationError) Key ¶
func (e IdempotentReplyValidationError) Key() bool
Key function returns key value.
func (IdempotentReplyValidationError) Reason ¶
func (e IdempotentReplyValidationError) Reason() string
Reason function returns reason value.
type IdsRequest ¶
type IdsRequest struct {
Ids string `protobuf:"bytes,1,opt,name=ids,proto3" json:"ids,omitempty"`
// contains filtered or unexported fields
}
func (*IdsRequest) Descriptor
deprecated
func (*IdsRequest) Descriptor() ([]byte, []int)
Deprecated: Use IdsRequest.ProtoReflect.Descriptor instead.
func (*IdsRequest) GetIds ¶
func (x *IdsRequest) GetIds() string
func (*IdsRequest) ProtoMessage ¶
func (*IdsRequest) ProtoMessage()
func (*IdsRequest) ProtoReflect ¶
func (x *IdsRequest) ProtoReflect() protoreflect.Message
func (*IdsRequest) Reset ¶
func (x *IdsRequest) Reset()
func (*IdsRequest) String ¶
func (x *IdsRequest) String() string
func (*IdsRequest) Validate ¶
func (m *IdsRequest) Validate() error
Validate checks the field values on IdsRequest 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 (*IdsRequest) ValidateAll ¶
func (m *IdsRequest) ValidateAll() error
ValidateAll checks the field values on IdsRequest 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 IdsRequestMultiError, or nil if none found.
type IdsRequestMultiError ¶
type IdsRequestMultiError []error
IdsRequestMultiError is an error wrapping multiple validation errors returned by IdsRequest.ValidateAll() if the designated constraints aren't met.
func (IdsRequestMultiError) AllErrors ¶
func (m IdsRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IdsRequestMultiError) Error ¶
func (m IdsRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IdsRequestValidationError ¶
type IdsRequestValidationError struct {
// contains filtered or unexported fields
}
IdsRequestValidationError is the validation error returned by IdsRequest.Validate if the designated constraints aren't met.
func (IdsRequestValidationError) Cause ¶
func (e IdsRequestValidationError) Cause() error
Cause function returns cause value.
func (IdsRequestValidationError) Error ¶
func (e IdsRequestValidationError) Error() string
Error satisfies the builtin error interface
func (IdsRequestValidationError) ErrorName ¶
func (e IdsRequestValidationError) ErrorName() string
ErrorName returns error name.
func (IdsRequestValidationError) Field ¶
func (e IdsRequestValidationError) Field() string
Field function returns field value.
func (IdsRequestValidationError) Key ¶
func (e IdsRequestValidationError) Key() bool
Key function returns key value.
func (IdsRequestValidationError) Reason ¶
func (e IdsRequestValidationError) Reason() string
Reason function returns reason value.
type Page ¶
type Page struct {
Num uint64 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"`
Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
Total int64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"`
Disable bool `protobuf:"varint,4,opt,name=disable,proto3" json:"disable,omitempty"`
// contains filtered or unexported fields
}
func (*Page) Descriptor
deprecated
func (*Page) GetDisable ¶
func (*Page) ProtoMessage ¶
func (*Page) ProtoMessage()
func (*Page) ProtoReflect ¶
func (x *Page) ProtoReflect() protoreflect.Message
func (*Page) Validate ¶
Validate checks the field values on Page 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 (*Page) ValidateAll ¶
ValidateAll checks the field values on Page 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 PageMultiError, or nil if none found.
type PageMultiError ¶
type PageMultiError []error
PageMultiError is an error wrapping multiple validation errors returned by Page.ValidateAll() if the designated constraints aren't met.
func (PageMultiError) AllErrors ¶
func (m PageMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PageMultiError) Error ¶
func (m PageMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PageValidationError ¶
type PageValidationError struct {
// contains filtered or unexported fields
}
PageValidationError is the validation error returned by Page.Validate if the designated constraints aren't met.
func (PageValidationError) Cause ¶
func (e PageValidationError) Cause() error
Cause function returns cause value.
func (PageValidationError) Error ¶
func (e PageValidationError) Error() string
Error satisfies the builtin error interface
func (PageValidationError) ErrorName ¶
func (e PageValidationError) ErrorName() string
ErrorName returns error name.
func (PageValidationError) Field ¶
func (e PageValidationError) Field() string
Field function returns field value.
func (PageValidationError) Key ¶
func (e PageValidationError) Key() bool
Key function returns key value.
func (PageValidationError) Reason ¶
func (e PageValidationError) Reason() string
Reason function returns reason value.
type UnimplementedGameServer ¶
type UnimplementedGameServer struct {
}
UnimplementedGameServer must be embedded to have forward compatible implementations.
func (UnimplementedGameServer) CreateGame ¶
func (UnimplementedGameServer) CreateGame(context.Context, *CreateGameRequest) (*emptypb.Empty, error)
func (UnimplementedGameServer) DeleteGame ¶
func (UnimplementedGameServer) DeleteGame(context.Context, *IdsRequest) (*emptypb.Empty, error)
func (UnimplementedGameServer) FindGame ¶
func (UnimplementedGameServer) FindGame(context.Context, *FindGameRequest) (*FindGameReply, error)
func (UnimplementedGameServer) GetGame ¶
func (UnimplementedGameServer) GetGame(context.Context, *GetGameRequest) (*GetGameReply, error)
func (UnimplementedGameServer) Idempotent ¶
func (UnimplementedGameServer) Idempotent(context.Context, *emptypb.Empty) (*IdempotentReply, error)
func (UnimplementedGameServer) UpdateGame ¶
func (UnimplementedGameServer) UpdateGame(context.Context, *UpdateGameRequest) (*emptypb.Empty, 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.
type UpdateGameRequest ¶
type UpdateGameRequest struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` // the name of string must be between 2 and 50 character
Age *int32 `protobuf:"varint,3,opt,name=age,proto3,oneof" json:"age,omitempty"` // the age of int32 must be >= 0
// contains filtered or unexported fields
}
func (*UpdateGameRequest) Descriptor
deprecated
func (*UpdateGameRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateGameRequest.ProtoReflect.Descriptor instead.
func (*UpdateGameRequest) GetAge ¶
func (x *UpdateGameRequest) GetAge() int32
func (*UpdateGameRequest) GetId ¶
func (x *UpdateGameRequest) GetId() uint64
func (*UpdateGameRequest) GetName ¶
func (x *UpdateGameRequest) GetName() string
func (*UpdateGameRequest) ProtoMessage ¶
func (*UpdateGameRequest) ProtoMessage()
func (*UpdateGameRequest) ProtoReflect ¶
func (x *UpdateGameRequest) ProtoReflect() protoreflect.Message
func (*UpdateGameRequest) Reset ¶
func (x *UpdateGameRequest) Reset()
func (*UpdateGameRequest) String ¶
func (x *UpdateGameRequest) String() string
func (*UpdateGameRequest) Validate ¶
func (m *UpdateGameRequest) Validate() error
Validate checks the field values on UpdateGameRequest 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 (*UpdateGameRequest) ValidateAll ¶
func (m *UpdateGameRequest) ValidateAll() error
ValidateAll checks the field values on UpdateGameRequest 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 UpdateGameRequestMultiError, or nil if none found.
type UpdateGameRequestMultiError ¶
type UpdateGameRequestMultiError []error
UpdateGameRequestMultiError is an error wrapping multiple validation errors returned by UpdateGameRequest.ValidateAll() if the designated constraints aren't met.
func (UpdateGameRequestMultiError) AllErrors ¶
func (m UpdateGameRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateGameRequestMultiError) Error ¶
func (m UpdateGameRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateGameRequestValidationError ¶
type UpdateGameRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateGameRequestValidationError is the validation error returned by UpdateGameRequest.Validate if the designated constraints aren't met.
func (UpdateGameRequestValidationError) Cause ¶
func (e UpdateGameRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateGameRequestValidationError) Error ¶
func (e UpdateGameRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateGameRequestValidationError) ErrorName ¶
func (e UpdateGameRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateGameRequestValidationError) Field ¶
func (e UpdateGameRequestValidationError) Field() string
Field function returns field value.
func (UpdateGameRequestValidationError) Key ¶
func (e UpdateGameRequestValidationError) Key() bool
Key function returns key value.
func (UpdateGameRequestValidationError) Reason ¶
func (e UpdateGameRequestValidationError) Reason() string
Reason function returns reason value.