Documentation ¶
Overview ¶
Package console is a generated protocol buffer package.
It is generated from these files:
console/console.proto
It has these top-level messages:
AccountExport AccountIdRequest AuthenticateRequest Session WalletLedger
Package console is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterConsoleHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterConsoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConsoleClient) error
- func RegisterConsoleHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterConsoleServer(s *grpc.Server, srv ConsoleServer)
- type AccountExport
- func (*AccountExport) Descriptor() ([]byte, []int)
- func (m *AccountExport) GetAccount() *nakama_api.Account
- func (m *AccountExport) GetFriends() []*nakama_api.Friend
- func (m *AccountExport) GetGroups() []*nakama_api.Group
- func (m *AccountExport) GetLeaderboardRecords() []*nakama_api.LeaderboardRecord
- func (m *AccountExport) GetMessages() []*nakama_api.ChannelMessage
- func (m *AccountExport) GetNotifications() []*nakama_api.Notification
- func (m *AccountExport) GetObjects() []*nakama_api.StorageObject
- func (m *AccountExport) GetWalletLedgers() []*WalletLedger
- func (*AccountExport) ProtoMessage()
- func (m *AccountExport) Reset()
- func (m *AccountExport) String() string
- type AccountIdRequest
- type AuthenticateRequest
- type ConsoleClient
- type ConsoleServer
- type Session
- type WalletLedger
- func (*WalletLedger) Descriptor() ([]byte, []int)
- func (m *WalletLedger) GetChangeset() string
- func (m *WalletLedger) GetCreateTime() *google_protobuf2.Timestamp
- func (m *WalletLedger) GetId() string
- func (m *WalletLedger) GetMetadata() string
- func (m *WalletLedger) GetUpdateTime() *google_protobuf2.Timestamp
- func (m *WalletLedger) GetUserId() string
- func (*WalletLedger) ProtoMessage()
- func (m *WalletLedger) Reset()
- func (m *WalletLedger) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterConsoleHandler ¶
func RegisterConsoleHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterConsoleHandler registers the http handlers for service Console to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterConsoleHandlerClient ¶
func RegisterConsoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConsoleClient) error
RegisterConsoleHandler registers the http handlers for service Console to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ConsoleClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ConsoleClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ConsoleClient" to call the correct interceptors.
func RegisterConsoleHandlerFromEndpoint ¶
func RegisterConsoleHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterConsoleHandlerFromEndpoint is same as RegisterConsoleHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterConsoleServer ¶
func RegisterConsoleServer(s *grpc.Server, srv ConsoleServer)
Types ¶
type AccountExport ¶
type AccountExport struct { // The user's account details. Account *nakama_api.Account `protobuf:"bytes,1,opt,name=account" json:"account,omitempty"` // The user's storage. Objects []*nakama_api.StorageObject `protobuf:"bytes,2,rep,name=objects" json:"objects,omitempty"` // The user's friends. Friends []*nakama_api.Friend `protobuf:"bytes,3,rep,name=friends" json:"friends,omitempty"` // The user's groups. Groups []*nakama_api.Group `protobuf:"bytes,4,rep,name=groups" json:"groups,omitempty"` // The user's chat messages. Messages []*nakama_api.ChannelMessage `protobuf:"bytes,5,rep,name=messages" json:"messages,omitempty"` // The user's leaderboard records. LeaderboardRecords []*nakama_api.LeaderboardRecord `protobuf:"bytes,6,rep,name=leaderboard_records,json=leaderboardRecords" json:"leaderboard_records,omitempty"` // The user's notifications. Notifications []*nakama_api.Notification `protobuf:"bytes,7,rep,name=notifications" json:"notifications,omitempty"` // The user's wallet ledger items. WalletLedgers []*WalletLedger `protobuf:"bytes,8,rep,name=wallet_ledgers,json=walletLedgers" json:"wallet_ledgers,omitempty"` }
* An export of all information stored for a user account.
func (*AccountExport) Descriptor ¶
func (*AccountExport) Descriptor() ([]byte, []int)
func (*AccountExport) GetAccount ¶
func (m *AccountExport) GetAccount() *nakama_api.Account
func (*AccountExport) GetFriends ¶
func (m *AccountExport) GetFriends() []*nakama_api.Friend
func (*AccountExport) GetGroups ¶
func (m *AccountExport) GetGroups() []*nakama_api.Group
func (*AccountExport) GetLeaderboardRecords ¶
func (m *AccountExport) GetLeaderboardRecords() []*nakama_api.LeaderboardRecord
func (*AccountExport) GetMessages ¶
func (m *AccountExport) GetMessages() []*nakama_api.ChannelMessage
func (*AccountExport) GetNotifications ¶
func (m *AccountExport) GetNotifications() []*nakama_api.Notification
func (*AccountExport) GetObjects ¶
func (m *AccountExport) GetObjects() []*nakama_api.StorageObject
func (*AccountExport) GetWalletLedgers ¶
func (m *AccountExport) GetWalletLedgers() []*WalletLedger
func (*AccountExport) ProtoMessage ¶
func (*AccountExport) ProtoMessage()
func (*AccountExport) Reset ¶
func (m *AccountExport) Reset()
func (*AccountExport) String ¶
func (m *AccountExport) String() string
type AccountIdRequest ¶
type AccountIdRequest struct { // The unique identifier of the user account. Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` }
* The identifier for a user account.
func (*AccountIdRequest) Descriptor ¶
func (*AccountIdRequest) Descriptor() ([]byte, []int)
func (*AccountIdRequest) GetId ¶
func (m *AccountIdRequest) GetId() string
func (*AccountIdRequest) ProtoMessage ¶
func (*AccountIdRequest) ProtoMessage()
func (*AccountIdRequest) Reset ¶
func (m *AccountIdRequest) Reset()
func (*AccountIdRequest) String ¶
func (m *AccountIdRequest) String() string
type AuthenticateRequest ¶
type AuthenticateRequest struct { // The username of the user. Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"` // The password of the user. Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` }
* Authenticate against the server with username+password.
func (*AuthenticateRequest) Descriptor ¶
func (*AuthenticateRequest) Descriptor() ([]byte, []int)
func (*AuthenticateRequest) GetPassword ¶
func (m *AuthenticateRequest) GetPassword() string
func (*AuthenticateRequest) GetUsername ¶
func (m *AuthenticateRequest) GetUsername() string
func (*AuthenticateRequest) ProtoMessage ¶
func (*AuthenticateRequest) ProtoMessage()
func (*AuthenticateRequest) Reset ¶
func (m *AuthenticateRequest) Reset()
func (*AuthenticateRequest) String ¶
func (m *AuthenticateRequest) String() string
type ConsoleClient ¶
type ConsoleClient interface { // Delete all information stored for a user account. DeleteAccount(ctx context.Context, in *AccountIdRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) // Export all information stored about a user account. ExportAccount(ctx context.Context, in *AccountIdRequest, opts ...grpc.CallOption) (*AccountExport, error) // Authenticate a user with username+password. Login(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*Session, error) }
func NewConsoleClient ¶
func NewConsoleClient(cc *grpc.ClientConn) ConsoleClient
type ConsoleServer ¶
type ConsoleServer interface { // Delete all information stored for a user account. DeleteAccount(context.Context, *AccountIdRequest) (*google_protobuf1.Empty, error) // Export all information stored about a user account. ExportAccount(context.Context, *AccountIdRequest) (*AccountExport, error) // Authenticate a user with username+password. Login(context.Context, *AuthenticateRequest) (*Session, error) }
type Session ¶
type Session struct { // Authentication credentials. Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` }
* A user's session used to authenticate messages.
func (*Session) Descriptor ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
type WalletLedger ¶
type WalletLedger struct { // The unique ID of the change. Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` // The user ID this change belongs to. UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId" json:"user_id,omitempty"` // The changes to the wallet. Changeset string `protobuf:"bytes,3,opt,name=changeset" json:"changeset,omitempty"` // Metadata. Metadata string `protobuf:"bytes,4,opt,name=metadata" json:"metadata,omitempty"` // The UNIX time when the wallet ledger item was created. CreateTime *google_protobuf2.Timestamp `protobuf:"bytes,8,opt,name=create_time,json=createTime" json:"create_time,omitempty"` // The UNIX time when the wallet ledger item was updated. UpdateTime *google_protobuf2.Timestamp `protobuf:"bytes,9,opt,name=update_time,json=updateTime" json:"update_time,omitempty"` }
* A wallet ledger item representing a change to the user's wallet.
func (*WalletLedger) Descriptor ¶
func (*WalletLedger) Descriptor() ([]byte, []int)
func (*WalletLedger) GetChangeset ¶
func (m *WalletLedger) GetChangeset() string
func (*WalletLedger) GetCreateTime ¶
func (m *WalletLedger) GetCreateTime() *google_protobuf2.Timestamp
func (*WalletLedger) GetId ¶
func (m *WalletLedger) GetId() string
func (*WalletLedger) GetMetadata ¶
func (m *WalletLedger) GetMetadata() string
func (*WalletLedger) GetUpdateTime ¶
func (m *WalletLedger) GetUpdateTime() *google_protobuf2.Timestamp
func (*WalletLedger) GetUserId ¶
func (m *WalletLedger) GetUserId() string
func (*WalletLedger) ProtoMessage ¶
func (*WalletLedger) ProtoMessage()
func (*WalletLedger) Reset ¶
func (m *WalletLedger) Reset()
func (*WalletLedger) String ¶
func (m *WalletLedger) String() string