Documentation ¶
Overview ¶
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterGamesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterGamesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GamesClient) error
- func RegisterGamesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterGamesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GamesServer) error
- func RegisterGamesServer(s grpc.ServiceRegistrar, srv GamesServer)
- func RegisterUsersHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUsersHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UsersClient) error
- func RegisterUsersHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUsersHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UsersServer) error
- func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)
- type CreateGame
- type CreateGame_Request
- func (*CreateGame_Request) Descriptor() ([]byte, []int)deprecated
- func (x *CreateGame_Request) GetPlayers() []string
- func (*CreateGame_Request) ProtoMessage()
- func (x *CreateGame_Request) ProtoReflect() protoreflect.Message
- func (x *CreateGame_Request) Reset()
- func (x *CreateGame_Request) String() string
- type CreateGame_Response
- type Game
- func (*Game) Descriptor() ([]byte, []int)deprecated
- func (x *Game) GetAwaitsInput() bool
- func (x *Game) GetCreatedAt() *timestamppb.Timestamp
- func (x *Game) GetExpiresAt() *timestamppb.Timestamp
- func (x *Game) GetPlayUrl() string
- func (x *Game) GetPlayersCount() int32
- func (*Game) ProtoMessage()
- func (x *Game) ProtoReflect() protoreflect.Message
- func (x *Game) Reset()
- func (x *Game) String() string
- type GamesClient
- type GamesServer
- type GetGames
- type GetGames_Request
- type GetGames_Response
- type GetMe
- type GetMe_Request
- type GetMe_Response
- type Login
- type Login_Request
- type Login_Response
- type PlayerColor
- func (PlayerColor) Descriptor() protoreflect.EnumDescriptor
- func (x PlayerColor) Enum() *PlayerColor
- func (PlayerColor) EnumDescriptor() ([]byte, []int)deprecated
- func (x PlayerColor) Number() protoreflect.EnumNumber
- func (x PlayerColor) String() string
- func (PlayerColor) Type() protoreflect.EnumType
- type SearchUser
- type SearchUser_Request
- func (*SearchUser_Request) Descriptor() ([]byte, []int)deprecated
- func (x *SearchUser_Request) GetSearch() string
- func (*SearchUser_Request) ProtoMessage()
- func (x *SearchUser_Request) ProtoReflect() protoreflect.Message
- func (x *SearchUser_Request) Reset()
- func (x *SearchUser_Request) String() string
- type SearchUser_Response
- func (*SearchUser_Response) Descriptor() ([]byte, []int)deprecated
- func (x *SearchUser_Response) GetUsers() []*User
- func (*SearchUser_Response) ProtoMessage()
- func (x *SearchUser_Response) ProtoReflect() protoreflect.Message
- func (x *SearchUser_Response) Reset()
- func (x *SearchUser_Response) String() string
- type UnimplementedGamesServer
- type UnimplementedUsersServer
- func (UnimplementedUsersServer) GetMe(context.Context, *GetMe_Request) (*GetMe_Response, error)
- func (UnimplementedUsersServer) Login(context.Context, *Login_Request) (*Login_Response, error)
- func (UnimplementedUsersServer) SearchUser(context.Context, *SearchUser_Request) (*SearchUser_Response, error)
- func (UnimplementedUsersServer) UpdateDeviceToken(context.Context, *UpdateDeviceToken_Request) (*UpdateDeviceToken_Response, error)
- func (UnimplementedUsersServer) UpdateMe(context.Context, *UpdateMe_Request) (*UpdateMe_Response, error)
- type UnsafeGamesServer
- type UnsafeUsersServer
- type UpdateDeviceToken
- type UpdateDeviceToken_Request
- func (*UpdateDeviceToken_Request) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateDeviceToken_Request) GetDeviceToken() []byte
- func (*UpdateDeviceToken_Request) ProtoMessage()
- func (x *UpdateDeviceToken_Request) ProtoReflect() protoreflect.Message
- func (x *UpdateDeviceToken_Request) Reset()
- func (x *UpdateDeviceToken_Request) String() string
- type UpdateDeviceToken_Response
- type UpdateMe
- type UpdateMe_Request
- func (*UpdateMe_Request) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateMe_Request) GetColor() PlayerColor
- func (x *UpdateMe_Request) GetNickname() string
- func (*UpdateMe_Request) ProtoMessage()
- func (x *UpdateMe_Request) ProtoReflect() protoreflect.Message
- func (x *UpdateMe_Request) Reset()
- func (x *UpdateMe_Request) String() string
- type UpdateMe_Response
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetColor() PlayerColor
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetId() string
- func (x *User) GetNickname() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UsersClient
- type UsersServer
Constants ¶
const ( Users_Login_FullMethodName = "/api.Users/Login" Users_GetMe_FullMethodName = "/api.Users/GetMe" Users_UpdateMe_FullMethodName = "/api.Users/UpdateMe" Users_UpdateDeviceToken_FullMethodName = "/api.Users/UpdateDeviceToken" Users_SearchUser_FullMethodName = "/api.Users/SearchUser" )
const ( Games_CreateGame_FullMethodName = "/api.Games/CreateGame" Games_GetGames_FullMethodName = "/api.Games/GetGames" )
Variables ¶
var ( PlayerColor_name = map[int32]string{ 0: "BLUE", 1: "RED", 2: "YELLOW", 3: "GREEN", 4: "BLACK", 5: "PURPLE", 6: "ORANGE", 7: "PINK", 8: "BRONZE", } PlayerColor_value = map[string]int32{ "BLUE": 0, "RED": 1, "YELLOW": 2, "GREEN": 3, "BLACK": 4, "PURPLE": 5, "ORANGE": 6, "PINK": 7, "BRONZE": 8, } )
Enum value maps for PlayerColor.
var File_pkg_api_services_proto protoreflect.FileDescriptor
var File_pkg_api_user_proto protoreflect.FileDescriptor
var Games_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.Games", HandlerType: (*GamesServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateGame", Handler: _Games_CreateGame_Handler, }, { MethodName: "GetGames", Handler: _Games_GetGames_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/api/services.proto", }
Games_ServiceDesc is the grpc.ServiceDesc for Games service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var SwaggerJson []byte
var Users_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.Users", HandlerType: (*UsersServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _Users_Login_Handler, }, { MethodName: "GetMe", Handler: _Users_GetMe_Handler, }, { MethodName: "UpdateMe", Handler: _Users_UpdateMe_Handler, }, { MethodName: "UpdateDeviceToken", Handler: _Users_UpdateDeviceToken_Handler, }, { MethodName: "SearchUser", Handler: _Users_SearchUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/api/services.proto", }
Users_ServiceDesc is the grpc.ServiceDesc for Users service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGamesHandler ¶ added in v0.2.0
RegisterGamesHandler registers the http handlers for service Games to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterGamesHandlerClient ¶ added in v0.2.0
func RegisterGamesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GamesClient) error
RegisterGamesHandlerClient registers the http handlers for service Games to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GamesClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GamesClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GamesClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterGamesHandlerFromEndpoint ¶ added in v0.2.0
func RegisterGamesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterGamesHandlerFromEndpoint is same as RegisterGamesHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterGamesHandlerServer ¶ added in v0.2.0
func RegisterGamesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GamesServer) error
RegisterGamesHandlerServer registers the http handlers for service Games to "mux". UnaryRPC :call GamesServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGamesHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterGamesServer ¶ added in v0.2.0
func RegisterGamesServer(s grpc.ServiceRegistrar, srv GamesServer)
func RegisterUsersHandler ¶
RegisterUsersHandler registers the http handlers for service Users to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUsersHandlerClient ¶
func RegisterUsersHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UsersClient) error
RegisterUsersHandlerClient registers the http handlers for service Users to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UsersClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UsersClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UsersClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterUsersHandlerFromEndpoint ¶
func RegisterUsersHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUsersHandlerFromEndpoint is same as RegisterUsersHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUsersHandlerServer ¶
func RegisterUsersHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UsersServer) error
RegisterUsersHandlerServer registers the http handlers for service Users to "mux". UnaryRPC :call UsersServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUsersHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterUsersServer ¶
func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)
Types ¶
type CreateGame ¶ added in v0.2.0
type CreateGame struct {
// contains filtered or unexported fields
}
func (*CreateGame) Descriptor
deprecated
added in
v0.2.0
func (*CreateGame) Descriptor() ([]byte, []int)
Deprecated: Use CreateGame.ProtoReflect.Descriptor instead.
func (*CreateGame) ProtoMessage ¶ added in v0.2.0
func (*CreateGame) ProtoMessage()
func (*CreateGame) ProtoReflect ¶ added in v0.2.0
func (x *CreateGame) ProtoReflect() protoreflect.Message
func (*CreateGame) Reset ¶ added in v0.2.0
func (x *CreateGame) Reset()
func (*CreateGame) String ¶ added in v0.2.0
func (x *CreateGame) String() string
type CreateGame_Request ¶ added in v0.2.0
type CreateGame_Request struct { Players []string `protobuf:"bytes,1,rep,name=players,proto3" json:"players,omitempty"` // contains filtered or unexported fields }
func (*CreateGame_Request) Descriptor
deprecated
added in
v0.2.0
func (*CreateGame_Request) Descriptor() ([]byte, []int)
Deprecated: Use CreateGame_Request.ProtoReflect.Descriptor instead.
func (*CreateGame_Request) GetPlayers ¶ added in v0.2.0
func (x *CreateGame_Request) GetPlayers() []string
func (*CreateGame_Request) ProtoMessage ¶ added in v0.2.0
func (*CreateGame_Request) ProtoMessage()
func (*CreateGame_Request) ProtoReflect ¶ added in v0.2.0
func (x *CreateGame_Request) ProtoReflect() protoreflect.Message
func (*CreateGame_Request) Reset ¶ added in v0.2.0
func (x *CreateGame_Request) Reset()
func (*CreateGame_Request) String ¶ added in v0.2.0
func (x *CreateGame_Request) String() string
type CreateGame_Response ¶ added in v0.2.0
type CreateGame_Response struct {
// contains filtered or unexported fields
}
func (*CreateGame_Response) Descriptor
deprecated
added in
v0.2.0
func (*CreateGame_Response) Descriptor() ([]byte, []int)
Deprecated: Use CreateGame_Response.ProtoReflect.Descriptor instead.
func (*CreateGame_Response) ProtoMessage ¶ added in v0.2.0
func (*CreateGame_Response) ProtoMessage()
func (*CreateGame_Response) ProtoReflect ¶ added in v0.2.0
func (x *CreateGame_Response) ProtoReflect() protoreflect.Message
func (*CreateGame_Response) Reset ¶ added in v0.2.0
func (x *CreateGame_Response) Reset()
func (*CreateGame_Response) String ¶ added in v0.2.0
func (x *CreateGame_Response) String() string
type Game ¶ added in v0.2.0
type Game struct { PlayUrl string `protobuf:"bytes,1,opt,name=play_url,json=playUrl,proto3" json:"play_url,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` PlayersCount int32 `protobuf:"varint,4,opt,name=players_count,json=playersCount,proto3" json:"players_count,omitempty"` AwaitsInput bool `protobuf:"varint,5,opt,name=awaits_input,json=awaitsInput,proto3" json:"awaits_input,omitempty"` // contains filtered or unexported fields }
func (*Game) Descriptor
deprecated
added in
v0.2.0
func (*Game) GetAwaitsInput ¶ added in v0.2.0
func (*Game) GetCreatedAt ¶ added in v0.2.0
func (x *Game) GetCreatedAt() *timestamppb.Timestamp
func (*Game) GetExpiresAt ¶ added in v0.2.0
func (x *Game) GetExpiresAt() *timestamppb.Timestamp
func (*Game) GetPlayUrl ¶ added in v0.2.0
func (*Game) GetPlayersCount ¶ added in v0.2.0
func (*Game) ProtoMessage ¶ added in v0.2.0
func (*Game) ProtoMessage()
func (*Game) ProtoReflect ¶ added in v0.2.0
func (x *Game) ProtoReflect() protoreflect.Message
type GamesClient ¶ added in v0.2.0
type GamesClient interface { CreateGame(ctx context.Context, in *CreateGame_Request, opts ...grpc.CallOption) (*CreateGame_Response, error) GetGames(ctx context.Context, in *GetGames_Request, opts ...grpc.CallOption) (*GetGames_Response, error) }
GamesClient is the client API for Games 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 NewGamesClient ¶ added in v0.2.0
func NewGamesClient(cc grpc.ClientConnInterface) GamesClient
type GamesServer ¶ added in v0.2.0
type GamesServer interface { CreateGame(context.Context, *CreateGame_Request) (*CreateGame_Response, error) GetGames(context.Context, *GetGames_Request) (*GetGames_Response, error) // contains filtered or unexported methods }
GamesServer is the server API for Games service. All implementations must embed UnimplementedGamesServer for forward compatibility
type GetGames ¶ added in v0.2.0
type GetGames struct {
// contains filtered or unexported fields
}
func (*GetGames) Descriptor
deprecated
added in
v0.2.0
func (*GetGames) ProtoMessage ¶ added in v0.2.0
func (*GetGames) ProtoMessage()
func (*GetGames) ProtoReflect ¶ added in v0.2.0
func (x *GetGames) ProtoReflect() protoreflect.Message
type GetGames_Request ¶ added in v0.2.0
type GetGames_Request struct {
// contains filtered or unexported fields
}
func (*GetGames_Request) Descriptor
deprecated
added in
v0.2.0
func (*GetGames_Request) Descriptor() ([]byte, []int)
Deprecated: Use GetGames_Request.ProtoReflect.Descriptor instead.
func (*GetGames_Request) ProtoMessage ¶ added in v0.2.0
func (*GetGames_Request) ProtoMessage()
func (*GetGames_Request) ProtoReflect ¶ added in v0.2.0
func (x *GetGames_Request) ProtoReflect() protoreflect.Message
func (*GetGames_Request) Reset ¶ added in v0.2.0
func (x *GetGames_Request) Reset()
func (*GetGames_Request) String ¶ added in v0.2.0
func (x *GetGames_Request) String() string
type GetGames_Response ¶ added in v0.2.0
type GetGames_Response struct { Games []*Game `protobuf:"bytes,1,rep,name=games,proto3" json:"games,omitempty"` // contains filtered or unexported fields }
func (*GetGames_Response) Descriptor
deprecated
added in
v0.2.0
func (*GetGames_Response) Descriptor() ([]byte, []int)
Deprecated: Use GetGames_Response.ProtoReflect.Descriptor instead.
func (*GetGames_Response) GetGames ¶ added in v0.2.0
func (x *GetGames_Response) GetGames() []*Game
func (*GetGames_Response) ProtoMessage ¶ added in v0.2.0
func (*GetGames_Response) ProtoMessage()
func (*GetGames_Response) ProtoReflect ¶ added in v0.2.0
func (x *GetGames_Response) ProtoReflect() protoreflect.Message
func (*GetGames_Response) Reset ¶ added in v0.2.0
func (x *GetGames_Response) Reset()
func (*GetGames_Response) String ¶ added in v0.2.0
func (x *GetGames_Response) String() string
type GetMe ¶ added in v0.0.4
type GetMe struct {
// contains filtered or unexported fields
}
func (*GetMe) Descriptor
deprecated
added in
v0.0.4
func (*GetMe) ProtoMessage ¶ added in v0.0.4
func (*GetMe) ProtoMessage()
func (*GetMe) ProtoReflect ¶ added in v0.0.4
func (x *GetMe) ProtoReflect() protoreflect.Message
type GetMe_Request ¶ added in v0.0.4
type GetMe_Request struct {
// contains filtered or unexported fields
}
func (*GetMe_Request) Descriptor
deprecated
added in
v0.0.4
func (*GetMe_Request) Descriptor() ([]byte, []int)
Deprecated: Use GetMe_Request.ProtoReflect.Descriptor instead.
func (*GetMe_Request) ProtoMessage ¶ added in v0.0.4
func (*GetMe_Request) ProtoMessage()
func (*GetMe_Request) ProtoReflect ¶ added in v0.0.4
func (x *GetMe_Request) ProtoReflect() protoreflect.Message
func (*GetMe_Request) Reset ¶ added in v0.0.4
func (x *GetMe_Request) Reset()
func (*GetMe_Request) String ¶ added in v0.0.4
func (x *GetMe_Request) String() string
type GetMe_Response ¶ added in v0.0.4
type GetMe_Response struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*GetMe_Response) Descriptor
deprecated
added in
v0.0.4
func (*GetMe_Response) Descriptor() ([]byte, []int)
Deprecated: Use GetMe_Response.ProtoReflect.Descriptor instead.
func (*GetMe_Response) GetUser ¶ added in v0.1.0
func (x *GetMe_Response) GetUser() *User
func (*GetMe_Response) ProtoMessage ¶ added in v0.0.4
func (*GetMe_Response) ProtoMessage()
func (*GetMe_Response) ProtoReflect ¶ added in v0.0.4
func (x *GetMe_Response) ProtoReflect() protoreflect.Message
func (*GetMe_Response) Reset ¶ added in v0.0.4
func (x *GetMe_Response) Reset()
func (*GetMe_Response) String ¶ added in v0.0.4
func (x *GetMe_Response) String() string
type Login ¶
type Login struct {
// contains filtered or unexported fields
}
func (*Login) Descriptor
deprecated
func (*Login) ProtoMessage ¶
func (*Login) ProtoMessage()
func (*Login) ProtoReflect ¶
func (x *Login) ProtoReflect() protoreflect.Message
type Login_Request ¶
type Login_Request struct {
// contains filtered or unexported fields
}
func (*Login_Request) Descriptor
deprecated
func (*Login_Request) Descriptor() ([]byte, []int)
Deprecated: Use Login_Request.ProtoReflect.Descriptor instead.
func (*Login_Request) ProtoMessage ¶
func (*Login_Request) ProtoMessage()
func (*Login_Request) ProtoReflect ¶
func (x *Login_Request) ProtoReflect() protoreflect.Message
func (*Login_Request) Reset ¶
func (x *Login_Request) Reset()
func (*Login_Request) String ¶
func (x *Login_Request) String() string
type Login_Response ¶
type Login_Response struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*Login_Response) Descriptor
deprecated
func (*Login_Response) Descriptor() ([]byte, []int)
Deprecated: Use Login_Response.ProtoReflect.Descriptor instead.
func (*Login_Response) GetUser ¶ added in v0.1.0
func (x *Login_Response) GetUser() *User
func (*Login_Response) ProtoMessage ¶
func (*Login_Response) ProtoMessage()
func (*Login_Response) ProtoReflect ¶
func (x *Login_Response) ProtoReflect() protoreflect.Message
func (*Login_Response) Reset ¶
func (x *Login_Response) Reset()
func (*Login_Response) String ¶
func (x *Login_Response) String() string
type PlayerColor ¶ added in v0.1.0
type PlayerColor int32
const ( PlayerColor_BLUE PlayerColor = 0 PlayerColor_RED PlayerColor = 1 PlayerColor_YELLOW PlayerColor = 2 PlayerColor_GREEN PlayerColor = 3 PlayerColor_BLACK PlayerColor = 4 PlayerColor_PURPLE PlayerColor = 5 PlayerColor_ORANGE PlayerColor = 6 PlayerColor_PINK PlayerColor = 7 PlayerColor_BRONZE PlayerColor = 8 )
func (PlayerColor) Descriptor ¶ added in v0.1.0
func (PlayerColor) Descriptor() protoreflect.EnumDescriptor
func (PlayerColor) Enum ¶ added in v0.1.0
func (x PlayerColor) Enum() *PlayerColor
func (PlayerColor) EnumDescriptor
deprecated
added in
v0.1.0
func (PlayerColor) EnumDescriptor() ([]byte, []int)
Deprecated: Use PlayerColor.Descriptor instead.
func (PlayerColor) Number ¶ added in v0.1.0
func (x PlayerColor) Number() protoreflect.EnumNumber
func (PlayerColor) String ¶ added in v0.1.0
func (x PlayerColor) String() string
func (PlayerColor) Type ¶ added in v0.1.0
func (PlayerColor) Type() protoreflect.EnumType
type SearchUser ¶ added in v0.1.0
type SearchUser struct {
// contains filtered or unexported fields
}
func (*SearchUser) Descriptor
deprecated
added in
v0.1.0
func (*SearchUser) Descriptor() ([]byte, []int)
Deprecated: Use SearchUser.ProtoReflect.Descriptor instead.
func (*SearchUser) ProtoMessage ¶ added in v0.1.0
func (*SearchUser) ProtoMessage()
func (*SearchUser) ProtoReflect ¶ added in v0.1.0
func (x *SearchUser) ProtoReflect() protoreflect.Message
func (*SearchUser) Reset ¶ added in v0.1.0
func (x *SearchUser) Reset()
func (*SearchUser) String ¶ added in v0.1.0
func (x *SearchUser) String() string
type SearchUser_Request ¶ added in v0.1.0
type SearchUser_Request struct { Search string `protobuf:"bytes,1,opt,name=search,proto3" json:"search,omitempty"` // contains filtered or unexported fields }
func (*SearchUser_Request) Descriptor
deprecated
added in
v0.1.0
func (*SearchUser_Request) Descriptor() ([]byte, []int)
Deprecated: Use SearchUser_Request.ProtoReflect.Descriptor instead.
func (*SearchUser_Request) GetSearch ¶ added in v0.1.0
func (x *SearchUser_Request) GetSearch() string
func (*SearchUser_Request) ProtoMessage ¶ added in v0.1.0
func (*SearchUser_Request) ProtoMessage()
func (*SearchUser_Request) ProtoReflect ¶ added in v0.1.0
func (x *SearchUser_Request) ProtoReflect() protoreflect.Message
func (*SearchUser_Request) Reset ¶ added in v0.1.0
func (x *SearchUser_Request) Reset()
func (*SearchUser_Request) String ¶ added in v0.1.0
func (x *SearchUser_Request) String() string
type SearchUser_Response ¶ added in v0.1.0
type SearchUser_Response struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*SearchUser_Response) Descriptor
deprecated
added in
v0.1.0
func (*SearchUser_Response) Descriptor() ([]byte, []int)
Deprecated: Use SearchUser_Response.ProtoReflect.Descriptor instead.
func (*SearchUser_Response) GetUsers ¶ added in v0.1.0
func (x *SearchUser_Response) GetUsers() []*User
func (*SearchUser_Response) ProtoMessage ¶ added in v0.1.0
func (*SearchUser_Response) ProtoMessage()
func (*SearchUser_Response) ProtoReflect ¶ added in v0.1.0
func (x *SearchUser_Response) ProtoReflect() protoreflect.Message
func (*SearchUser_Response) Reset ¶ added in v0.1.0
func (x *SearchUser_Response) Reset()
func (*SearchUser_Response) String ¶ added in v0.1.0
func (x *SearchUser_Response) String() string
type UnimplementedGamesServer ¶ added in v0.2.0
type UnimplementedGamesServer struct { }
UnimplementedGamesServer must be embedded to have forward compatible implementations.
func (UnimplementedGamesServer) CreateGame ¶ added in v0.2.0
func (UnimplementedGamesServer) CreateGame(context.Context, *CreateGame_Request) (*CreateGame_Response, error)
func (UnimplementedGamesServer) GetGames ¶ added in v0.2.0
func (UnimplementedGamesServer) GetGames(context.Context, *GetGames_Request) (*GetGames_Response, error)
type UnimplementedUsersServer ¶
type UnimplementedUsersServer struct { }
UnimplementedUsersServer must be embedded to have forward compatible implementations.
func (UnimplementedUsersServer) GetMe ¶ added in v0.0.4
func (UnimplementedUsersServer) GetMe(context.Context, *GetMe_Request) (*GetMe_Response, error)
func (UnimplementedUsersServer) Login ¶
func (UnimplementedUsersServer) Login(context.Context, *Login_Request) (*Login_Response, error)
func (UnimplementedUsersServer) SearchUser ¶ added in v0.1.0
func (UnimplementedUsersServer) SearchUser(context.Context, *SearchUser_Request) (*SearchUser_Response, error)
func (UnimplementedUsersServer) UpdateDeviceToken ¶ added in v0.1.0
func (UnimplementedUsersServer) UpdateDeviceToken(context.Context, *UpdateDeviceToken_Request) (*UpdateDeviceToken_Response, error)
func (UnimplementedUsersServer) UpdateMe ¶ added in v0.0.4
func (UnimplementedUsersServer) UpdateMe(context.Context, *UpdateMe_Request) (*UpdateMe_Response, error)
type UnsafeGamesServer ¶ added in v0.2.0
type UnsafeGamesServer interface {
// contains filtered or unexported methods
}
UnsafeGamesServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GamesServer will result in compilation errors.
type UnsafeUsersServer ¶
type UnsafeUsersServer interface {
// contains filtered or unexported methods
}
UnsafeUsersServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UsersServer will result in compilation errors.
type UpdateDeviceToken ¶ added in v0.1.0
type UpdateDeviceToken struct {
// contains filtered or unexported fields
}
func (*UpdateDeviceToken) Descriptor
deprecated
added in
v0.1.0
func (*UpdateDeviceToken) Descriptor() ([]byte, []int)
Deprecated: Use UpdateDeviceToken.ProtoReflect.Descriptor instead.
func (*UpdateDeviceToken) ProtoMessage ¶ added in v0.1.0
func (*UpdateDeviceToken) ProtoMessage()
func (*UpdateDeviceToken) ProtoReflect ¶ added in v0.1.0
func (x *UpdateDeviceToken) ProtoReflect() protoreflect.Message
func (*UpdateDeviceToken) Reset ¶ added in v0.1.0
func (x *UpdateDeviceToken) Reset()
func (*UpdateDeviceToken) String ¶ added in v0.1.0
func (x *UpdateDeviceToken) String() string
type UpdateDeviceToken_Request ¶ added in v0.1.0
type UpdateDeviceToken_Request struct { DeviceToken []byte `protobuf:"bytes,1,opt,name=device_token,json=deviceToken,proto3" json:"device_token,omitempty"` // contains filtered or unexported fields }
func (*UpdateDeviceToken_Request) Descriptor
deprecated
added in
v0.1.0
func (*UpdateDeviceToken_Request) Descriptor() ([]byte, []int)
Deprecated: Use UpdateDeviceToken_Request.ProtoReflect.Descriptor instead.
func (*UpdateDeviceToken_Request) GetDeviceToken ¶ added in v0.1.0
func (x *UpdateDeviceToken_Request) GetDeviceToken() []byte
func (*UpdateDeviceToken_Request) ProtoMessage ¶ added in v0.1.0
func (*UpdateDeviceToken_Request) ProtoMessage()
func (*UpdateDeviceToken_Request) ProtoReflect ¶ added in v0.1.0
func (x *UpdateDeviceToken_Request) ProtoReflect() protoreflect.Message
func (*UpdateDeviceToken_Request) Reset ¶ added in v0.1.0
func (x *UpdateDeviceToken_Request) Reset()
func (*UpdateDeviceToken_Request) String ¶ added in v0.1.0
func (x *UpdateDeviceToken_Request) String() string
type UpdateDeviceToken_Response ¶ added in v0.1.0
type UpdateDeviceToken_Response struct {
// contains filtered or unexported fields
}
func (*UpdateDeviceToken_Response) Descriptor
deprecated
added in
v0.1.0
func (*UpdateDeviceToken_Response) Descriptor() ([]byte, []int)
Deprecated: Use UpdateDeviceToken_Response.ProtoReflect.Descriptor instead.
func (*UpdateDeviceToken_Response) ProtoMessage ¶ added in v0.1.0
func (*UpdateDeviceToken_Response) ProtoMessage()
func (*UpdateDeviceToken_Response) ProtoReflect ¶ added in v0.1.0
func (x *UpdateDeviceToken_Response) ProtoReflect() protoreflect.Message
func (*UpdateDeviceToken_Response) Reset ¶ added in v0.1.0
func (x *UpdateDeviceToken_Response) Reset()
func (*UpdateDeviceToken_Response) String ¶ added in v0.1.0
func (x *UpdateDeviceToken_Response) String() string
type UpdateMe ¶ added in v0.0.4
type UpdateMe struct {
// contains filtered or unexported fields
}
func (*UpdateMe) Descriptor
deprecated
added in
v0.0.4
func (*UpdateMe) ProtoMessage ¶ added in v0.0.4
func (*UpdateMe) ProtoMessage()
func (*UpdateMe) ProtoReflect ¶ added in v0.0.4
func (x *UpdateMe) ProtoReflect() protoreflect.Message
type UpdateMe_Request ¶ added in v0.0.4
type UpdateMe_Request struct { Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"` Color PlayerColor `protobuf:"varint,2,opt,name=color,proto3,enum=api.PlayerColor" json:"color,omitempty"` // contains filtered or unexported fields }
func (*UpdateMe_Request) Descriptor
deprecated
added in
v0.0.4
func (*UpdateMe_Request) Descriptor() ([]byte, []int)
Deprecated: Use UpdateMe_Request.ProtoReflect.Descriptor instead.
func (*UpdateMe_Request) GetColor ¶ added in v0.1.2
func (x *UpdateMe_Request) GetColor() PlayerColor
func (*UpdateMe_Request) GetNickname ¶ added in v0.0.4
func (x *UpdateMe_Request) GetNickname() string
func (*UpdateMe_Request) ProtoMessage ¶ added in v0.0.4
func (*UpdateMe_Request) ProtoMessage()
func (*UpdateMe_Request) ProtoReflect ¶ added in v0.0.4
func (x *UpdateMe_Request) ProtoReflect() protoreflect.Message
func (*UpdateMe_Request) Reset ¶ added in v0.0.4
func (x *UpdateMe_Request) Reset()
func (*UpdateMe_Request) String ¶ added in v0.0.4
func (x *UpdateMe_Request) String() string
type UpdateMe_Response ¶ added in v0.0.4
type UpdateMe_Response struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UpdateMe_Response) Descriptor
deprecated
added in
v0.0.4
func (*UpdateMe_Response) Descriptor() ([]byte, []int)
Deprecated: Use UpdateMe_Response.ProtoReflect.Descriptor instead.
func (*UpdateMe_Response) GetUser ¶ added in v0.1.0
func (x *UpdateMe_Response) GetUser() *User
func (*UpdateMe_Response) ProtoMessage ¶ added in v0.0.4
func (*UpdateMe_Response) ProtoMessage()
func (*UpdateMe_Response) ProtoReflect ¶ added in v0.0.4
func (x *UpdateMe_Response) ProtoReflect() protoreflect.Message
func (*UpdateMe_Response) Reset ¶ added in v0.0.4
func (x *UpdateMe_Response) Reset()
func (*UpdateMe_Response) String ¶ added in v0.0.4
func (x *UpdateMe_Response) String() string
type User ¶ added in v0.1.0
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` Color PlayerColor `protobuf:"varint,3,opt,name=color,proto3,enum=api.PlayerColor" json:"color,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
added in
v0.1.0
func (*User) GetColor ¶ added in v0.1.2
func (x *User) GetColor() PlayerColor
func (*User) GetCreatedAt ¶ added in v0.1.0
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetNickname ¶ added in v0.1.2
func (*User) ProtoMessage ¶ added in v0.1.0
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶ added in v0.1.0
func (x *User) ProtoReflect() protoreflect.Message
type UsersClient ¶
type UsersClient interface { Login(ctx context.Context, in *Login_Request, opts ...grpc.CallOption) (*Login_Response, error) GetMe(ctx context.Context, in *GetMe_Request, opts ...grpc.CallOption) (*GetMe_Response, error) UpdateMe(ctx context.Context, in *UpdateMe_Request, opts ...grpc.CallOption) (*UpdateMe_Response, error) UpdateDeviceToken(ctx context.Context, in *UpdateDeviceToken_Request, opts ...grpc.CallOption) (*UpdateDeviceToken_Response, error) SearchUser(ctx context.Context, in *SearchUser_Request, opts ...grpc.CallOption) (*SearchUser_Response, error) }
UsersClient is the client API for Users 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 NewUsersClient ¶
func NewUsersClient(cc grpc.ClientConnInterface) UsersClient
type UsersServer ¶
type UsersServer interface { Login(context.Context, *Login_Request) (*Login_Response, error) GetMe(context.Context, *GetMe_Request) (*GetMe_Response, error) UpdateMe(context.Context, *UpdateMe_Request) (*UpdateMe_Response, error) UpdateDeviceToken(context.Context, *UpdateDeviceToken_Request) (*UpdateDeviceToken_Response, error) SearchUser(context.Context, *SearchUser_Request) (*SearchUser_Response, error) // contains filtered or unexported methods }
UsersServer is the server API for Users service. All implementations must embed UnimplementedUsersServer for forward compatibility