Versions in this module Expand all Collapse all v1 v1.0.8 Apr 12, 2024 v1.0.7 Apr 12, 2024 v1.0.6 Apr 12, 2024 Changes in this version type Peer + GetServiceByHashRing func(role, key string) v1.0.5 Mar 28, 2024 v1.0.4 Mar 28, 2024 v1.0.2 Mar 28, 2024 Changes in this version + const RUNTIME_CTX_CLIENT_IP + const RUNTIME_CTX_CLIENT_PORT + const RUNTIME_CTX_ENV + const RUNTIME_CTX_HEADERS + const RUNTIME_CTX_LANG + const RUNTIME_CTX_MATCH_ID + const RUNTIME_CTX_MATCH_LABEL + const RUNTIME_CTX_MATCH_NODE + const RUNTIME_CTX_MATCH_TICK_RATE + const RUNTIME_CTX_MODE + const RUNTIME_CTX_NODE + const RUNTIME_CTX_QUERY_PARAMS + const RUNTIME_CTX_SESSION_ID + const RUNTIME_CTX_USERNAME + const RUNTIME_CTX_USER_ID + const RUNTIME_CTX_USER_SESSION_EXP + const RUNTIME_CTX_VARS + const RUNTIME_CTX_VERSION + const STORAGE_PERMISSION_NO_READ + const STORAGE_PERMISSION_NO_WRITE + const STORAGE_PERMISSION_OWNER_READ + const STORAGE_PERMISSION_OWNER_WRITE + const STORAGE_PERMISSION_PUBLIC_READ + var ErrCannotDecodeParams = errors.New("error creating match: cannot decode params") + var ErrCannotEncodeParams = errors.New("error creating match: cannot encode params") + var ErrChannelCursorInvalid = errors.New("invalid channel cursor") + var ErrChannelGroupNotFound = errors.New("group not found") + var ErrChannelIDInvalid = errors.New("invalid channel id") + var ErrDeferredBroadcastFull = errors.New("too many deferred message broadcasts per tick") + var ErrFriendInvalidCursor = errors.New("friend cursor invalid") + var ErrGroupCreatorInvalid = errors.New("group creator user ID not valid") + var ErrGroupFull = errors.New("group is full") + var ErrGroupLastSuperadmin = errors.New("user is last group superadmin") + var ErrGroupNameInUse = errors.New("group name in use") + var ErrGroupNoUpdateOps = errors.New("no group updates") + var ErrGroupNotFound = errors.New("group not found") + var ErrGroupNotUpdated = errors.New("group not updated") + var ErrGroupPermissionDenied = errors.New("group permission denied") + var ErrGroupUserInvalidCursor = errors.New("group user cursor invalid") + var ErrGroupUserNotFound = errors.New("user not found") + var ErrInvalidChannelTarget = errors.New("Invalid channel target") + var ErrInvalidChannelType = errors.New("Invalid channel type") + var ErrMatchBusy = errors.New("match busy") + var ErrMatchIdInvalid = errors.New("match id invalid") + var ErrMatchLabelTooLong = errors.New("match label too long, must be 0-2048 bytes") + var ErrMatchNotFound = errors.New("match not found") + var ErrMatchStateFailed = errors.New("match did not return state") + var ErrMatchmakerDelete = errors.New("matchmaker delete error") + var ErrMatchmakerDuplicateSession = errors.New("matchmaker duplicate session") + var ErrMatchmakerIndex = errors.New("matchmaker index error") + var ErrMatchmakerNotAvailable = errors.New("matchmaker not available") + var ErrMatchmakerQueryInvalid = errors.New("matchmaker query invalid") + var ErrMatchmakerTicketNotFound = errors.New("matchmaker ticket not found") + var ErrMatchmakerTooManyTickets = errors.New("matchmaker too many tickets") + var ErrPartyAcceptRequest = errors.New("party could not accept request") + var ErrPartyClosed = errors.New("party closed") + var ErrPartyFull = errors.New("party full") + var ErrPartyJoinRequestsFull = errors.New("party join requests full") + var ErrPartyNotLeader = errors.New("party leader only") + var ErrPartyNotMember = errors.New("party member not found") + var ErrPartyNotRequest = errors.New("party join request not found") + var ErrPartyRemove = errors.New("party could not remove") + var ErrPartyRemoveSelf = errors.New("party cannot remove self") + var ErrSatoriConfigurationInvalid = errors.New("satori configuration is invalid") + var ErrStorageRejectedPermission = errors.New("Storage write rejected - permission denied.") + var ErrStorageRejectedVersion = errors.New("Storage write rejected - version check failed.") + var ErrTournamentAuthoritative = errors.New("tournament only allows authoritative submissions") + var ErrTournamentMaxSizeReached = errors.New("tournament max size reached") + var ErrTournamentNotFound = errors.New("tournament not found") + var ErrTournamentOutsideDuration = errors.New("tournament outside of duration") + var ErrTournamentWriteJoinRequired = errors.New("required to join before writing tournament record") + var ErrTournamentWriteMaxNumScoreReached = errors.New("max number score count reached") + var ErrUserGroupInvalidCursor = errors.New("user group cursor invalid") + var ErrWalletLedgerInvalidCursor = errors.New("wallet ledger cursor invalid") + type AccountUpdate struct + AvatarUrl string + DisplayName string + LangTag string + Location string + Metadata map[string]interface{} + Timezone string + UserID string + Username string + type ChannelType int + const DirectMessage + const Group + const Room + type Error struct + Code int + Message string + func NewError(message string, code int) *Error + func (e *Error) Error() string + type Event struct + Id string + Metadata map[string]string + Name string + Timestamp int64 + Value string + type Events struct + Events []*Event + type Experiment struct + Name string + Value string + type ExperimentList struct + Experiments []*Experiment + type Flag struct + ConditionChanged bool + Name string + Value string + type FlagList struct + Flags []*Flag + type Initializer interface + RegisterAfterAddFriends func(...) error + RegisterAfterAddGroupUsers func(...) error + RegisterAfterAuthenticateApple func(...) error + RegisterAfterAuthenticateCustom func(...) error + RegisterAfterAuthenticateDevice func(...) error + RegisterAfterAuthenticateEmail func(...) error + RegisterAfterAuthenticateFacebook func(...) error + RegisterAfterAuthenticateFacebookInstantGame func(...) error + RegisterAfterAuthenticateGameCenter func(...) error + RegisterAfterAuthenticateGoogle func(...) error + RegisterAfterAuthenticateSteam func(...) error + RegisterAfterBanGroupUsers func(...) error + RegisterAfterBlockFriends func(...) error + RegisterAfterCreateGroup func(...) error + RegisterAfterDeleteAccount func(fn func(ctx context.Context, logger Logger, db *sql.DB, nk NakamaModule) error) error + RegisterAfterDeleteFriends func(...) error + RegisterAfterDeleteGroup func(...) error + RegisterAfterDeleteLeaderboardRecord func(...) error + RegisterAfterDeleteNotifications func(...) error + RegisterAfterDeleteStorageObjects func(...) error + RegisterAfterDeleteTournamentRecord func(...) error + RegisterAfterDemoteGroupUsers func(...) error + RegisterAfterGetAccount func(...) error + RegisterAfterGetSubscription func(...) error + RegisterAfterGetUsers func(...) error + RegisterAfterImportFacebookFriends func(...) error + RegisterAfterImportSteamFriends func(...) error + RegisterAfterJoinGroup func(...) error + RegisterAfterJoinTournament func(...) error + RegisterAfterKickGroupUsers func(...) error + RegisterAfterLeaveGroup func(...) error + RegisterAfterLinkApple func(...) error + RegisterAfterLinkCustom func(...) error + RegisterAfterLinkDevice func(...) error + RegisterAfterLinkEmail func(...) error + RegisterAfterLinkFacebook func(...) error + RegisterAfterLinkFacebookInstantGame func(...) error + RegisterAfterLinkGameCenter func(...) error + RegisterAfterLinkGoogle func(...) error + RegisterAfterLinkSteam func(...) error + RegisterAfterListChannelMessages func(...) error + RegisterAfterListFriends func(...) error + RegisterAfterListGroupUsers func(...) error + RegisterAfterListGroups func(...) error + RegisterAfterListLeaderboardRecords func(...) error + RegisterAfterListLeaderboardRecordsAroundOwner func(...) error + RegisterAfterListMatches func(...) error + RegisterAfterListNotifications func(...) error + RegisterAfterListStorageObjects func(...) error + RegisterAfterListSubscriptions func(...) error + RegisterAfterListTournamentRecords func(...) error + RegisterAfterListTournamentRecordsAroundOwner func(...) error + RegisterAfterListTournaments func(...) error + RegisterAfterListUserGroups func(...) error + RegisterAfterPromoteGroupUsers func(...) error + RegisterAfterReadStorageObjects func(...) error + RegisterAfterRt func(id string, ...) error + RegisterAfterSessionLogout func(...) error + RegisterAfterSessionRefresh func(...) error + RegisterAfterUnlinkApple func(...) error + RegisterAfterUnlinkCustom func(...) error + RegisterAfterUnlinkDevice func(...) error + RegisterAfterUnlinkEmail func(...) error + RegisterAfterUnlinkFacebook func(...) error + RegisterAfterUnlinkFacebookInstantGame func(...) error + RegisterAfterUnlinkGameCenter func(...) error + RegisterAfterUnlinkGoogle func(...) error + RegisterAfterUnlinkSteam func(...) error + RegisterAfterUpdateAccount func(...) error + RegisterAfterUpdateGroup func(...) error + RegisterAfterValidatePurchaseApple func(...) error + RegisterAfterValidatePurchaseFacebookInstant func(...) error + RegisterAfterValidatePurchaseGoogle func(...) error + RegisterAfterValidatePurchaseHuawei func(...) error + RegisterAfterValidateSubscriptionApple func(...) error + RegisterAfterValidateSubscriptionGoogle func(...) error + RegisterAfterWriteLeaderboardRecord func(...) error + RegisterAfterWriteStorageObjects func(...) error + RegisterAfterWriteTournamentRecord func(...) error + RegisterBeforeAddFriends func(...) error + RegisterBeforeAddGroupUsers func(...) error + RegisterBeforeAuthenticateApple func(...) error + RegisterBeforeAuthenticateCustom func(...) error + RegisterBeforeAuthenticateDevice func(...) error + RegisterBeforeAuthenticateEmail func(...) error + RegisterBeforeAuthenticateFacebook func(...) error + RegisterBeforeAuthenticateFacebookInstantGame func(...) error + RegisterBeforeAuthenticateGameCenter func(...) error + RegisterBeforeAuthenticateGoogle func(...) error + RegisterBeforeAuthenticateSteam func(...) error + RegisterBeforeBanGroupUsers func(...) error + RegisterBeforeBlockFriends func(...) error + RegisterBeforeCreateGroup func(...) error + RegisterBeforeDeleteAccount func(fn func(ctx context.Context, logger Logger, db *sql.DB, nk NakamaModule) error) error + RegisterBeforeDeleteFriends func(...) error + RegisterBeforeDeleteGroup func(...) error + RegisterBeforeDeleteLeaderboardRecord func(...) error + RegisterBeforeDeleteNotifications func(...) error + RegisterBeforeDeleteStorageObjects func(...) error + RegisterBeforeDeleteTournamentRecord func(...) error + RegisterBeforeDemoteGroupUsers func(...) error + RegisterBeforeGetAccount func(fn func(ctx context.Context, logger Logger, db *sql.DB, nk NakamaModule) error) error + RegisterBeforeGetSubscription func(...) error + RegisterBeforeGetUsers func(...) error + RegisterBeforeImportFacebookFriends func(...) error + RegisterBeforeImportSteamFriends func(...) error + RegisterBeforeJoinGroup func(...) error + RegisterBeforeJoinTournament func(...) error + RegisterBeforeKickGroupUsers func(...) error + RegisterBeforeLeaveGroup func(...) error + RegisterBeforeLinkApple func(...) error + RegisterBeforeLinkCustom func(...) error + RegisterBeforeLinkDevice func(...) error + RegisterBeforeLinkEmail func(...) error + RegisterBeforeLinkFacebook func(...) error + RegisterBeforeLinkFacebookInstantGame func(...) error + RegisterBeforeLinkGameCenter func(...) error + RegisterBeforeLinkGoogle func(...) error + RegisterBeforeLinkSteam func(...) error + RegisterBeforeListChannelMessages func(...) error + RegisterBeforeListFriends func(...) error + RegisterBeforeListGroupUsers func(...) error + RegisterBeforeListGroups func(...) error + RegisterBeforeListLeaderboardRecords func(...) error + RegisterBeforeListLeaderboardRecordsAroundOwner func(...) error + RegisterBeforeListMatches func(...) error + RegisterBeforeListNotifications func(...) error + RegisterBeforeListStorageObjects func(...) error + RegisterBeforeListSubscriptions func(...) error + RegisterBeforeListTournamentRecords func(...) error + RegisterBeforeListTournamentRecordsAroundOwner func(...) error + RegisterBeforeListTournaments func(...) error + RegisterBeforeListUserGroups func(...) error + RegisterBeforePromoteGroupUsers func(...) error + RegisterBeforeReadStorageObjects func(...) error + RegisterBeforeRt func(id string, ...) error + RegisterBeforeSessionLogout func(...) error + RegisterBeforeSessionRefresh func(...) error + RegisterBeforeUnlinkApple func(...) error + RegisterBeforeUnlinkCustom func(...) error + RegisterBeforeUnlinkDevice func(...) error + RegisterBeforeUnlinkEmail func(...) error + RegisterBeforeUnlinkFacebook func(...) error + RegisterBeforeUnlinkFacebookInstantGame func(...) error + RegisterBeforeUnlinkGameCenter func(...) error + RegisterBeforeUnlinkGoogle func(...) error + RegisterBeforeUnlinkSteam func(...) error + RegisterBeforeUpdateAccount func(...) error + RegisterBeforeUpdateGroup func(...) error + RegisterBeforeValidatePurchaseApple func(...) error + RegisterBeforeValidatePurchaseFacebookInstant func(...) error + RegisterBeforeValidatePurchaseGoogle func(...) error + RegisterBeforeValidatePurchaseHuawei func(...) error + RegisterBeforeValidateSubscriptionApple func(...) error + RegisterBeforeValidateSubscriptionGoogle func(...) error + RegisterBeforeWriteLeaderboardRecord func(...) error + RegisterBeforeWriteStorageObjects func(...) error + RegisterBeforeWriteTournamentRecord func(...) error + RegisterEvent func(fn func(ctx context.Context, logger Logger, evt *api.Event)) error + RegisterEventSessionEnd func(fn func(ctx context.Context, logger Logger, evt *api.Event)) error + RegisterEventSessionStart func(fn func(ctx context.Context, logger Logger, evt *api.Event)) error + RegisterLeaderboardReset func(...) error + RegisterMatch func(name string, ...) error + RegisterMatchmakerMatched func(...) error + RegisterMatchmakerOverride func(...) error + RegisterPeerBroadcastEvent func(fn func(ctx context.Context, logger Logger, nk NakamaModule, ...)) error + RegisterPurchaseNotificationApple func(...) error + RegisterPurchaseNotificationGoogle func(...) error + RegisterRpc func(id string, ...) error + RegisterStorageIndex func(name, collection, key string, fields []string, maxEntries int, indexOnly bool) error + RegisterStorageIndexFilter func(indexName string, ...) error + RegisterSubscriptionNotificationApple func(...) error + RegisterSubscriptionNotificationGoogle func(...) error + RegisterTournamentEnd func(...) error + RegisterTournamentReset func(...) error + type LiveEvent struct + ActiveEndTimeSec int64 + ActiveStartTimeSec int64 + Description string + Name string + Value string + type LiveEventList struct + LiveEvents []*LiveEvent + type Logger interface + Debug func(format string, v ...interface{}) + Error func(format string, v ...interface{}) + Fields func() map[string]interface{} + Info func(format string, v ...interface{}) + Warn func(format string, v ...interface{}) + WithField func(key string, v interface{}) Logger + WithFields func(fields map[string]interface{}) Logger + type Match interface + MatchInit func(ctx context.Context, logger Logger, db *sql.DB, nk NakamaModule, ...) (interface{}, int, string) + MatchJoin func(ctx context.Context, logger Logger, db *sql.DB, nk NakamaModule, ...) interface{} + MatchJoinAttempt func(ctx context.Context, logger Logger, db *sql.DB, nk NakamaModule, ...) (interface{}, bool, string) + MatchLeave func(ctx context.Context, logger Logger, db *sql.DB, nk NakamaModule, ...) interface{} + MatchLoop func(ctx context.Context, logger Logger, db *sql.DB, nk NakamaModule, ...) interface{} + MatchSignal func(ctx context.Context, logger Logger, db *sql.DB, nk NakamaModule, ...) (interface{}, string) + MatchTerminate func(ctx context.Context, logger Logger, db *sql.DB, nk NakamaModule, ...) interface{} + type MatchData interface + GetData func() []byte + GetOpCode func() int64 + GetReceiveTime func() int64 + GetReliable func() bool + type MatchDispatcher interface + BroadcastMessage func(opCode int64, data []byte, presences []Presence, sender Presence, ...) error + BroadcastMessageDeferred func(opCode int64, data []byte, presences []Presence, sender Presence, ...) error + MatchKick func(presences []Presence) error + MatchLabelUpdate func(label string) error + type MatchmakerEntry interface + GetPartyId func() string + GetPresence func() Presence + GetProperties func() map[string]interface{} + GetTicket func() string + type NakamaModule interface + AccountDeleteId func(ctx context.Context, userID string, recorded bool) error + AccountExportId func(ctx context.Context, userID string) (string, error) + AccountGetId func(ctx context.Context, userID string) (*api.Account, error) + AccountUpdateId func(ctx context.Context, userID, username string, metadata map[string]interface{}, ...) error + AccountsGetId func(ctx context.Context, userIDs []string) ([]*api.Account, error) + AuthenticateApple func(ctx context.Context, token, username string, create bool) (string, string, bool, error) + AuthenticateCustom func(ctx context.Context, id, username string, create bool) (string, string, bool, error) + AuthenticateDevice func(ctx context.Context, id, username string, create bool) (string, string, bool, error) + AuthenticateEmail func(ctx context.Context, email, password, username string, create bool) (string, string, bool, error) + AuthenticateFacebook func(ctx context.Context, token string, importFriends bool, username string, ...) (string, string, bool, error) + AuthenticateFacebookInstantGame func(ctx context.Context, signedPlayerInfo string, username string, create bool) (string, string, bool, error) + AuthenticateGameCenter func(ctx context.Context, playerID, bundleID string, timestamp int64, ...) (string, string, bool, error) + AuthenticateGoogle func(ctx context.Context, token, username string, create bool) (string, string, bool, error) + AuthenticateSteam func(ctx context.Context, token, username string, create bool) (string, string, bool, error) + AuthenticateTokenGenerate func(userID, username string, exp int64, vars map[string]string) (string, int64, error) + ChannelIdBuild func(ctx context.Context, sender string, target string, chanType ChannelType) (string, error) + ChannelMessageRemove func(ctx context.Context, channelId, messageId string, ...) (*rtapi.ChannelMessageAck, error) + ChannelMessageSend func(ctx context.Context, channelID string, content map[string]interface{}, ...) (*rtapi.ChannelMessageAck, error) + ChannelMessageUpdate func(ctx context.Context, channelID, messageID string, ...) (*rtapi.ChannelMessageAck, error) + ChannelMessagesList func(ctx context.Context, channelId string, limit int, forward bool, cursor string) (messages []*api.ChannelMessage, nextCursor string, prevCursor string, ...) + Event func(ctx context.Context, evt *api.Event) error + FriendsAdd func(ctx context.Context, userID string, username string, ids []string, ...) error + FriendsBlock func(ctx context.Context, userID string, username string, ids []string, ...) error + FriendsDelete func(ctx context.Context, userID string, username string, ids []string, ...) error + FriendsList func(ctx context.Context, userID string, limit int, state *int, cursor string) ([]*api.Friend, string, error) + GetPeer func() Peer + GetSatori func() Satori + GroupCreate func(ctx context.Context, ...) (*api.Group, error) + GroupDelete func(ctx context.Context, id string) error + GroupUpdate func(ctx context.Context, ...) error + GroupUserJoin func(ctx context.Context, groupID, userID, username string) error + GroupUserLeave func(ctx context.Context, groupID, userID, username string) error + GroupUsersAdd func(ctx context.Context, callerID, groupID string, userIDs []string) error + GroupUsersBan func(ctx context.Context, callerID, groupID string, userIDs []string) error + GroupUsersDemote func(ctx context.Context, callerID, groupID string, userIDs []string) error + GroupUsersKick func(ctx context.Context, callerID, groupID string, userIDs []string) error + GroupUsersList func(ctx context.Context, id string, limit int, state *int, cursor string) ([]*api.GroupUserList_GroupUser, string, error) + GroupUsersPromote func(ctx context.Context, callerID, groupID string, userIDs []string) error + GroupsGetId func(ctx context.Context, groupIDs []string) ([]*api.Group, error) + GroupsGetRandom func(ctx context.Context, count int) ([]*api.Group, error) + GroupsList func(ctx context.Context, name, langTag string, members *int, open *bool, limit int, ...) ([]*api.Group, string, error) + LeaderboardCreate func(ctx context.Context, id string, authoritative bool, ...) error + LeaderboardDelete func(ctx context.Context, id string) error + LeaderboardList func(limit int, cursor string) (*api.LeaderboardList, error) + LeaderboardRecordDelete func(ctx context.Context, id, ownerID string) error + LeaderboardRecordWrite func(ctx context.Context, id, ownerID, username string, score, subscore int64, ...) (*api.LeaderboardRecord, error) + LeaderboardRecordsHaystack func(ctx context.Context, id, ownerID string, limit int, cursor string, ...) (*api.LeaderboardRecordList, error) + LeaderboardRecordsList func(ctx context.Context, id string, ownerIDs []string, limit int, cursor string, ...) (records []*api.LeaderboardRecord, ownerRecords []*api.LeaderboardRecord, ...) + LeaderboardRecordsListCursorFromRank func(id string, rank, overrideExpiry int64) (string, error) + LeaderboardsGetId func(ctx context.Context, ids []string) ([]*api.Leaderboard, error) + LinkApple func(ctx context.Context, userID, token string) error + LinkCustom func(ctx context.Context, userID, customID string) error + LinkDevice func(ctx context.Context, userID, deviceID string) error + LinkEmail func(ctx context.Context, userID, email, password string) error + LinkFacebook func(ctx context.Context, userID, username, token string, importFriends bool) error + LinkFacebookInstantGame func(ctx context.Context, userID, signedPlayerInfo string) error + LinkGameCenter func(ctx context.Context, userID, playerID, bundleID string, timestamp int64, ...) error + LinkGoogle func(ctx context.Context, userID, token string) error + LinkSteam func(ctx context.Context, userID, username, token string, importFriends bool) error + MatchCreate func(ctx context.Context, module string, params map[string]interface{}) (string, error) + MatchGet func(ctx context.Context, id string) (*api.Match, error) + MatchList func(ctx context.Context, limit int, authoritative bool, label string, ...) ([]*api.Match, error) + MatchSignal func(ctx context.Context, id string, data string) (string, error) + MetricsCounterAdd func(name string, tags map[string]string, delta int64) + MetricsGaugeSet func(name string, tags map[string]string, value float64) + MetricsTimerRecord func(name string, tags map[string]string, value time.Duration) + MultiUpdate func(ctx context.Context, accountUpdates []*AccountUpdate, ...) ([]*api.StorageObjectAck, []*WalletUpdateResult, error) + NotificationSend func(ctx context.Context, userID, subject string, content map[string]interface{}, ...) error + NotificationSendAll func(ctx context.Context, subject string, content map[string]interface{}, code int, ...) error + NotificationsDelete func(ctx context.Context, notifications []*NotificationDelete) error + NotificationsSend func(ctx context.Context, notifications []*NotificationSend) error + PurchaseGetByTransactionId func(ctx context.Context, transactionID string) (*api.ValidatedPurchase, error) + PurchaseValidateApple func(ctx context.Context, userID, receipt string, persist bool, ...) (*api.ValidatePurchaseResponse, error) + PurchaseValidateFacebookInstant func(ctx context.Context, userID, signedRequest string, persist bool) (*api.ValidatePurchaseResponse, error) + PurchaseValidateGoogle func(ctx context.Context, userID, receipt string, persist bool, overrides ...) (*api.ValidatePurchaseResponse, error) + PurchaseValidateHuawei func(ctx context.Context, userID, signature, inAppPurchaseData string, persist bool) (*api.ValidatePurchaseResponse, error) + PurchasesList func(ctx context.Context, userID string, limit int, cursor string) (*api.PurchaseList, error) + ReadFile func(path string) (*os.File, error) + SessionDisconnect func(ctx context.Context, sessionID string, reason ...PresenceReason) error + SessionLogout func(userID, token, refreshToken string) error + StorageDelete func(ctx context.Context, deletes []*StorageDelete) error + StorageIndexList func(ctx context.Context, callerID, indexName, query string, limit int) (*api.StorageObjects, error) + StorageList func(ctx context.Context, callerID, userID, collection string, limit int, ...) ([]*api.StorageObject, string, error) + StorageRead func(ctx context.Context, reads []*StorageRead) ([]*api.StorageObject, error) + StorageWrite func(ctx context.Context, writes []*StorageWrite) ([]*api.StorageObjectAck, error) + StreamClose func(mode uint8, subject, subcontext, label string) error + StreamCount func(mode uint8, subject, subcontext, label string) (int, error) + StreamSend func(mode uint8, subject, subcontext, label, data string, presences []Presence, ...) error + StreamSendRaw func(mode uint8, subject, subcontext, label string, msg *rtapi.Envelope, ...) error + StreamUserGet func(mode uint8, subject, subcontext, label, userID, sessionID string) (PresenceMeta, error) + StreamUserJoin func(mode uint8, subject, subcontext, label, userID, sessionID string, ...) (bool, error) + StreamUserKick func(mode uint8, subject, subcontext, label string, presence Presence) error + StreamUserLeave func(mode uint8, subject, subcontext, label, userID, sessionID string) error + StreamUserList func(mode uint8, subject, subcontext, label string, ...) ([]Presence, error) + StreamUserUpdate func(mode uint8, subject, subcontext, label, userID, sessionID string, ...) error + SubscriptionGetByProductId func(ctx context.Context, userID, productID string) (*api.ValidatedSubscription, error) + SubscriptionValidateApple func(ctx context.Context, userID, receipt string, persist bool, ...) (*api.ValidateSubscriptionResponse, error) + SubscriptionValidateGoogle func(ctx context.Context, userID, receipt string, persist bool, overrides ...) (*api.ValidateSubscriptionResponse, error) + SubscriptionsList func(ctx context.Context, userID string, limit int, cursor string) (*api.SubscriptionList, error) + TournamentAddAttempt func(ctx context.Context, id, ownerID string, count int) error + TournamentCreate func(ctx context.Context, id string, authoritative bool, ...) error + TournamentDelete func(ctx context.Context, id string) error + TournamentJoin func(ctx context.Context, id, ownerID, username string) error + TournamentList func(ctx context.Context, categoryStart, categoryEnd, startTime, endTime, limit int, ...) (*api.TournamentList, error) + TournamentRecordDelete func(ctx context.Context, id, ownerID string) error + TournamentRecordWrite func(ctx context.Context, id, ownerID, username string, score, subscore int64, ...) (*api.LeaderboardRecord, error) + TournamentRecordsHaystack func(ctx context.Context, id, ownerID string, limit int, cursor string, ...) (*api.TournamentRecordList, error) + TournamentRecordsList func(ctx context.Context, tournamentId string, ownerIDs []string, limit int, ...) (records []*api.LeaderboardRecord, ownerRecords []*api.LeaderboardRecord, ...) + TournamentsGetId func(ctx context.Context, tournamentIDs []string) ([]*api.Tournament, error) + UnlinkApple func(ctx context.Context, userID, token string) error + UnlinkCustom func(ctx context.Context, userID, customID string) error + UnlinkDevice func(ctx context.Context, userID, deviceID string) error + UnlinkEmail func(ctx context.Context, userID, email string) error + UnlinkFacebook func(ctx context.Context, userID, token string) error + UnlinkFacebookInstantGame func(ctx context.Context, userID, signedPlayerInfo string) error + UnlinkGameCenter func(ctx context.Context, userID, playerID, bundleID string, timestamp int64, ...) error + UnlinkGoogle func(ctx context.Context, userID, token string) error + UnlinkSteam func(ctx context.Context, userID, token string) error + UserGroupsList func(ctx context.Context, userID string, limit int, state *int, cursor string) ([]*api.UserGroupList_UserGroup, string, error) + UsersBanId func(ctx context.Context, userIDs []string) error + UsersGetId func(ctx context.Context, userIDs []string, facebookIDs []string) ([]*api.User, error) + UsersGetRandom func(ctx context.Context, count int) ([]*api.User, error) + UsersGetUsername func(ctx context.Context, usernames []string) ([]*api.User, error) + UsersUnbanId func(ctx context.Context, userIDs []string) error + WalletLedgerList func(ctx context.Context, userID string, limit int, cursor string) ([]WalletLedgerItem, string, error) + WalletLedgerUpdate func(ctx context.Context, itemID string, metadata map[string]interface{}) (WalletLedgerItem, error) + WalletUpdate func(ctx context.Context, userID string, changeset map[string]int64, ...) (updated map[string]int64, previous map[string]int64, err error) + WalletsUpdate func(ctx context.Context, updates []*WalletUpdate, updateLedger bool) ([]*WalletUpdateResult, error) + type NotificationDelete struct + NotificationID string + UserID string + type NotificationSend struct + Code int + Content map[string]interface{} + Persistent bool + Sender string + Subject string + UserID string + type Peer interface + Broadcast func(msg *rtapi.NakamaPeer_Frame, reliable, includeSelf bool) + Call func(ctx context.Context, node string, msg *rtapi.NakamaPeer_Frame) (*rtapi.NakamaPeer_Frame, error) + GetServices func() map[string]map[string]PeerService + GetServicesByRole func(role string) []PeerService + GetServicesByRoleAndName func(role, name string) (PeerService, bool) + Send func(node string, msg *rtapi.NakamaPeer_Frame, reliable bool) error + SessionToken func(tk string) (userID, username string, vars map[string]string, exp int64, online bool, ...) + type PeerService interface + Close func() error + Do func(msg *rtapi.NakamaPeer_Envelope) (*rtapi.NakamaPeer_Envelope, error) + Metadata func() *rtapi.NakamaPeer_NodeMeta + Name func() string + Send func(msg *rtapi.NakamaPeer_Envelope) error + type Presence interface + GetNodeId func() string + GetSessionId func() string + GetUserId func() string + type PresenceMeta interface + GetHidden func() bool + GetPersistence func() bool + GetReason func() PresenceReason + GetStatus func() string + GetUsername func() string + type PresenceReason uint8 + const PresenceReasonDisconnect + const PresenceReasonJoin + const PresenceReasonLeave + const PresenceReasonUnknown + const PresenceReasonUpdate + type Properties struct + Computed map[string]string + Custom map[string]string + Default map[string]string + type PropertiesUpdate struct + Custom map[string]string + Default map[string]string + Recompute *bool + type Satori interface + Authenticate func(ctx context.Context, id string, ipAddress ...string) error + EventsPublish func(ctx context.Context, id string, events []*Event) error + ExperimentsList func(ctx context.Context, id string, names ...string) (*ExperimentList, error) + FlagsList func(ctx context.Context, id string, names ...string) (*FlagList, error) + LiveEventsList func(ctx context.Context, id string, names ...string) (*LiveEventList, error) + PropertiesGet func(ctx context.Context, id string) (*Properties, error) + PropertiesUpdate func(ctx context.Context, id string, properties *PropertiesUpdate) error + type StorageDelete struct + Collection string + Key string + UserID string + Version string + type StorageRead struct + Collection string + Key string + UserID string + type StorageWrite struct + Collection string + Key string + PermissionRead int + PermissionWrite int + UserID string + Value string + Version string + type WalletLedgerItem interface + GetChangeset func() map[string]int64 + GetCreateTime func() int64 + GetID func() string + GetMetadata func() map[string]interface{} + GetUpdateTime func() int64 + GetUserID func() string + type WalletNegativeError struct + Amount int64 + Current int64 + Path string + UserID string + func (e *WalletNegativeError) Error() string + type WalletUpdate struct + Changeset map[string]int64 + Metadata map[string]interface{} + UserID string + type WalletUpdateResult struct + Previous map[string]int64 + Updated map[string]int64 + UserID string