server

package
v2.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2020 License: Apache-2.0 Imports: 90 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotificationCodeDmRequest        int32 = -1
	NotificationCodeFriendRequest    int32 = -2
	NotificationCodeFriendAccept     int32 = -3
	NotificationCodeGroupAdd         int32 = -4
	NotificationCodeGroupJoinRequest int32 = -5
	NotificationCodeFriendJoinGame   int32 = -6
)
View Source
const (
	LeaderboardSortOrderAscending = iota
	LeaderboardSortOrderDescending
)
View Source
const (
	LeaderboardOperatorBest = iota
	LeaderboardOperatorSet
	LeaderboardOperatorIncrement
)
View Source
const (
	ChannelMessageTypeChat int32 = iota
	ChannelMessageTypeChatUpdate
	ChannelMessageTypeChatRemove
	ChannelMessageTypeGroupJoin
	ChannelMessageTypeGroupAdd
	ChannelMessageTypeGroupLeave
	ChannelMessageTypeGroupKick
	ChannelMessageTypeGroupPromote
	ChannelMessageTypeGroupBan
	ChannelMessageTypeGroupDemote
)
View Source
const (
	StreamModeNotifications uint8 = iota
	StreamModeStatus
	StreamModeChannel
	StreamModeGroup
	StreamModeDM
	StreamModeMatchRelayed
	StreamModeMatchAuthoritative
)
View Source
const API_PREFIX = "/nakama.api.Nakama/"
View Source
const LTSentinel = lua.LValueType(-1)
View Source
const ObfuscationString = "xxxxx"
View Source
const RTAPI_PREFIX = "*rtapi.Envelope_"

Variables

View Source
var (
	ErrChannelIDInvalid     = errors.New("invalid channel id")
	ErrChannelCursorInvalid = errors.New("invalid channel cursor")
	ErrChannelGroupNotFound = errors.New("group not found")
)
View Source
var (
	ErrGroupNameInUse         = errors.New("group name in use")
	ErrGroupPermissionDenied  = errors.New("group permission denied")
	ErrGroupNoUpdateOps       = errors.New("no group updates")
	ErrGroupNotUpdated        = errors.New("group not updated")
	ErrGroupNotFound          = errors.New("group not found")
	ErrGroupFull              = errors.New("group is full")
	ErrGroupUserNotFound      = errors.New("user not found")
	ErrGroupLastSuperadmin    = errors.New("user is last group superadmin")
	ErrGroupUserInvalidCursor = errors.New("group user cursor invalid")
	ErrUserGroupInvalidCursor = errors.New("user group cursor invalid")
)
View Source
var (
	ErrLeaderboardNotFound      = errors.New("leaderboard not found")
	ErrLeaderboardAuthoritative = errors.New("leaderboard only allows authoritative submissions")
	ErrLeaderboardInvalidCursor = errors.New("leaderboard cursor invalid")
)
View Source
var (
	ErrStorageRejectedVersion    = errors.New("Storage write rejected - version check failed.")
	ErrStorageRejectedPermission = errors.New("Storage write rejected - permission denied.")
)
View Source
var (
	ErrTournamentNotFound                = errors.New("tournament not found")
	ErrTournamentMaxSizeReached          = errors.New("tournament max size reached")
	ErrTournamentOutsideDuration         = errors.New("tournament outside of duration")
	ErrTournamentWriteMaxNumScoreReached = errors.New("max number score count reached")
	ErrTournamentWriteJoinRequired       = errors.New("required to join before writing tournament record")
)
View Source
var (
	MatchFilterValue   = uint8(0)
	MatchFilterPtr     = &MatchFilterValue
	MatchFilterRelayed = map[uint8]*uint8{StreamModeMatchRelayed: MatchFilterPtr}

	MatchLabelMaxBytes = 2048

	ErrCannotEncodeParams    = errors.New("error creating match: cannot encode params")
	ErrMatchIdInvalid        = errors.New("match id invalid")
	ErrMatchLabelTooLong     = errors.New("match label too long, must be 0-2048 bytes")
	ErrDeferredBroadcastFull = errors.New("too many deferred message broadcasts per tick")
)
View Source
var (
	Bit32LibName   = "bit32"
	Bit32Default64 = int64(math.Pow(2, 32) - 1)
)
View Source
var (
	ErrNodeNotFound    = errors.New("node not found")
	ErrSessionNotFound = errors.New("session not found")
)
View Source
var ErrAccountNotFound = errors.New("account not found")
View Source
var ErrChannelMessageUpdateNotFound = errors.New("channel message not found")
View Source
var ErrFriendInvalidCursor = errors.New("friend cursor invalid")
View Source
var ErrMatchStopped = errors.New("match stopped")
View Source
var ErrMatchmakerTicketNotFound = errors.New("ticket not found")
View Source
var ErrRowsAffectedCount = errors.New("rows_affected_count")
View Source
var (
	ErrRuntimeRPCNotFound = errors.New("RPC function not found")
)
View Source
var ErrSessionQueueFull = errors.New("session outgoing queue full")
View Source
var ErrWalletLedgerInvalidCursor = errors.New("wallet ledger cursor invalid")
View Source
var LSentinel = lua.LValue(&LSentinelType{})

Functions

func AddFriends

func AddFriends(ctx context.Context, logger *zap.Logger, db *sql.DB, messageRouter MessageRouter, userID uuid.UUID, username string, friendIDs []string) error

func AddGroupUsers

func AddGroupUsers(ctx context.Context, logger *zap.Logger, db *sql.DB, router MessageRouter, caller uuid.UUID, groupID uuid.UUID, userIDs []uuid.UUID) error

func AuthenticateApple added in v2.13.0

func AuthenticateApple(ctx context.Context, logger *zap.Logger, db *sql.DB, client *social.Client, bundleId, token, username string, create bool) (string, string, bool, error)

func AuthenticateCustom

func AuthenticateCustom(ctx context.Context, logger *zap.Logger, db *sql.DB, customID, username string, create bool) (string, string, bool, error)

func AuthenticateDevice

func AuthenticateDevice(ctx context.Context, logger *zap.Logger, db *sql.DB, deviceID, username string, create bool) (string, string, bool, error)

func AuthenticateEmail

func AuthenticateEmail(ctx context.Context, logger *zap.Logger, db *sql.DB, email, password, username string, create bool) (string, string, bool, error)

func AuthenticateFacebook

func AuthenticateFacebook(ctx context.Context, logger *zap.Logger, db *sql.DB, client *social.Client, accessToken, username string, create bool) (string, string, bool, error)

func AuthenticateFacebookInstantGame added in v2.11.0

func AuthenticateFacebookInstantGame(ctx context.Context, logger *zap.Logger, db *sql.DB, client *social.Client, appSecret string, signedPlayerInfo string, username string, create bool) (string, string, bool, error)

func AuthenticateGameCenter

func AuthenticateGameCenter(ctx context.Context, logger *zap.Logger, db *sql.DB, client *social.Client, playerID, bundleID string, timestamp int64, salt, signature, publicKeyUrl, username string, create bool) (string, string, bool, error)

func AuthenticateGoogle

func AuthenticateGoogle(ctx context.Context, logger *zap.Logger, db *sql.DB, client *social.Client, idToken, username string, create bool) (string, string, bool, error)

func AuthenticateSteam

func AuthenticateSteam(ctx context.Context, logger *zap.Logger, db *sql.DB, client *social.Client, appID int, publisherKey, token, username string, create bool) (string, string, bool, error)

func AuthenticateUsername

func AuthenticateUsername(ctx context.Context, logger *zap.Logger, db *sql.DB, username, password string) (string, error)

func BanGroupUsers added in v2.9.0

func BanGroupUsers(ctx context.Context, logger *zap.Logger, db *sql.DB, router MessageRouter, caller uuid.UUID, groupID uuid.UUID, userIDs []uuid.UUID) error

func BanUsers

func BanUsers(ctx context.Context, logger *zap.Logger, db *sql.DB, ids []string) error

func BlockFriends

func BlockFriends(ctx context.Context, logger *zap.Logger, db *sql.DB, currentUser uuid.UUID, ids []string) error

func ChannelMessagesList

func ChannelMessagesList(ctx context.Context, logger *zap.Logger, db *sql.DB, caller uuid.UUID, stream PresenceStream, channelID string, limit int, forward bool, cursor string) (*api.ChannelMessageList, error)

func CheckConfig

func CheckConfig(logger *zap.Logger, config Config) map[string]string

func CheckRuntime

func CheckRuntime(logger *zap.Logger, config Config) error

func CheckRuntimeProviderGo

func CheckRuntimeProviderGo(logger *zap.Logger, rootPath string, paths []string) error

func CheckRuntimeProviderLua

func CheckRuntimeProviderLua(logger *zap.Logger, config Config, paths []string) error

func CreateGroup

func CreateGroup(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, creatorID uuid.UUID, name, lang, desc, avatarURL, metadata string, open bool, maxCount int) (*api.Group, error)

func DeleteAccount

func DeleteAccount(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, recorded bool) error

func DeleteFriends

func DeleteFriends(ctx context.Context, logger *zap.Logger, db *sql.DB, currentUser uuid.UUID, ids []string) error

func DeleteGroup

func DeleteGroup(ctx context.Context, logger *zap.Logger, db *sql.DB, groupID uuid.UUID, userID uuid.UUID) error

func DeleteUser

func DeleteUser(ctx context.Context, tx *sql.Tx, userID uuid.UUID) (int64, error)

func DemoteGroupUsers added in v2.13.0

func DemoteGroupUsers(ctx context.Context, logger *zap.Logger, db *sql.DB, router MessageRouter, caller uuid.UUID, groupID uuid.UUID, userIDs []uuid.UUID) error

func ExecuteInTx

func ExecuteInTx(ctx context.Context, tx Tx, fn func() error) (err error)

ExecuteInTx runs fn inside tx which should already have begun. *WARNING*: Do not execute any statements on the supplied tx before calling this function. ExecuteInTx will only retry statements that are performed within the supplied closure (fn). Any statements performed on the tx before ExecuteInTx is invoked will *not* be re-run if the transaction needs to be retried.

fn is subject to the same restrictions as the fn passed to ExecuteTx.

func ExecuteRetryable

func ExecuteRetryable(fn func() error) error

Retry functions that perform non-transactional database operations.

func ExportAccount

func ExportAccount(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID) (*console.AccountExport, error)

func GetAccount

func GetAccount(ctx context.Context, logger *zap.Logger, db *sql.DB, tracker Tracker, userID uuid.UUID) (*api.Account, error)

func GetAccounts

func GetAccounts(ctx context.Context, logger *zap.Logger, db *sql.DB, tracker Tracker, userIDs []string) ([]*api.Account, error)

func GetChannelMessages

func GetChannelMessages(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID) ([]*api.ChannelMessage, error)

func GetFriendIDs

func GetFriendIDs(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID) (*api.FriendList, error)

Only used to get all friend IDs for the console. NOTE: Not intended for use in client/runtime APIs.

func GetGroups

func GetGroups(ctx context.Context, logger *zap.Logger, db *sql.DB, ids []string) ([]*api.Group, error)

func GetRuntimePaths

func GetRuntimePaths(logger *zap.Logger, rootPath string) ([]string, error)

func GetUsers

func GetUsers(ctx context.Context, logger *zap.Logger, db *sql.DB, tracker Tracker, ids, usernames, fbIDs []string) (*api.Users, error)

func GroupDeleteAll

func GroupDeleteAll(ctx context.Context, logger *zap.Logger, tx *sql.Tx, userID uuid.UUID) error

func HashFromId added in v2.13.0

func HashFromId(id uuid.UUID) [6]byte

func JoinGroup

func JoinGroup(ctx context.Context, logger *zap.Logger, db *sql.DB, router MessageRouter, groupID uuid.UUID, userID uuid.UUID, username string) error

func KickGroupUsers

func KickGroupUsers(ctx context.Context, logger *zap.Logger, db *sql.DB, router MessageRouter, caller uuid.UUID, groupID uuid.UUID, userIDs []uuid.UUID) error

func LeaderboardRecordDelete

func LeaderboardRecordDelete(ctx context.Context, logger *zap.Logger, db *sql.DB, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, caller uuid.UUID, leaderboardId, ownerID string) error

func LeaderboardRecordReadAll

func LeaderboardRecordReadAll(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID) ([]*api.LeaderboardRecord, error)

func LeaderboardRecordWrite

func LeaderboardRecordWrite(ctx context.Context, logger *zap.Logger, db *sql.DB, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, caller uuid.UUID, leaderboardId, ownerID, username string, score, subscore int64, metadata string) (*api.LeaderboardRecord, error)

func LeaderboardRecordsDeleteAll

func LeaderboardRecordsDeleteAll(ctx context.Context, logger *zap.Logger, tx *sql.Tx, userID uuid.UUID) error

func LeaderboardRecordsHaystack

func LeaderboardRecordsHaystack(ctx context.Context, logger *zap.Logger, db *sql.DB, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, leaderboardId string, ownerID uuid.UUID, limit int, overrideExpiry int64) ([]*api.LeaderboardRecord, error)

func LeaderboardRecordsList

func LeaderboardRecordsList(ctx context.Context, logger *zap.Logger, db *sql.DB, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, leaderboardId string, limit *wrappers.Int32Value, cursor string, ownerIds []string, overrideExpiry int64) (*api.LeaderboardRecordList, error)

func LeaveGroup

func LeaveGroup(ctx context.Context, logger *zap.Logger, db *sql.DB, router MessageRouter, groupID uuid.UUID, userID uuid.UUID, username string) error

func LinkApple added in v2.13.0

func LinkApple(ctx context.Context, logger *zap.Logger, db *sql.DB, config Config, socialClient *social.Client, userID uuid.UUID, token string) error

func LinkCustom added in v2.12.0

func LinkCustom(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, customID string) error

func LinkDevice added in v2.12.0

func LinkDevice(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, deviceID string) error

func LinkEmail added in v2.12.0

func LinkEmail(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, email, password string) error

func LinkFacebook added in v2.12.0

func LinkFacebook(ctx context.Context, logger *zap.Logger, db *sql.DB, socialClient *social.Client, router MessageRouter, userID uuid.UUID, username, token string, sync bool) error

func LinkFacebookInstantGame added in v2.12.0

func LinkFacebookInstantGame(ctx context.Context, logger *zap.Logger, db *sql.DB, config Config, socialClient *social.Client, userID uuid.UUID, signedPlayerInfo string) error

func LinkGameCenter added in v2.12.0

func LinkGameCenter(ctx context.Context, logger *zap.Logger, db *sql.DB, socialClient *social.Client, userID uuid.UUID, playerID string, bundleID string, timestamp int64, salt string, signature string, publicKeyURL string) error

func LinkGoogle added in v2.12.0

func LinkGoogle(ctx context.Context, logger *zap.Logger, db *sql.DB, socialClient *social.Client, userID uuid.UUID, token string) error

func LinkSteam added in v2.12.0

func LinkSteam(ctx context.Context, logger *zap.Logger, db *sql.DB, config Config, socialClient *social.Client, userID uuid.UUID, token string) error

func ListFriends

func ListFriends(ctx context.Context, logger *zap.Logger, db *sql.DB, tracker Tracker, userID uuid.UUID, limit int, state *wrappers.Int32Value, cursor string) (*api.FriendList, error)

func ListGroupUsers

func ListGroupUsers(ctx context.Context, logger *zap.Logger, db *sql.DB, tracker Tracker, groupID uuid.UUID, limit int, state *wrappers.Int32Value, cursor string) (*api.GroupUserList, error)

func ListGroups

func ListGroups(ctx context.Context, logger *zap.Logger, db *sql.DB, name string, limit int, cursorStr string) (*api.GroupList, error)

func ListUserGroups

func ListUserGroups(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, limit int, state *wrappers.Int32Value, cursor string) (*api.UserGroupList, error)

func ListWalletLedger

func ListWalletLedger(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, limit *int, cursor string) ([]*walletLedger, string, error)

func MultiUpdate added in v2.13.0

func MultiUpdate(ctx context.Context, logger *zap.Logger, db *sql.DB, accountUpdates []*accountUpdate, storageWrites StorageOpWrites, walletUpdates []*walletUpdate, updateLedger bool) ([]*api.StorageObjectAck, []*runtime.WalletUpdateResult, error)

func NewConfig

func NewConfig(logger *zap.Logger) *config

NewConfig constructs a Config struct which represents server settings, and populates it with default values.

func NewJSONFileLogger

func NewJSONFileLogger(consoleLogger *zap.Logger, fileName string, level zapcore.Level, format LoggingFormat) *zap.Logger

func NewJSONLogger

func NewJSONLogger(output *os.File, level zapcore.Level, format LoggingFormat) *zap.Logger

func NewMultiLogger

func NewMultiLogger(loggers ...*zap.Logger) *zap.Logger

func NewRotatingJSONFileLogger

func NewRotatingJSONFileLogger(consoleLogger *zap.Logger, config Config, level zapcore.Level, format LoggingFormat) *zap.Logger

func NewRuntimeGoContext

func NewRuntimeGoContext(ctx context.Context, node string, env map[string]string, mode RuntimeExecutionMode, queryParams map[string][]string, sessionExpiry int64, userID, username string, vars map[string]string, sessionID, clientIP, clientPort string) context.Context

func NewRuntimeGoLogger

func NewRuntimeGoLogger(logger *zap.Logger) nkruntime.Logger

func NewRuntimeLuaContext

func NewRuntimeLuaContext(l *lua.LState, node string, env *lua.LTable, mode RuntimeExecutionMode, queryParams map[string][]string, sessionExpiry int64, userID, username string, vars map[string]string, sessionID, clientIP, clientPort string) *lua.LTable

func NewSocketWsAcceptor

func NewSocketWsAcceptor(logger *zap.Logger, config Config, sessionRegistry SessionRegistry, matchmaker Matchmaker, tracker Tracker, metrics *Metrics, runtime *Runtime, jsonpbMarshaler *jsonpb.Marshaler, jsonpbUnmarshaler *jsonpb.Unmarshaler, pipeline *Pipeline) func(http.ResponseWriter, *http.Request)

func NodeToHash added in v2.13.0

func NodeToHash(node string) [6]byte

func NotificationDelete

func NotificationDelete(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, notificationIDs []string) error

func NotificationList

func NotificationList(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, limit int, cursor string, nc *notificationCacheableCursor) (*api.NotificationList, error)

func NotificationSave

func NotificationSave(ctx context.Context, logger *zap.Logger, db *sql.DB, notifications map[uuid.UUID][]*api.Notification) error

func NotificationSend

func NotificationSend(ctx context.Context, logger *zap.Logger, db *sql.DB, messageRouter MessageRouter, notifications map[uuid.UUID][]*api.Notification) error

func OpenBit32

func OpenBit32(l *lua.LState) int

func OpenOs

func OpenOs(L *lua.LState) int

func OpenPackage

func OpenPackage(moduleCache *RuntimeLuaModuleCache) func(L *lua.LState) int

func PromoteGroupUsers

func PromoteGroupUsers(ctx context.Context, logger *zap.Logger, db *sql.DB, router MessageRouter, caller uuid.UUID, groupID uuid.UUID, userIDs []uuid.UUID) error

func RuntimeLuaConvertLuaTable

func RuntimeLuaConvertLuaTable(lv *lua.LTable) map[string]interface{}

func RuntimeLuaConvertLuaValue

func RuntimeLuaConvertLuaValue(lv lua.LValue) interface{}

func RuntimeLuaConvertMap

func RuntimeLuaConvertMap(l *lua.LState, data map[string]interface{}) *lua.LTable

func RuntimeLuaConvertMapInt64 added in v2.13.0

func RuntimeLuaConvertMapInt64(l *lua.LState, data map[string]int64) *lua.LTable

func RuntimeLuaConvertMapString

func RuntimeLuaConvertMapString(l *lua.LState, data map[string]string) *lua.LTable

func RuntimeLuaConvertValue

func RuntimeLuaConvertValue(l *lua.LState, val interface{}) lua.LValue

func SetupLogging

func SetupLogging(tmpLogger *zap.Logger, config Config) (*zap.Logger, *zap.Logger)

func StackdriverLevelEncoder

func StackdriverLevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)

func StatusError

func StatusError(code codes.Code, msg string, cause error) error

Helper function for creating status errors that wrap underlying causes, usually DB errors.

func StorageDeleteObjects

func StorageDeleteObjects(ctx context.Context, logger *zap.Logger, db *sql.DB, authoritativeDelete bool, ops StorageOpDeletes) (codes.Code, error)

func StorageListObjects

func StorageListObjects(ctx context.Context, logger *zap.Logger, db *sql.DB, caller uuid.UUID, ownerID *uuid.UUID, collection string, limit int, cursor string) (*api.StorageObjectList, codes.Code, error)

func StorageListObjectsAll

func StorageListObjectsAll(ctx context.Context, logger *zap.Logger, db *sql.DB, authoritative bool, collection string, limit int, cursor string, storageCursor *storageCursor) (*api.StorageObjectList, error)

func StorageListObjectsPublicReadUser

func StorageListObjectsPublicReadUser(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, collection string, limit int, cursor string, storageCursor *storageCursor) (*api.StorageObjectList, error)

func StorageListObjectsUser

func StorageListObjectsUser(ctx context.Context, logger *zap.Logger, db *sql.DB, authoritative bool, userID uuid.UUID, collection string, limit int, cursor string, storageCursor *storageCursor) (*api.StorageObjectList, error)

func StorageReadAllUserObjects

func StorageReadAllUserObjects(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID) ([]*api.StorageObject, error)

func StorageReadObjects

func StorageReadObjects(ctx context.Context, logger *zap.Logger, db *sql.DB, caller uuid.UUID, objectIDs []*api.ReadStorageObjectId) (*api.StorageObjects, error)

func StorageWriteObjects

func StorageWriteObjects(ctx context.Context, logger *zap.Logger, db *sql.DB, authoritativeWrite bool, ops StorageOpWrites) (*api.StorageObjectAcks, codes.Code, error)

func StreamToChannelId

func StreamToChannelId(stream PresenceStream) (string, error)

func TournamentAddAttempt

func TournamentAddAttempt(ctx context.Context, logger *zap.Logger, db *sql.DB, cache LeaderboardCache, leaderboardId string, owner string, count int) error

func TournamentCreate

func TournamentCreate(ctx context.Context, logger *zap.Logger, cache LeaderboardCache, scheduler LeaderboardScheduler, leaderboardId string, sortOrder, operator int, resetSchedule, metadata,
	title, description string, category, startTime, endTime, duration, maxSize, maxNumScore int, joinRequired bool) error

func TournamentDelete

func TournamentDelete(ctx context.Context, cache LeaderboardCache, rankCache LeaderboardRankCache, scheduler LeaderboardScheduler, leaderboardId string) error

func TournamentJoin

func TournamentJoin(ctx context.Context, logger *zap.Logger, db *sql.DB, cache LeaderboardCache, owner, username, tournamentId string) error

func TournamentList

func TournamentList(ctx context.Context, logger *zap.Logger, db *sql.DB, leaderboardCache LeaderboardCache, categoryStart, categoryEnd, startTime, endTime, limit int, cursor *TournamentListCursor) (*api.TournamentList, error)

func TournamentRecordWrite

func TournamentRecordWrite(ctx context.Context, logger *zap.Logger, db *sql.DB, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, tournamentId string, ownerId uuid.UUID, username string, score, subscore int64, metadata string) (*api.LeaderboardRecord, error)

func TournamentRecordsHaystack

func TournamentRecordsHaystack(ctx context.Context, logger *zap.Logger, db *sql.DB, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, leaderboardId string, ownerId uuid.UUID, limit int, expiryOverride int64) ([]*api.LeaderboardRecord, error)

func TournamentRecordsList added in v2.14.1

func TournamentRecordsList(ctx context.Context, logger *zap.Logger, db *sql.DB, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, tournamentId string, ownerIds []string, limit *wrappers.Int32Value, cursor string, overrideExpiry int64) (*api.TournamentRecordList, error)

func TournamentsGet added in v2.9.0

func TournamentsGet(ctx context.Context, logger *zap.Logger, db *sql.DB, tournamentIDs []string) ([]*api.Tournament, error)

func UnbanUsers

func UnbanUsers(ctx context.Context, logger *zap.Logger, db *sql.DB, ids []string) error

func UnlinkApple added in v2.13.0

func UnlinkApple(ctx context.Context, logger *zap.Logger, db *sql.DB, config Config, socialClient *social.Client, id uuid.UUID, token string) error

func UnlinkCustom added in v2.12.0

func UnlinkCustom(ctx context.Context, logger *zap.Logger, db *sql.DB, id uuid.UUID, customID string) error

func UnlinkDevice added in v2.12.0

func UnlinkDevice(ctx context.Context, logger *zap.Logger, db *sql.DB, id uuid.UUID, deviceID string) error

func UnlinkEmail added in v2.12.0

func UnlinkEmail(ctx context.Context, logger *zap.Logger, db *sql.DB, id uuid.UUID, email string) error

func UnlinkFacebook added in v2.12.0

func UnlinkFacebook(ctx context.Context, logger *zap.Logger, db *sql.DB, socialClient *social.Client, id uuid.UUID, token string) error

func UnlinkFacebookInstantGame added in v2.12.0

func UnlinkFacebookInstantGame(ctx context.Context, logger *zap.Logger, db *sql.DB, config Config, socialClient *social.Client, id uuid.UUID, signedPlayerInfo string) error

func UnlinkGameCenter added in v2.12.0

func UnlinkGameCenter(ctx context.Context, logger *zap.Logger, db *sql.DB, socialClient *social.Client, id uuid.UUID, playerID string, bundleID string, timestamp int64, salt string, signature string, publicKeyURL string) error

func UnlinkGoogle added in v2.12.0

func UnlinkGoogle(ctx context.Context, logger *zap.Logger, db *sql.DB, socialClient *social.Client, id uuid.UUID, token string) error

func UnlinkSteam added in v2.12.0

func UnlinkSteam(ctx context.Context, logger *zap.Logger, db *sql.DB, config Config, socialClient *social.Client, id uuid.UUID, token string) error

func UpdateAccounts added in v2.13.0

func UpdateAccounts(ctx context.Context, logger *zap.Logger, db *sql.DB, updates []*accountUpdate) error

func UpdateGroup

func UpdateGroup(ctx context.Context, logger *zap.Logger, db *sql.DB, groupID uuid.UUID, userID uuid.UUID, creatorID uuid.UUID, name, lang, desc, avatar, metadata *wrappers.StringValue, open *wrappers.BoolValue, maxCount int) error

func UpdateWalletLedger

func UpdateWalletLedger(ctx context.Context, logger *zap.Logger, db *sql.DB, id uuid.UUID, metadata string) (*walletLedger, error)

func UpdateWallets

func UpdateWallets(ctx context.Context, logger *zap.Logger, db *sql.DB, updates []*walletUpdate, updateLedger bool) ([]*runtime.WalletUpdateResult, error)

func UserExistsAndDoesNotBlock

func UserExistsAndDoesNotBlock(ctx context.Context, db *sql.DB, checkUserID, blocksUserID uuid.UUID) (bool, error)

Types

type AmbiguousCommitError

type AmbiguousCommitError struct {
	// contains filtered or unexported fields
}

AmbiguousCommitError represents an error that left a transaction in an ambiguous state: unclear if it committed or not.

func (*AmbiguousCommitError) Cause

func (e *AmbiguousCommitError) Cause() error

Cause implements the ErrorCauser interface.

func (*AmbiguousCommitError) Error

func (e *AmbiguousCommitError) Error() string

Error implements the error interface.

type ApiServer

type ApiServer struct {
	apigrpc.UnimplementedNakamaServer
	// contains filtered or unexported fields
}

func StartApiServer

func StartApiServer(logger *zap.Logger, startupLogger *zap.Logger, db *sql.DB, jsonpbMarshaler *jsonpb.Marshaler, jsonpbUnmarshaler *jsonpb.Unmarshaler, config Config, socialClient *social.Client, leaderboardCache LeaderboardCache, leaderboardRankCache LeaderboardRankCache, sessionRegistry SessionRegistry, matchRegistry MatchRegistry, matchmaker Matchmaker, tracker Tracker, router MessageRouter, metrics *Metrics, pipeline *Pipeline, runtime *Runtime) *ApiServer

func (*ApiServer) AddFriends

func (s *ApiServer) AddFriends(ctx context.Context, in *api.AddFriendsRequest) (*empty.Empty, error)

func (*ApiServer) AddGroupUsers

func (s *ApiServer) AddGroupUsers(ctx context.Context, in *api.AddGroupUsersRequest) (*empty.Empty, error)

func (*ApiServer) AuthenticateApple added in v2.13.0

func (s *ApiServer) AuthenticateApple(ctx context.Context, in *api.AuthenticateAppleRequest) (*api.Session, error)

func (*ApiServer) AuthenticateCustom

func (s *ApiServer) AuthenticateCustom(ctx context.Context, in *api.AuthenticateCustomRequest) (*api.Session, error)

func (*ApiServer) AuthenticateDevice

func (s *ApiServer) AuthenticateDevice(ctx context.Context, in *api.AuthenticateDeviceRequest) (*api.Session, error)

func (*ApiServer) AuthenticateEmail

func (s *ApiServer) AuthenticateEmail(ctx context.Context, in *api.AuthenticateEmailRequest) (*api.Session, error)

func (*ApiServer) AuthenticateFacebook

func (s *ApiServer) AuthenticateFacebook(ctx context.Context, in *api.AuthenticateFacebookRequest) (*api.Session, error)

func (*ApiServer) AuthenticateFacebookInstantGame added in v2.11.0

func (s *ApiServer) AuthenticateFacebookInstantGame(ctx context.Context, in *api.AuthenticateFacebookInstantGameRequest) (*api.Session, error)

func (*ApiServer) AuthenticateGameCenter

func (s *ApiServer) AuthenticateGameCenter(ctx context.Context, in *api.AuthenticateGameCenterRequest) (*api.Session, error)

func (*ApiServer) AuthenticateGoogle

func (s *ApiServer) AuthenticateGoogle(ctx context.Context, in *api.AuthenticateGoogleRequest) (*api.Session, error)

func (*ApiServer) AuthenticateSteam

func (s *ApiServer) AuthenticateSteam(ctx context.Context, in *api.AuthenticateSteamRequest) (*api.Session, error)

func (*ApiServer) BanGroupUsers added in v2.9.0

func (s *ApiServer) BanGroupUsers(ctx context.Context, in *api.BanGroupUsersRequest) (*empty.Empty, error)

func (*ApiServer) BlockFriends

func (s *ApiServer) BlockFriends(ctx context.Context, in *api.BlockFriendsRequest) (*empty.Empty, error)

func (*ApiServer) CreateGroup

func (s *ApiServer) CreateGroup(ctx context.Context, in *api.CreateGroupRequest) (*api.Group, error)

func (*ApiServer) DeleteFriends

func (s *ApiServer) DeleteFriends(ctx context.Context, in *api.DeleteFriendsRequest) (*empty.Empty, error)

func (*ApiServer) DeleteGroup

func (s *ApiServer) DeleteGroup(ctx context.Context, in *api.DeleteGroupRequest) (*empty.Empty, error)

func (*ApiServer) DeleteLeaderboardRecord

func (s *ApiServer) DeleteLeaderboardRecord(ctx context.Context, in *api.DeleteLeaderboardRecordRequest) (*empty.Empty, error)

func (*ApiServer) DeleteNotifications

func (s *ApiServer) DeleteNotifications(ctx context.Context, in *api.DeleteNotificationsRequest) (*empty.Empty, error)

func (*ApiServer) DeleteStorageObjects

func (s *ApiServer) DeleteStorageObjects(ctx context.Context, in *api.DeleteStorageObjectsRequest) (*empty.Empty, error)

func (*ApiServer) DemoteGroupUsers added in v2.13.0

func (s *ApiServer) DemoteGroupUsers(ctx context.Context, in *api.DemoteGroupUsersRequest) (*empty.Empty, error)

func (*ApiServer) Event added in v2.8.0

func (s *ApiServer) Event(ctx context.Context, in *api.Event) (*empty.Empty, error)

func (*ApiServer) GetAccount

func (s *ApiServer) GetAccount(ctx context.Context, in *empty.Empty) (*api.Account, error)

func (*ApiServer) GetUsers

func (s *ApiServer) GetUsers(ctx context.Context, in *api.GetUsersRequest) (*api.Users, error)

func (*ApiServer) Healthcheck

func (s *ApiServer) Healthcheck(ctx context.Context, in *empty.Empty) (*empty.Empty, error)

func (*ApiServer) ImportFacebookFriends

func (s *ApiServer) ImportFacebookFriends(ctx context.Context, in *api.ImportFacebookFriendsRequest) (*empty.Empty, error)

func (*ApiServer) JoinGroup

func (s *ApiServer) JoinGroup(ctx context.Context, in *api.JoinGroupRequest) (*empty.Empty, error)

func (*ApiServer) JoinTournament

func (s *ApiServer) JoinTournament(ctx context.Context, in *api.JoinTournamentRequest) (*empty.Empty, error)

func (*ApiServer) KickGroupUsers

func (s *ApiServer) KickGroupUsers(ctx context.Context, in *api.KickGroupUsersRequest) (*empty.Empty, error)

func (*ApiServer) LeaveGroup

func (s *ApiServer) LeaveGroup(ctx context.Context, in *api.LeaveGroupRequest) (*empty.Empty, error)

func (*ApiServer) LinkApple added in v2.13.0

func (s *ApiServer) LinkApple(ctx context.Context, in *api.AccountApple) (*empty.Empty, error)

func (*ApiServer) LinkCustom

func (s *ApiServer) LinkCustom(ctx context.Context, in *api.AccountCustom) (*empty.Empty, error)

func (*ApiServer) LinkDevice

func (s *ApiServer) LinkDevice(ctx context.Context, in *api.AccountDevice) (*empty.Empty, error)

func (*ApiServer) LinkEmail

func (s *ApiServer) LinkEmail(ctx context.Context, in *api.AccountEmail) (*empty.Empty, error)

func (*ApiServer) LinkFacebook

func (s *ApiServer) LinkFacebook(ctx context.Context, in *api.LinkFacebookRequest) (*empty.Empty, error)

func (*ApiServer) LinkFacebookInstantGame added in v2.11.0

func (s *ApiServer) LinkFacebookInstantGame(ctx context.Context, in *api.AccountFacebookInstantGame) (*empty.Empty, error)

func (*ApiServer) LinkGameCenter

func (s *ApiServer) LinkGameCenter(ctx context.Context, in *api.AccountGameCenter) (*empty.Empty, error)

func (*ApiServer) LinkGoogle

func (s *ApiServer) LinkGoogle(ctx context.Context, in *api.AccountGoogle) (*empty.Empty, error)

func (*ApiServer) LinkSteam

func (s *ApiServer) LinkSteam(ctx context.Context, in *api.AccountSteam) (*empty.Empty, error)

func (*ApiServer) ListChannelMessages

func (s *ApiServer) ListChannelMessages(ctx context.Context, in *api.ListChannelMessagesRequest) (*api.ChannelMessageList, error)

func (*ApiServer) ListFriends

func (s *ApiServer) ListFriends(ctx context.Context, in *api.ListFriendsRequest) (*api.FriendList, error)

func (*ApiServer) ListGroupUsers

func (s *ApiServer) ListGroupUsers(ctx context.Context, in *api.ListGroupUsersRequest) (*api.GroupUserList, error)

func (*ApiServer) ListGroups

func (s *ApiServer) ListGroups(ctx context.Context, in *api.ListGroupsRequest) (*api.GroupList, error)

func (*ApiServer) ListLeaderboardRecords

func (s *ApiServer) ListLeaderboardRecords(ctx context.Context, in *api.ListLeaderboardRecordsRequest) (*api.LeaderboardRecordList, error)

func (*ApiServer) ListLeaderboardRecordsAroundOwner

func (s *ApiServer) ListLeaderboardRecordsAroundOwner(ctx context.Context, in *api.ListLeaderboardRecordsAroundOwnerRequest) (*api.LeaderboardRecordList, error)

func (*ApiServer) ListMatches

func (s *ApiServer) ListMatches(ctx context.Context, in *api.ListMatchesRequest) (*api.MatchList, error)

func (*ApiServer) ListNotifications

func (s *ApiServer) ListNotifications(ctx context.Context, in *api.ListNotificationsRequest) (*api.NotificationList, error)

func (*ApiServer) ListStorageObjects

func (s *ApiServer) ListStorageObjects(ctx context.Context, in *api.ListStorageObjectsRequest) (*api.StorageObjectList, error)

func (*ApiServer) ListTournamentRecords

func (s *ApiServer) ListTournamentRecords(ctx context.Context, in *api.ListTournamentRecordsRequest) (*api.TournamentRecordList, error)

func (*ApiServer) ListTournamentRecordsAroundOwner

func (s *ApiServer) ListTournamentRecordsAroundOwner(ctx context.Context, in *api.ListTournamentRecordsAroundOwnerRequest) (*api.TournamentRecordList, error)

func (*ApiServer) ListTournaments

func (s *ApiServer) ListTournaments(ctx context.Context, in *api.ListTournamentsRequest) (*api.TournamentList, error)

func (*ApiServer) ListUserGroups

func (s *ApiServer) ListUserGroups(ctx context.Context, in *api.ListUserGroupsRequest) (*api.UserGroupList, error)

func (*ApiServer) PromoteGroupUsers

func (s *ApiServer) PromoteGroupUsers(ctx context.Context, in *api.PromoteGroupUsersRequest) (*empty.Empty, error)

func (*ApiServer) ReadStorageObjects

func (s *ApiServer) ReadStorageObjects(ctx context.Context, in *api.ReadStorageObjectsRequest) (*api.StorageObjects, error)

func (*ApiServer) RpcFunc

func (s *ApiServer) RpcFunc(ctx context.Context, in *api.Rpc) (*api.Rpc, error)

func (*ApiServer) RpcFuncHttp

func (s *ApiServer) RpcFuncHttp(w http.ResponseWriter, r *http.Request)

func (*ApiServer) Stop

func (s *ApiServer) Stop()

func (*ApiServer) UnlinkApple added in v2.13.0

func (s *ApiServer) UnlinkApple(ctx context.Context, in *api.AccountApple) (*empty.Empty, error)

func (*ApiServer) UnlinkCustom

func (s *ApiServer) UnlinkCustom(ctx context.Context, in *api.AccountCustom) (*empty.Empty, error)

func (*ApiServer) UnlinkDevice

func (s *ApiServer) UnlinkDevice(ctx context.Context, in *api.AccountDevice) (*empty.Empty, error)

func (*ApiServer) UnlinkEmail

func (s *ApiServer) UnlinkEmail(ctx context.Context, in *api.AccountEmail) (*empty.Empty, error)

func (*ApiServer) UnlinkFacebook

func (s *ApiServer) UnlinkFacebook(ctx context.Context, in *api.AccountFacebook) (*empty.Empty, error)

func (*ApiServer) UnlinkFacebookInstantGame added in v2.11.0

func (s *ApiServer) UnlinkFacebookInstantGame(ctx context.Context, in *api.AccountFacebookInstantGame) (*empty.Empty, error)

func (*ApiServer) UnlinkGameCenter

func (s *ApiServer) UnlinkGameCenter(ctx context.Context, in *api.AccountGameCenter) (*empty.Empty, error)

func (*ApiServer) UnlinkGoogle

func (s *ApiServer) UnlinkGoogle(ctx context.Context, in *api.AccountGoogle) (*empty.Empty, error)

func (*ApiServer) UnlinkSteam

func (s *ApiServer) UnlinkSteam(ctx context.Context, in *api.AccountSteam) (*empty.Empty, error)

func (*ApiServer) UpdateAccount

func (s *ApiServer) UpdateAccount(ctx context.Context, in *api.UpdateAccountRequest) (*empty.Empty, error)

func (*ApiServer) UpdateGroup

func (s *ApiServer) UpdateGroup(ctx context.Context, in *api.UpdateGroupRequest) (*empty.Empty, error)

func (*ApiServer) WriteLeaderboardRecord

func (s *ApiServer) WriteLeaderboardRecord(ctx context.Context, in *api.WriteLeaderboardRecordRequest) (*api.LeaderboardRecord, error)

func (*ApiServer) WriteStorageObjects

func (s *ApiServer) WriteStorageObjects(ctx context.Context, in *api.WriteStorageObjectsRequest) (*api.StorageObjectAcks, error)

func (*ApiServer) WriteTournamentRecord

func (s *ApiServer) WriteTournamentRecord(ctx context.Context, in *api.WriteTournamentRecordRequest) (*api.LeaderboardRecord, error)

type ChannelIdToStreamResult

type ChannelIdToStreamResult struct {
	Stream PresenceStream
}

Wrapper type to avoid allocating a stream struct when the input is invalid.

func ChannelIdToStream

func ChannelIdToStream(channelID string) (*ChannelIdToStreamResult, error)

type Config

type Config interface {
	GetName() string
	GetDataDir() string
	GetShutdownGraceSec() int
	GetLogger() *LoggerConfig
	GetMetrics() *MetricsConfig
	GetSession() *SessionConfig
	GetSocket() *SocketConfig
	GetDatabase() *DatabaseConfig
	GetSocial() *SocialConfig
	GetRuntime() *RuntimeConfig
	GetMatch() *MatchConfig
	GetTracker() *TrackerConfig
	GetConsole() *ConsoleConfig
	GetLeaderboard() *LeaderboardConfig

	Clone() (Config, error)
}

Config interface is the Nakama core configuration.

func ParseArgs

func ParseArgs(logger *zap.Logger, args []string) Config

type ConsoleConfig

type ConsoleConfig struct {
	Port                int    `yaml:"port" json:"port" usage:"The port for accepting connections for the embedded console, listening on all interfaces."`
	Address             string `` /* 157-byte string literal not displayed */
	MaxMessageSizeBytes int64  `` /* 154-byte string literal not displayed */
	ReadTimeoutMs       int    `yaml:"read_timeout_ms" json:"read_timeout_ms" usage:"Maximum duration in milliseconds for reading the entire request."`
	WriteTimeoutMs      int    `` /* 130-byte string literal not displayed */
	IdleTimeoutMs       int    `` /* 151-byte string literal not displayed */
	Username            string `yaml:"username" json:"username" usage:"Username for the embedded console. Default username is 'admin'."`
	Password            string `yaml:"password" json:"password" usage:"Password for the embedded console. Default password is 'password'."`
	TokenExpirySec      int64  `yaml:"token_expiry_sec" json:"token_expiry_sec" usage:"Token expiry in seconds. Default 86400."`
	SigningKey          string `yaml:"signing_key" json:"signing_key" usage:"Key used to sign console session tokens."`
}

ConsoleConfig is configuration relevant to the embedded console.

func NewConsoleConfig

func NewConsoleConfig() *ConsoleConfig

NewConsoleConfig creates a new ConsoleConfig struct.

type ConsoleServer

type ConsoleServer struct {
	console.UnimplementedConsoleServer
	// contains filtered or unexported fields
}

func StartConsoleServer

func StartConsoleServer(logger *zap.Logger, startupLogger *zap.Logger, db *sql.DB, config Config, tracker Tracker, router MessageRouter, statusHandler StatusHandler, configWarnings map[string]string, serverVersion string) *ConsoleServer

func (*ConsoleServer) Authenticate

func (*ConsoleServer) BanUser

func (s *ConsoleServer) BanUser(ctx context.Context, in *console.AccountId) (*empty.Empty, error)

func (*ConsoleServer) DeleteAccount

func (s *ConsoleServer) DeleteAccount(ctx context.Context, in *console.AccountDeleteRequest) (*empty.Empty, error)

func (*ConsoleServer) DeleteFriend

func (s *ConsoleServer) DeleteFriend(ctx context.Context, in *console.DeleteFriendRequest) (*empty.Empty, error)

func (*ConsoleServer) DeleteGroupUser

func (s *ConsoleServer) DeleteGroupUser(ctx context.Context, in *console.DeleteGroupUserRequest) (*empty.Empty, error)

func (*ConsoleServer) DeleteStorage

func (s *ConsoleServer) DeleteStorage(ctx context.Context, in *empty.Empty) (*empty.Empty, error)

func (*ConsoleServer) DeleteStorageObject

func (s *ConsoleServer) DeleteStorageObject(ctx context.Context, in *console.DeleteStorageObjectRequest) (*empty.Empty, error)

func (*ConsoleServer) DeleteUsers

func (s *ConsoleServer) DeleteUsers(ctx context.Context, in *empty.Empty) (*empty.Empty, error)

func (*ConsoleServer) DeleteWalletLedger

func (s *ConsoleServer) DeleteWalletLedger(ctx context.Context, in *console.DeleteWalletLedgerRequest) (*empty.Empty, error)

func (*ConsoleServer) ExportAccount

func (s *ConsoleServer) ExportAccount(ctx context.Context, in *console.AccountId) (*console.AccountExport, error)

func (*ConsoleServer) GetAccount

func (s *ConsoleServer) GetAccount(ctx context.Context, in *console.AccountId) (*console.Account, error)

func (*ConsoleServer) GetConfig

func (s *ConsoleServer) GetConfig(ctx context.Context, in *empty.Empty) (*console.Config, error)

func (*ConsoleServer) GetFriends

func (s *ConsoleServer) GetFriends(ctx context.Context, in *console.AccountId) (*api.FriendList, error)

func (*ConsoleServer) GetGroups

func (s *ConsoleServer) GetGroups(ctx context.Context, in *console.AccountId) (*api.UserGroupList, error)

func (*ConsoleServer) GetStatus

func (s *ConsoleServer) GetStatus(ctx context.Context, in *empty.Empty) (*console.StatusList, error)

func (*ConsoleServer) GetStorage

func (*ConsoleServer) GetWalletLedger

func (s *ConsoleServer) GetWalletLedger(ctx context.Context, in *console.AccountId) (*console.WalletLedgerList, error)

func (*ConsoleServer) ListStorage

func (*ConsoleServer) ListUsers

func (*ConsoleServer) Stop

func (s *ConsoleServer) Stop()

func (*ConsoleServer) UnbanUser

func (s *ConsoleServer) UnbanUser(ctx context.Context, in *console.AccountId) (*empty.Empty, error)

func (*ConsoleServer) UnlinkApple added in v2.13.0

func (s *ConsoleServer) UnlinkApple(ctx context.Context, in *console.AccountId) (*empty.Empty, error)

func (*ConsoleServer) UnlinkCustom

func (s *ConsoleServer) UnlinkCustom(ctx context.Context, in *console.AccountId) (*empty.Empty, error)

func (*ConsoleServer) UnlinkDevice

func (s *ConsoleServer) UnlinkDevice(ctx context.Context, in *console.UnlinkDeviceRequest) (*empty.Empty, error)

func (*ConsoleServer) UnlinkEmail

func (s *ConsoleServer) UnlinkEmail(ctx context.Context, in *console.AccountId) (*empty.Empty, error)

func (*ConsoleServer) UnlinkFacebook

func (s *ConsoleServer) UnlinkFacebook(ctx context.Context, in *console.AccountId) (*empty.Empty, error)

func (*ConsoleServer) UnlinkFacebookInstantGame added in v2.11.0

func (s *ConsoleServer) UnlinkFacebookInstantGame(ctx context.Context, in *console.AccountId) (*empty.Empty, error)

func (*ConsoleServer) UnlinkGameCenter

func (s *ConsoleServer) UnlinkGameCenter(ctx context.Context, in *console.AccountId) (*empty.Empty, error)

func (*ConsoleServer) UnlinkGoogle

func (s *ConsoleServer) UnlinkGoogle(ctx context.Context, in *console.AccountId) (*empty.Empty, error)

func (*ConsoleServer) UnlinkSteam

func (s *ConsoleServer) UnlinkSteam(ctx context.Context, in *console.AccountId) (*empty.Empty, error)

func (*ConsoleServer) UpdateAccount

func (s *ConsoleServer) UpdateAccount(ctx context.Context, in *console.UpdateAccountRequest) (*empty.Empty, error)

func (*ConsoleServer) WriteStorageObject

type DatabaseConfig

type DatabaseConfig struct {
	Addresses         []string `` /* 135-byte string literal not displayed */
	ConnMaxLifetimeMs int      `` /* 199-byte string literal not displayed */
	MaxOpenConns      int      `yaml:"max_open_conns" json:"max_open_conns" usage:"Maximum number of allowed open connections to the database. Default 100."`
	MaxIdleConns      int      `` /* 135-byte string literal not displayed */
}

DatabaseConfig is configuration relevant to the Database storage.

func NewDatabaseConfig

func NewDatabaseConfig() *DatabaseConfig

NewDatabaseConfig creates a new DatabaseConfig struct.

type DeferredMessage

type DeferredMessage struct {
	PresenceIDs []*PresenceID
	Envelope    *rtapi.Envelope
	Reliable    bool
}

Deferred message expected to be batched with other deferred messages. All deferred messages in a batch are expected to be for the same stream/mode and share a logger context.

type ErrorCauser

type ErrorCauser interface {
	// Cause returns the proximate cause of this error.
	Cause() error
}

ErrorCauser is the type implemented by an error that remembers its cause.

ErrorCauser is intentionally equivalent to the causer interface used by the github.com/pkg/errors package.

type LSentinelType

type LSentinelType struct {
	lua.LNilType
}

func (*LSentinelType) String

func (s *LSentinelType) String() string

func (*LSentinelType) Type

func (s *LSentinelType) Type() lua.LValueType

type Leaderboard

type Leaderboard struct {
	Id               string
	Authoritative    bool
	SortOrder        int
	Operator         int
	ResetScheduleStr string
	ResetSchedule    *cronexpr.Expression
	Metadata         string
	CreateTime       int64
	Category         int
	Description      string
	Duration         int
	EndTime          int64
	JoinRequired     bool
	MaxSize          int
	MaxNumScore      int
	Title            string
	StartTime        int64
}

func (*Leaderboard) GetAuthoritative

func (l *Leaderboard) GetAuthoritative() bool

func (*Leaderboard) GetCreateTime

func (l *Leaderboard) GetCreateTime() int64

func (*Leaderboard) GetId

func (l *Leaderboard) GetId() string

func (*Leaderboard) GetMetadata

func (l *Leaderboard) GetMetadata() map[string]interface{}

func (*Leaderboard) GetOperator

func (l *Leaderboard) GetOperator() string

func (*Leaderboard) GetReset

func (l *Leaderboard) GetReset() string

func (*Leaderboard) GetSortOrder

func (l *Leaderboard) GetSortOrder() string

func (*Leaderboard) IsTournament

func (l *Leaderboard) IsTournament() bool

type LeaderboardCache

type LeaderboardCache interface {
	Get(id string) *Leaderboard
	GetAllLeaderboards() []*Leaderboard
	RefreshAllLeaderboards(ctx context.Context) error
	Create(ctx context.Context, id string, authoritative bool, sortOrder, operator int, resetSchedule, metadata string) (*Leaderboard, error)
	Insert(id string, authoritative bool, sortOrder, operator int, resetSchedule, metadata string, createTime int64)
	CreateTournament(ctx context.Context, id string, sortOrder, operator int, resetSchedule, metadata, title, description string, category, startTime, endTime, duration, maxSize, maxNumScore int, joinRequired bool) (*Leaderboard, error)
	InsertTournament(id string, sortOrder, operator int, resetSchedule, metadata, title, description string, category, duration, maxSize, maxNumScore int, joinRequired bool, createTime, startTime, endTime int64)
	ListTournaments(now int64, categoryStart, categoryEnd int, startTime, endTime int64, limit int, cursor *TournamentListCursor) ([]*Leaderboard, *TournamentListCursor, error)
	Delete(ctx context.Context, id string) error
	Remove(id string)
}

func NewLocalLeaderboardCache

func NewLocalLeaderboardCache(logger, startupLogger *zap.Logger, db *sql.DB) LeaderboardCache

type LeaderboardConfig

type LeaderboardConfig struct {
	BlacklistRankCache   []string `` /* 211-byte string literal not displayed */
	CallbackQueueSize    int      `` /* 175-byte string literal not displayed */
	CallbackQueueWorkers int      `` /* 170-byte string literal not displayed */
}

LeaderboardConfig is configuration relevant to the leaderboard system.

func NewLeaderboardConfig

func NewLeaderboardConfig() *LeaderboardConfig

NewLeaderboardConfig creates a new LeaderboardConfig struct.

type LeaderboardRankCache

type LeaderboardRankCache interface {
	Get(leaderboardId string, expiryUnix int64, ownerID uuid.UUID) int64
	Fill(leaderboardId string, expiryUnix int64, records []*api.LeaderboardRecord)
	Insert(leaderboardId string, expiryUnix int64, sortOrder int, ownerID uuid.UUID, score, subscore int64) int64
	Delete(leaderboardId string, expiryUnix int64, ownerID uuid.UUID) bool
	DeleteLeaderboard(leaderboardId string, expiryUnix int64) bool
	TrimExpired(nowUnix int64) bool
}

func NewLocalLeaderboardRankCache

func NewLocalLeaderboardRankCache(startupLogger *zap.Logger, db *sql.DB, config *LeaderboardConfig, leaderboardCache LeaderboardCache) LeaderboardRankCache

type LeaderboardScheduler

type LeaderboardScheduler interface {
	Start(runtime *Runtime)
	Pause()
	Resume()
	Stop()
	Update()
}

func NewLocalLeaderboardScheduler

func NewLocalLeaderboardScheduler(logger *zap.Logger, db *sql.DB, config Config, cache LeaderboardCache, rankCache LeaderboardRankCache) LeaderboardScheduler

type LeaderboardSchedulerCallback added in v2.8.0

type LeaderboardSchedulerCallback struct {
	// contains filtered or unexported fields
}

type LeaderboardWithExpiry

type LeaderboardWithExpiry struct {
	LeaderboardId string
	Expiry        int64
}

type LocalLeaderboardCache

type LocalLeaderboardCache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*LocalLeaderboardCache) Create

func (l *LocalLeaderboardCache) Create(ctx context.Context, id string, authoritative bool, sortOrder, operator int, resetSchedule, metadata string) (*Leaderboard, error)

func (*LocalLeaderboardCache) CreateTournament

func (l *LocalLeaderboardCache) CreateTournament(ctx context.Context, id string, sortOrder, operator int, resetSchedule, metadata, title, description string, category, startTime, endTime, duration, maxSize, maxNumScore int, joinRequired bool) (*Leaderboard, error)

func (*LocalLeaderboardCache) Delete

func (l *LocalLeaderboardCache) Delete(ctx context.Context, id string) error

func (*LocalLeaderboardCache) Get

func (*LocalLeaderboardCache) GetAllLeaderboards

func (l *LocalLeaderboardCache) GetAllLeaderboards() []*Leaderboard

func (*LocalLeaderboardCache) Insert

func (l *LocalLeaderboardCache) Insert(id string, authoritative bool, sortOrder, operator int, resetSchedule, metadata string, createTime int64)

func (*LocalLeaderboardCache) InsertTournament

func (l *LocalLeaderboardCache) InsertTournament(id string, sortOrder, operator int, resetSchedule, metadata, title, description string, category, duration, maxSize, maxNumScore int, joinRequired bool, createTime, startTime, endTime int64)

func (*LocalLeaderboardCache) ListTournaments added in v2.9.1

func (l *LocalLeaderboardCache) ListTournaments(now int64, categoryStart, categoryEnd int, startTime, endTime int64, limit int, cursor *TournamentListCursor) ([]*Leaderboard, *TournamentListCursor, error)

func (*LocalLeaderboardCache) RefreshAllLeaderboards

func (l *LocalLeaderboardCache) RefreshAllLeaderboards(ctx context.Context) error

func (*LocalLeaderboardCache) Remove

func (l *LocalLeaderboardCache) Remove(id string)

type LocalLeaderboardRankCache

type LocalLeaderboardRankCache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*LocalLeaderboardRankCache) Delete

func (l *LocalLeaderboardRankCache) Delete(leaderboardId string, expiryUnix int64, ownerID uuid.UUID) bool

func (*LocalLeaderboardRankCache) DeleteLeaderboard

func (l *LocalLeaderboardRankCache) DeleteLeaderboard(leaderboardId string, expiryUnix int64) bool

func (*LocalLeaderboardRankCache) Fill

func (l *LocalLeaderboardRankCache) Fill(leaderboardId string, expiryUnix int64, records []*api.LeaderboardRecord)

func (*LocalLeaderboardRankCache) Get

func (l *LocalLeaderboardRankCache) Get(leaderboardId string, expiryUnix int64, ownerID uuid.UUID) int64

func (*LocalLeaderboardRankCache) Insert

func (l *LocalLeaderboardRankCache) Insert(leaderboardId string, expiryUnix int64, sortOrder int, ownerID uuid.UUID, score, subscore int64) int64

func (*LocalLeaderboardRankCache) TrimExpired

func (l *LocalLeaderboardRankCache) TrimExpired(nowUnix int64) bool

type LocalLeaderboardScheduler

type LocalLeaderboardScheduler struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*LocalLeaderboardScheduler) Pause

func (ls *LocalLeaderboardScheduler) Pause()

func (*LocalLeaderboardScheduler) Resume

func (ls *LocalLeaderboardScheduler) Resume()

func (*LocalLeaderboardScheduler) Start

func (ls *LocalLeaderboardScheduler) Start(runtime *Runtime)

func (*LocalLeaderboardScheduler) Stop

func (ls *LocalLeaderboardScheduler) Stop()

func (*LocalLeaderboardScheduler) Update

func (ls *LocalLeaderboardScheduler) Update()

type LocalMatchRegistry

type LocalMatchRegistry struct {
	// contains filtered or unexported fields
}

func (*LocalMatchRegistry) Count

func (r *LocalMatchRegistry) Count() int

func (*LocalMatchRegistry) CreateMatch

func (r *LocalMatchRegistry) CreateMatch(ctx context.Context, logger *zap.Logger, createFn RuntimeMatchCreateFunction, module string, params map[string]interface{}) (string, error)

func (*LocalMatchRegistry) GetMatch

func (r *LocalMatchRegistry) GetMatch(ctx context.Context, id string) (*api.Match, error)

func (*LocalMatchRegistry) Join

func (r *LocalMatchRegistry) Join(id uuid.UUID, presences []*MatchPresence)

func (*LocalMatchRegistry) JoinAttempt

func (r *LocalMatchRegistry) JoinAttempt(ctx context.Context, id uuid.UUID, node string, userID, sessionID uuid.UUID, username string, sessionExpiry int64, vars map[string]string, clientIP, clientPort, fromNode string, metadata map[string]string) (bool, bool, bool, string, string, []*MatchPresence)

func (*LocalMatchRegistry) Kick

func (r *LocalMatchRegistry) Kick(stream PresenceStream, presences []*MatchPresence)

func (*LocalMatchRegistry) Leave

func (r *LocalMatchRegistry) Leave(id uuid.UUID, presences []*MatchPresence)

func (*LocalMatchRegistry) ListMatches

func (r *LocalMatchRegistry) ListMatches(ctx context.Context, limit int, authoritative *wrappers.BoolValue, label *wrappers.StringValue, minSize *wrappers.Int32Value, maxSize *wrappers.Int32Value, queryString *wrappers.StringValue) ([]*api.Match, error)

func (*LocalMatchRegistry) NewMatch

func (r *LocalMatchRegistry) NewMatch(logger *zap.Logger, id uuid.UUID, core RuntimeMatchCore, stopped *atomic.Bool, params map[string]interface{}) (*MatchHandler, error)

func (*LocalMatchRegistry) RemoveMatch

func (r *LocalMatchRegistry) RemoveMatch(id uuid.UUID, stream PresenceStream)

func (*LocalMatchRegistry) SendData

func (r *LocalMatchRegistry) SendData(id uuid.UUID, node string, userID, sessionID uuid.UUID, username, fromNode string, opCode int64, data []byte, reliable bool, receiveTime int64)

func (*LocalMatchRegistry) Stop

func (r *LocalMatchRegistry) Stop(graceSeconds int) chan struct{}

func (*LocalMatchRegistry) UpdateMatchLabel

func (r *LocalMatchRegistry) UpdateMatchLabel(id uuid.UUID, label string) error

type LocalMatchmaker

type LocalMatchmaker struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*LocalMatchmaker) Add

func (m *LocalMatchmaker) Add(session Session, query string, minCount int, maxCount int, stringProperties map[string]string, numericProperties map[string]float64) (string, []*MatchmakerEntry, error)

func (*LocalMatchmaker) Remove

func (m *LocalMatchmaker) Remove(sessionID uuid.UUID, ticket string) error

func (*LocalMatchmaker) RemoveAll

func (m *LocalMatchmaker) RemoveAll(sessionID uuid.UUID) error

type LocalMessageRouter

type LocalMessageRouter struct {
	// contains filtered or unexported fields
}

func (*LocalMessageRouter) SendDeferred

func (r *LocalMessageRouter) SendDeferred(logger *zap.Logger, messages []*DeferredMessage)

func (*LocalMessageRouter) SendToPresenceIDs

func (r *LocalMessageRouter) SendToPresenceIDs(logger *zap.Logger, presenceIDs []*PresenceID, envelope *rtapi.Envelope, reliable bool)

func (*LocalMessageRouter) SendToStream

func (r *LocalMessageRouter) SendToStream(logger *zap.Logger, stream PresenceStream, envelope *rtapi.Envelope, reliable bool)

type LocalSessionRegistry

type LocalSessionRegistry struct {
	// contains filtered or unexported fields
}

func (*LocalSessionRegistry) Add

func (r *LocalSessionRegistry) Add(session Session)

func (*LocalSessionRegistry) Count

func (r *LocalSessionRegistry) Count() int

func (*LocalSessionRegistry) Disconnect

func (r *LocalSessionRegistry) Disconnect(ctx context.Context, sessionID uuid.UUID) error

func (*LocalSessionRegistry) Get

func (r *LocalSessionRegistry) Get(sessionID uuid.UUID) Session

func (*LocalSessionRegistry) Remove

func (r *LocalSessionRegistry) Remove(sessionID uuid.UUID)

func (*LocalSessionRegistry) Stop

func (r *LocalSessionRegistry) Stop()

type LocalStatusHandler

type LocalStatusHandler struct {
	// contains filtered or unexported fields
}

func (*LocalStatusHandler) GetStatus

type LocalStreamManager

type LocalStreamManager struct {
	// contains filtered or unexported fields
}

func (*LocalStreamManager) UserJoin added in v2.13.0

func (m *LocalStreamManager) UserJoin(stream PresenceStream, userID, sessionID uuid.UUID, hidden, persistence bool, status string) (bool, bool, error)

func (*LocalStreamManager) UserLeave added in v2.13.0

func (m *LocalStreamManager) UserLeave(stream PresenceStream, userID, sessionID uuid.UUID) error

func (*LocalStreamManager) UserUpdate added in v2.13.0

func (m *LocalStreamManager) UserUpdate(stream PresenceStream, userID, sessionID uuid.UUID, hidden, persistence bool, status string) (bool, error)

type LocalTracker

type LocalTracker struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*LocalTracker) Count

func (t *LocalTracker) Count() int

func (*LocalTracker) CountByStream

func (t *LocalTracker) CountByStream(stream PresenceStream) int

func (*LocalTracker) CountByStreamModeFilter

func (t *LocalTracker) CountByStreamModeFilter(modes map[uint8]*uint8) map[*PresenceStream]int32

func (*LocalTracker) GetBySessionIDStreamUserID

func (t *LocalTracker) GetBySessionIDStreamUserID(node string, sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID) *PresenceMeta

func (*LocalTracker) GetLocalBySessionIDStreamUserID

func (t *LocalTracker) GetLocalBySessionIDStreamUserID(sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID) *PresenceMeta

func (*LocalTracker) ListByStream

func (t *LocalTracker) ListByStream(stream PresenceStream, includeHidden bool, includeNotHidden bool) []*Presence

func (*LocalTracker) ListLocalSessionIDByStream

func (t *LocalTracker) ListLocalSessionIDByStream(stream PresenceStream) []uuid.UUID

func (*LocalTracker) ListNodesForStream

func (t *LocalTracker) ListNodesForStream(stream PresenceStream) map[string]struct{}

func (*LocalTracker) ListPresenceIDByStream

func (t *LocalTracker) ListPresenceIDByStream(stream PresenceStream) []*PresenceID

func (*LocalTracker) SetMatchJoinListener

func (t *LocalTracker) SetMatchJoinListener(f func(id uuid.UUID, joins []*MatchPresence))

func (*LocalTracker) SetMatchLeaveListener

func (t *LocalTracker) SetMatchLeaveListener(f func(id uuid.UUID, leaves []*MatchPresence))

func (*LocalTracker) Stop

func (t *LocalTracker) Stop()

func (*LocalTracker) StreamExists

func (t *LocalTracker) StreamExists(stream PresenceStream) bool

func (*LocalTracker) Track

func (t *LocalTracker) Track(sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID, meta PresenceMeta, allowIfFirstForSession bool) (bool, bool)

func (*LocalTracker) Untrack

func (t *LocalTracker) Untrack(sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID)

func (*LocalTracker) UntrackAll

func (t *LocalTracker) UntrackAll(sessionID uuid.UUID)

func (*LocalTracker) UntrackByStream

func (t *LocalTracker) UntrackByStream(stream PresenceStream)

func (*LocalTracker) UntrackLocalByStream

func (t *LocalTracker) UntrackLocalByStream(stream PresenceStream)

func (*LocalTracker) Update

func (t *LocalTracker) Update(sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID, meta PresenceMeta, allowIfFirstForSession bool) bool

type LoggerConfig

type LoggerConfig struct {
	Level    string `yaml:"level" json:"level" usage:"Log level to set. Valid values are 'debug', 'info', 'warn', 'error'. Default 'info'."`
	Stdout   bool   `yaml:"stdout" json:"stdout" usage:"Log to standard console output (as well as to a file if set). Default true."`
	File     string `` /* 135-byte string literal not displayed */
	Rotation bool   `yaml:"rotation" json:"rotation" usage:"Rotate log files. Default is false."`
	// Reference: https://godoc.org/gopkg.in/natefinch/lumberjack.v2
	MaxSize    int    `` /* 139-byte string literal not displayed */
	MaxAge     int    `` /* 195-byte string literal not displayed */
	MaxBackups int    `` /* 188-byte string literal not displayed */
	LocalTime  bool   `` /* 184-byte string literal not displayed */
	Compress   bool   `yaml:"compress" json:"compress" usage:"This determines if the rotated log files should be compressed using gzip."`
	Format     string `yaml:"format" json:"format" usage:"Set logging output format. Can either be 'JSON' or 'Stackdriver'. Default is 'JSON'."`
}

LoggerConfig is configuration relevant to logging levels and output.

func NewLoggerConfig

func NewLoggerConfig() *LoggerConfig

NewLoggerConfig creates a new LoggerConfig struct.

type LoggingFormat

type LoggingFormat int8
const (
	JSONFormat LoggingFormat = iota - 1
	StackdriverFormat
)

type MatchConfig

type MatchConfig struct {
	InputQueueSize       int `` /* 181-byte string literal not displayed */
	CallQueueSize        int `` /* 176-byte string literal not displayed */
	JoinAttemptQueueSize int `` /* 174-byte string literal not displayed */
	DeferredQueueSize    int `` /* 190-byte string literal not displayed */
	JoinMarkerDeadlineMs int `` /* 198-byte string literal not displayed */
	MaxEmptySec          int `` /* 198-byte string literal not displayed */
}

MatchConfig is configuration relevant to authoritative realtime multiplayer matches.

func NewMatchConfig

func NewMatchConfig() *MatchConfig

NewMatchConfig creates a new MatchConfig struct.

type MatchDataMessage

type MatchDataMessage struct {
	UserID      uuid.UUID
	SessionID   uuid.UUID
	Username    string
	Node        string
	OpCode      int64
	Data        []byte
	Reliable    bool
	ReceiveTime int64
}

func (*MatchDataMessage) GetData

func (m *MatchDataMessage) GetData() []byte

func (*MatchDataMessage) GetHidden

func (m *MatchDataMessage) GetHidden() bool

func (*MatchDataMessage) GetNodeId

func (m *MatchDataMessage) GetNodeId() string

func (*MatchDataMessage) GetOpCode

func (m *MatchDataMessage) GetOpCode() int64

func (*MatchDataMessage) GetPersistence

func (m *MatchDataMessage) GetPersistence() bool

func (*MatchDataMessage) GetReceiveTime

func (m *MatchDataMessage) GetReceiveTime() int64

func (*MatchDataMessage) GetReliable

func (m *MatchDataMessage) GetReliable() bool

func (*MatchDataMessage) GetSessionId

func (m *MatchDataMessage) GetSessionId() string

func (*MatchDataMessage) GetStatus

func (m *MatchDataMessage) GetStatus() string

func (*MatchDataMessage) GetUserId

func (m *MatchDataMessage) GetUserId() string

func (*MatchDataMessage) GetUsername

func (m *MatchDataMessage) GetUsername() string

type MatchHandler

type MatchHandler struct {
	JoinMarkerList *MatchJoinMarkerList
	PresenceList   *MatchPresenceList

	// Identification not (directly) controlled by match init.
	ID     uuid.UUID
	Node   string
	IDStr  string
	Stream PresenceStream

	// Configuration set by match init.
	Rate int64
	// contains filtered or unexported fields
}

func NewMatchHandler

func NewMatchHandler(logger *zap.Logger, config Config, sessionRegistry SessionRegistry, matchRegistry MatchRegistry, router MessageRouter, core RuntimeMatchCore, id uuid.UUID, node string, stopped *atomic.Bool, params map[string]interface{}) (*MatchHandler, error)

func (*MatchHandler) Label

func (mh *MatchHandler) Label() string

func (*MatchHandler) QueueData

func (mh *MatchHandler) QueueData(m *MatchDataMessage)

func (*MatchHandler) QueueJoin

func (mh *MatchHandler) QueueJoin(joins []*MatchPresence, mark bool) bool

func (*MatchHandler) QueueJoinAttempt

func (mh *MatchHandler) QueueJoinAttempt(ctx context.Context, resultCh chan<- *MatchJoinResult, userID, sessionID uuid.UUID, username string, sessionExpiry int64, vars map[string]string, clientIP, clientPort, node string, metadata map[string]string) bool

func (*MatchHandler) QueueLeave

func (mh *MatchHandler) QueueLeave(leaves []*MatchPresence) bool

func (*MatchHandler) QueueTerminate

func (mh *MatchHandler) QueueTerminate(graceSeconds int) bool

func (*MatchHandler) Stop

func (mh *MatchHandler) Stop()

Stop the match handler and clean up all its resources.

type MatchIndexEntry

type MatchIndexEntry struct {
	Node        string                 `json:"node"`
	Label       map[string]interface{} `json:"label"`
	LabelString string                 `json:"label_string"`
}

type MatchJoinMarker

type MatchJoinMarker struct {
	// contains filtered or unexported fields
}

Used to monitor when match presences begin and complete their match join process.

type MatchJoinMarkerList

type MatchJoinMarkerList struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMatchJoinMarkerList

func NewMatchJoinMarkerList(config Config, tickRate int64) *MatchJoinMarkerList

func (*MatchJoinMarkerList) Add

func (m *MatchJoinMarkerList) Add(presence *MatchPresence, currentTick int64)

func (*MatchJoinMarkerList) ClearExpired

func (m *MatchJoinMarkerList) ClearExpired(tick int64) []*MatchPresence

func (*MatchJoinMarkerList) Mark

func (m *MatchJoinMarkerList) Mark(sessionID uuid.UUID)

type MatchJoinResult

type MatchJoinResult struct {
	Allow  bool
	Reason string
	Label  string
}

type MatchPresence

type MatchPresence struct {
	Node      string
	UserID    uuid.UUID
	SessionID uuid.UUID
	Username  string
}

Represents routing and identify information for a single match participant.

func (*MatchPresence) GetHidden

func (p *MatchPresence) GetHidden() bool

func (*MatchPresence) GetNodeId

func (p *MatchPresence) GetNodeId() string

func (*MatchPresence) GetPersistence

func (p *MatchPresence) GetPersistence() bool

func (*MatchPresence) GetSessionId

func (p *MatchPresence) GetSessionId() string

func (*MatchPresence) GetStatus

func (p *MatchPresence) GetStatus() string

func (*MatchPresence) GetUserId

func (p *MatchPresence) GetUserId() string

func (*MatchPresence) GetUsername

func (p *MatchPresence) GetUsername() string

type MatchPresenceList

type MatchPresenceList struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Maintains the match presences for routing and validation purposes.

func NewMatchPresenceList

func NewMatchPresenceList() *MatchPresenceList

func (*MatchPresenceList) Contains

func (m *MatchPresenceList) Contains(presence *PresenceID) bool

func (*MatchPresenceList) Join

func (m *MatchPresenceList) Join(joins []*MatchPresence) []*MatchPresence

func (*MatchPresenceList) Leave

func (m *MatchPresenceList) Leave(leaves []*MatchPresence) []*MatchPresence

func (*MatchPresenceList) ListPresenceIDs

func (m *MatchPresenceList) ListPresenceIDs() []*PresenceID

func (*MatchPresenceList) ListPresences

func (m *MatchPresenceList) ListPresences() []*MatchPresence

func (*MatchPresenceList) Size

func (m *MatchPresenceList) Size() int

type MatchPresenceListItem

type MatchPresenceListItem struct {
	PresenceID *PresenceID
	Presence   *MatchPresence
}

type MatchRegistry

type MatchRegistry interface {
	// Create and start a new match, given a Lua module name or registered Go match function.
	CreateMatch(ctx context.Context, logger *zap.Logger, createFn RuntimeMatchCreateFunction, module string, params map[string]interface{}) (string, error)
	// Register and initialise a match that's ready to run.
	NewMatch(logger *zap.Logger, id uuid.UUID, core RuntimeMatchCore, stopped *atomic.Bool, params map[string]interface{}) (*MatchHandler, error)
	// Return a match by ID.
	GetMatch(ctx context.Context, id string) (*api.Match, error)
	// Remove a tracked match and ensure all its presences are cleaned up.
	// Does not ensure the match process itself is no longer running, that must be handled separately.
	RemoveMatch(id uuid.UUID, stream PresenceStream)
	// Update the label entry for a given match.
	UpdateMatchLabel(id uuid.UUID, label string) error
	// List (and optionally filter) currently running matches.
	// This can list across both authoritative and relayed matches.
	ListMatches(ctx context.Context, limit int, authoritative *wrappers.BoolValue, label *wrappers.StringValue, minSize *wrappers.Int32Value, maxSize *wrappers.Int32Value, query *wrappers.StringValue) ([]*api.Match, error)
	// Stop the match registry and close all matches it's tracking.
	Stop(graceSeconds int) chan struct{}
	// Returns the total number of currently active authoritative matches.
	Count() int

	// Pass a user join attempt to a match handler. Returns if the match was found, if the join was accepted, if it's a new user for this match, a reason for any rejection, the match label, and the list of existing match participants.
	JoinAttempt(ctx context.Context, id uuid.UUID, node string, userID, sessionID uuid.UUID, username string, sessionExpiry int64, vars map[string]string, clientIP, clientPort, fromNode string, metadata map[string]string) (bool, bool, bool, string, string, []*MatchPresence)
	// Notify a match handler that one or more users have successfully joined the match.
	// Expects that the caller has already determined the match is hosted on the current node.
	Join(id uuid.UUID, presences []*MatchPresence)
	// Notify a match handler that one or more users have left or disconnected.
	// Expects that the caller has already determined the match is hosted on the current node.
	Leave(id uuid.UUID, presences []*MatchPresence)
	// Called by match handlers to request the removal fo a match participant.
	Kick(stream PresenceStream, presences []*MatchPresence)
	// Pass a data payload (usually from a user) to the appropriate match handler.
	// Assumes that the data sender has already been validated as a match participant before this call.
	SendData(id uuid.UUID, node string, userID, sessionID uuid.UUID, username, fromNode string, opCode int64, data []byte, reliable bool, receiveTime int64)
}

func NewLocalMatchRegistry

func NewLocalMatchRegistry(logger, startupLogger *zap.Logger, config Config, sessionRegistry SessionRegistry, tracker Tracker, router MessageRouter, metrics *Metrics, node string) MatchRegistry

type Matchmaker

type Matchmaker interface {
	Add(session Session, query string, minCount int, maxCount int, stringProperties map[string]string, numericProperties map[string]float64) (string, []*MatchmakerEntry, error)
	Remove(sessionID uuid.UUID, ticket string) error
	RemoveAll(sessionID uuid.UUID) error
}

func NewLocalMatchmaker

func NewLocalMatchmaker(startupLogger *zap.Logger, node string) Matchmaker

type MatchmakerEntry

type MatchmakerEntry struct {
	Ticket     string                 `json:"ticket"`
	Presence   *MatchmakerPresence    `json:"presence"`
	Properties map[string]interface{} `json:"properties"`
	// Cached for when we need them returned to clients, but not indexed.
	StringProperties  map[string]string  `json:"-"`
	NumericProperties map[string]float64 `json:"-"`
	SessionID         uuid.UUID          `json:"-"`
}

func (*MatchmakerEntry) GetPresence

func (m *MatchmakerEntry) GetPresence() runtime.Presence

func (*MatchmakerEntry) GetProperties

func (m *MatchmakerEntry) GetProperties() map[string]interface{}

func (*MatchmakerEntry) GetTicket

func (m *MatchmakerEntry) GetTicket() string

type MatchmakerPresence

type MatchmakerPresence struct {
	UserId    string `json:"user_id"`
	SessionId string `json:"session_id"`
	Username  string `json:"username"`
	Node      string `json:"node"`
}

func (*MatchmakerPresence) GetHidden

func (p *MatchmakerPresence) GetHidden() bool

func (*MatchmakerPresence) GetNodeId

func (p *MatchmakerPresence) GetNodeId() string

func (*MatchmakerPresence) GetPersistence

func (p *MatchmakerPresence) GetPersistence() bool

func (*MatchmakerPresence) GetSessionId

func (p *MatchmakerPresence) GetSessionId() string

func (*MatchmakerPresence) GetStatus

func (p *MatchmakerPresence) GetStatus() string

func (*MatchmakerPresence) GetUserId

func (p *MatchmakerPresence) GetUserId() string

func (*MatchmakerPresence) GetUsername

func (p *MatchmakerPresence) GetUsername() string

type MessageRouter

type MessageRouter interface {
	SendToPresenceIDs(*zap.Logger, []*PresenceID, *rtapi.Envelope, bool)
	SendToStream(*zap.Logger, PresenceStream, *rtapi.Envelope, bool)
	SendDeferred(*zap.Logger, []*DeferredMessage)
}

MessageRouter is responsible for sending a message to a list of presences or to an entire stream.

func NewLocalMessageRouter

func NewLocalMessageRouter(sessionRegistry SessionRegistry, tracker Tracker, jsonpbMarshaler *jsonpb.Marshaler) MessageRouter

type Metrics

type Metrics struct {
	SnapshotLatencyMs *atomic.Float64
	SnapshotRateSec   *atomic.Float64
	SnapshotRecvKbSec *atomic.Float64
	SnapshotSentKbSec *atomic.Float64
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics(logger, startupLogger *zap.Logger, config Config) *Metrics

func (*Metrics) Api added in v2.12.0

func (m *Metrics) Api(name string, elapsed time.Duration, recvBytes, sentBytes int64, isErr bool)

func (*Metrics) ApiAfter added in v2.12.0

func (m *Metrics) ApiAfter(name string, elapsed time.Duration, isErr bool)

func (*Metrics) ApiBefore added in v2.12.0

func (m *Metrics) ApiBefore(name string, elapsed time.Duration, isErr bool)

func (*Metrics) CountDroppedEvents added in v2.12.0

func (m *Metrics) CountDroppedEvents(delta int64)

Increment the number of dropped events.

func (*Metrics) CountWebsocketClosed added in v2.12.0

func (m *Metrics) CountWebsocketClosed(delta int64)

Increment the number of closed WS connections.

func (*Metrics) CountWebsocketOpened added in v2.12.0

func (m *Metrics) CountWebsocketOpened(delta int64)

Increment the number of opened WS connections.

func (*Metrics) GaugeAuthoritativeMatches added in v2.12.0

func (m *Metrics) GaugeAuthoritativeMatches(value float64)

Set the absolute value of currently running authoritative matches.

func (*Metrics) GaugePresences added in v2.14.0

func (m *Metrics) GaugePresences(value float64)

Set the absolute value of currently tracked presences.

func (*Metrics) GaugeRuntimes added in v2.12.0

func (m *Metrics) GaugeRuntimes(value float64)

Set the absolute value of currently allocated Lua runtime VMs.

func (*Metrics) GaugeSessions added in v2.12.0

func (m *Metrics) GaugeSessions(value float64)

Set the absolute value of currently active sessions.

func (*Metrics) Message added in v2.14.1

func (m *Metrics) Message(recvBytes int64, isErr bool)

func (*Metrics) MessageBytesSent added in v2.14.1

func (m *Metrics) MessageBytesSent(sentBytes int64)

func (*Metrics) Stop

func (m *Metrics) Stop(logger *zap.Logger)

type MetricsConfig

type MetricsConfig struct {
	ReportingFreqSec int    `yaml:"reporting_freq_sec" json:"reporting_freq_sec" usage:"Frequency of metrics exports. Default is 60 seconds."`
	Namespace        string `yaml:"namespace" json:"namespace" usage:"Namespace for Prometheus metrics. It will always prepend node name."`
	PrometheusPort   int    `yaml:"prometheus_port" json:"prometheus_port" usage:"Port to expose Prometheus. If '0' Prometheus exports are disabled."`
	Prefix           string `yaml:"prefix" json:"prefix" usage:"Prefix for metric names. Default is 'nakama', empty string '' disables the prefix."`
}

MetricsConfig is configuration relevant to metrics capturing and output.

func NewMetricsConfig

func NewMetricsConfig() *MetricsConfig

NewMetricsConfig creates a new MatricsConfig struct.

type MetricsGrpcHandler added in v2.12.0

type MetricsGrpcHandler struct {
	// contains filtered or unexported fields
}

func (*MetricsGrpcHandler) HandleConn added in v2.12.0

HandleConn processes the Conn stats.

func (*MetricsGrpcHandler) HandleRPC added in v2.12.0

func (m *MetricsGrpcHandler) HandleRPC(ctx context.Context, rs stats.RPCStats)

HandleRPC processes the RPC stats.

func (*MetricsGrpcHandler) TagConn added in v2.12.0

TagConn can attach some information to the given context. The returned context will be used for stats handling. For conn stats handling, the context used in HandleConn for this connection will be derived from the context returned. For RPC stats handling,

  • On server side, the context used in HandleRPC for all RPCs on this

connection will be derived from the context returned.

  • On client side, the context is not derived from the context returned.

func (*MetricsGrpcHandler) TagRPC added in v2.12.0

TagRPC can attach some information to the given context. The context used for the rest lifetime of the RPC will be derived from the returned context.

type OrderedTournaments added in v2.9.1

type OrderedTournaments []*Leaderboard

Type alias for a list of tournaments that binds together sorting functions. Not intended to be used for sorting lists of non-tournament leaderboards.

func (OrderedTournaments) Len added in v2.9.1

func (t OrderedTournaments) Len() int

func (OrderedTournaments) Less added in v2.9.1

func (t OrderedTournaments) Less(i, j int) bool

func (OrderedTournaments) Swap added in v2.9.1

func (t OrderedTournaments) Swap(i, j int)

type Pipeline

type Pipeline struct {
	// contains filtered or unexported fields
}

func NewPipeline

func NewPipeline(logger *zap.Logger, config Config, db *sql.DB, jsonpbMarshaler *jsonpb.Marshaler, jsonpbUnmarshaler *jsonpb.Unmarshaler, sessionRegistry SessionRegistry, matchRegistry MatchRegistry, matchmaker Matchmaker, tracker Tracker, router MessageRouter, runtime *Runtime) *Pipeline

func (*Pipeline) ProcessRequest

func (p *Pipeline) ProcessRequest(logger *zap.Logger, session Session, envelope *rtapi.Envelope) bool

type Presence

type Presence struct {
	ID     PresenceID
	Stream PresenceStream
	UserID uuid.UUID
	Meta   PresenceMeta
}

func (*Presence) GetHidden

func (p *Presence) GetHidden() bool

func (*Presence) GetNodeId

func (p *Presence) GetNodeId() string

func (*Presence) GetPersistence

func (p *Presence) GetPersistence() bool

func (*Presence) GetSessionId

func (p *Presence) GetSessionId() string

func (*Presence) GetStatus

func (p *Presence) GetStatus() string

func (*Presence) GetUserId

func (p *Presence) GetUserId() string

func (*Presence) GetUsername

func (p *Presence) GetUsername() string

type PresenceEvent

type PresenceEvent struct {
	Joins  []Presence
	Leaves []Presence
}

type PresenceID

type PresenceID struct {
	Node      string
	SessionID uuid.UUID
}

type PresenceMeta

type PresenceMeta struct {
	Format      SessionFormat
	Hidden      bool
	Persistence bool
	Username    string
	Status      string
}

func (*PresenceMeta) GetHidden

func (pm *PresenceMeta) GetHidden() bool

func (*PresenceMeta) GetPersistence

func (pm *PresenceMeta) GetPersistence() bool

func (*PresenceMeta) GetStatus

func (pm *PresenceMeta) GetStatus() string

func (*PresenceMeta) GetUsername

func (pm *PresenceMeta) GetUsername() string

type PresenceStream

type PresenceStream struct {
	Mode       uint8
	Subject    uuid.UUID
	Subcontext uuid.UUID
	Label      string
}

type RankAsc added in v2.14.0

type RankAsc struct {
	OwnerId  uuid.UUID
	Score    int64
	Subscore int64
}

func (*RankAsc) Less added in v2.14.0

func (r *RankAsc) Less(other interface{}) bool

type RankCache added in v2.14.0

type RankCache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

type RankDesc added in v2.14.0

type RankDesc struct {
	OwnerId  uuid.UUID
	Score    int64
	Subscore int64
}

func (*RankDesc) Less added in v2.14.0

func (r *RankDesc) Less(other interface{}) bool

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

func NewRuntime

func NewRuntime(logger, startupLogger *zap.Logger, db *sql.DB, jsonpbMarshaler *jsonpb.Marshaler, jsonpbUnmarshaler *jsonpb.Unmarshaler, config Config, socialClient *social.Client, leaderboardCache LeaderboardCache, leaderboardRankCache LeaderboardRankCache, leaderboardScheduler LeaderboardScheduler, sessionRegistry SessionRegistry, matchRegistry MatchRegistry, tracker Tracker, metrics *Metrics, streamManager StreamManager, router MessageRouter) (*Runtime, error)

func (*Runtime) AfterAddFriends

func (r *Runtime) AfterAddFriends() RuntimeAfterAddFriendsFunction

func (*Runtime) AfterAddGroupUsers

func (r *Runtime) AfterAddGroupUsers() RuntimeAfterAddGroupUsersFunction

func (*Runtime) AfterAuthenticateApple added in v2.13.0

func (r *Runtime) AfterAuthenticateApple() RuntimeAfterAuthenticateAppleFunction

func (*Runtime) AfterAuthenticateCustom

func (r *Runtime) AfterAuthenticateCustom() RuntimeAfterAuthenticateCustomFunction

func (*Runtime) AfterAuthenticateDevice

func (r *Runtime) AfterAuthenticateDevice() RuntimeAfterAuthenticateDeviceFunction

func (*Runtime) AfterAuthenticateEmail

func (r *Runtime) AfterAuthenticateEmail() RuntimeAfterAuthenticateEmailFunction

func (*Runtime) AfterAuthenticateFacebook

func (r *Runtime) AfterAuthenticateFacebook() RuntimeAfterAuthenticateFacebookFunction

func (*Runtime) AfterAuthenticateFacebookInstantGame added in v2.11.0

func (r *Runtime) AfterAuthenticateFacebookInstantGame() RuntimeAfterAuthenticateFacebookInstantGameFunction

func (*Runtime) AfterAuthenticateGameCenter

func (r *Runtime) AfterAuthenticateGameCenter() RuntimeAfterAuthenticateGameCenterFunction

func (*Runtime) AfterAuthenticateGoogle

func (r *Runtime) AfterAuthenticateGoogle() RuntimeAfterAuthenticateGoogleFunction

func (*Runtime) AfterAuthenticateSteam

func (r *Runtime) AfterAuthenticateSteam() RuntimeAfterAuthenticateSteamFunction

func (*Runtime) AfterBanGroupUsers added in v2.9.0

func (r *Runtime) AfterBanGroupUsers() RuntimeAfterBanGroupUsersFunction

func (*Runtime) AfterBlockFriends

func (r *Runtime) AfterBlockFriends() RuntimeAfterBlockFriendsFunction

func (*Runtime) AfterCreateGroup

func (r *Runtime) AfterCreateGroup() RuntimeAfterCreateGroupFunction

func (*Runtime) AfterDeleteFriends

func (r *Runtime) AfterDeleteFriends() RuntimeAfterDeleteFriendsFunction

func (*Runtime) AfterDeleteGroup

func (r *Runtime) AfterDeleteGroup() RuntimeAfterDeleteGroupFunction

func (*Runtime) AfterDeleteLeaderboardRecord

func (r *Runtime) AfterDeleteLeaderboardRecord() RuntimeAfterDeleteLeaderboardRecordFunction

func (*Runtime) AfterDeleteNotification

func (r *Runtime) AfterDeleteNotification() RuntimeAfterDeleteNotificationFunction

func (*Runtime) AfterDeleteStorageObjects

func (r *Runtime) AfterDeleteStorageObjects() RuntimeAfterDeleteStorageObjectsFunction

func (*Runtime) AfterDemoteGroupUsers added in v2.13.0

func (r *Runtime) AfterDemoteGroupUsers() RuntimeAfterDemoteGroupUsersFunction

func (*Runtime) AfterEvent added in v2.8.0

func (r *Runtime) AfterEvent() RuntimeAfterEventFunction

func (*Runtime) AfterGetAccount

func (r *Runtime) AfterGetAccount() RuntimeAfterGetAccountFunction

func (*Runtime) AfterGetUsers

func (r *Runtime) AfterGetUsers() RuntimeAfterGetUsersFunction

func (*Runtime) AfterImportFacebookFriends

func (r *Runtime) AfterImportFacebookFriends() RuntimeAfterImportFacebookFriendsFunction

func (*Runtime) AfterJoinGroup

func (r *Runtime) AfterJoinGroup() RuntimeAfterJoinGroupFunction

func (*Runtime) AfterJoinTournament

func (r *Runtime) AfterJoinTournament() RuntimeAfterJoinTournamentFunction

func (*Runtime) AfterKickGroupUsers

func (r *Runtime) AfterKickGroupUsers() RuntimeAfterKickGroupUsersFunction

func (*Runtime) AfterLeaveGroup

func (r *Runtime) AfterLeaveGroup() RuntimeAfterLeaveGroupFunction

func (*Runtime) AfterLinkApple added in v2.13.0

func (r *Runtime) AfterLinkApple() RuntimeAfterLinkAppleFunction

func (*Runtime) AfterLinkCustom

func (r *Runtime) AfterLinkCustom() RuntimeAfterLinkCustomFunction

func (*Runtime) AfterLinkDevice

func (r *Runtime) AfterLinkDevice() RuntimeAfterLinkDeviceFunction

func (*Runtime) AfterLinkEmail

func (r *Runtime) AfterLinkEmail() RuntimeAfterLinkEmailFunction

func (*Runtime) AfterLinkFacebook

func (r *Runtime) AfterLinkFacebook() RuntimeAfterLinkFacebookFunction

func (*Runtime) AfterLinkFacebookInstantGame added in v2.11.0

func (r *Runtime) AfterLinkFacebookInstantGame() RuntimeAfterLinkFacebookInstantGameFunction

func (*Runtime) AfterLinkGameCenter

func (r *Runtime) AfterLinkGameCenter() RuntimeAfterLinkGameCenterFunction

func (*Runtime) AfterLinkGoogle

func (r *Runtime) AfterLinkGoogle() RuntimeAfterLinkGoogleFunction

func (*Runtime) AfterLinkSteam

func (r *Runtime) AfterLinkSteam() RuntimeAfterLinkSteamFunction

func (*Runtime) AfterListChannelMessages

func (r *Runtime) AfterListChannelMessages() RuntimeAfterListChannelMessagesFunction

func (*Runtime) AfterListFriends

func (r *Runtime) AfterListFriends() RuntimeAfterListFriendsFunction

func (*Runtime) AfterListGroupUsers

func (r *Runtime) AfterListGroupUsers() RuntimeAfterListGroupUsersFunction

func (*Runtime) AfterListGroups

func (r *Runtime) AfterListGroups() RuntimeAfterListGroupsFunction

func (*Runtime) AfterListLeaderboardRecords

func (r *Runtime) AfterListLeaderboardRecords() RuntimeAfterListLeaderboardRecordsFunction

func (*Runtime) AfterListLeaderboardRecordsAroundOwner

func (r *Runtime) AfterListLeaderboardRecordsAroundOwner() RuntimeAfterListLeaderboardRecordsAroundOwnerFunction

func (*Runtime) AfterListMatches

func (r *Runtime) AfterListMatches() RuntimeAfterListMatchesFunction

func (*Runtime) AfterListNotifications

func (r *Runtime) AfterListNotifications() RuntimeAfterListNotificationsFunction

func (*Runtime) AfterListStorageObjects

func (r *Runtime) AfterListStorageObjects() RuntimeAfterListStorageObjectsFunction

func (*Runtime) AfterListTournamentRecords

func (r *Runtime) AfterListTournamentRecords() RuntimeAfterListTournamentRecordsFunction

func (*Runtime) AfterListTournamentRecordsAroundOwner

func (r *Runtime) AfterListTournamentRecordsAroundOwner() RuntimeAfterListTournamentRecordsAroundOwnerFunction

func (*Runtime) AfterListTournaments

func (r *Runtime) AfterListTournaments() RuntimeAfterListTournamentsFunction

func (*Runtime) AfterListUserGroups

func (r *Runtime) AfterListUserGroups() RuntimeAfterListUserGroupsFunction

func (*Runtime) AfterPromoteGroupUsers

func (r *Runtime) AfterPromoteGroupUsers() RuntimeAfterPromoteGroupUsersFunction

func (*Runtime) AfterReadStorageObjects

func (r *Runtime) AfterReadStorageObjects() RuntimeAfterReadStorageObjectsFunction

func (*Runtime) AfterRt

func (r *Runtime) AfterRt(id string) RuntimeAfterRtFunction

func (*Runtime) AfterUnlinkApple added in v2.13.0

func (r *Runtime) AfterUnlinkApple() RuntimeAfterUnlinkAppleFunction

func (*Runtime) AfterUnlinkCustom

func (r *Runtime) AfterUnlinkCustom() RuntimeAfterUnlinkCustomFunction

func (*Runtime) AfterUnlinkDevice

func (r *Runtime) AfterUnlinkDevice() RuntimeAfterUnlinkDeviceFunction

func (*Runtime) AfterUnlinkEmail

func (r *Runtime) AfterUnlinkEmail() RuntimeAfterUnlinkEmailFunction

func (*Runtime) AfterUnlinkFacebook

func (r *Runtime) AfterUnlinkFacebook() RuntimeAfterUnlinkFacebookFunction

func (*Runtime) AfterUnlinkFacebookInstantGame added in v2.11.0

func (r *Runtime) AfterUnlinkFacebookInstantGame() RuntimeAfterUnlinkFacebookInstantGameFunction

func (*Runtime) AfterUnlinkGameCenter

func (r *Runtime) AfterUnlinkGameCenter() RuntimeAfterUnlinkGameCenterFunction

func (*Runtime) AfterUnlinkGoogle

func (r *Runtime) AfterUnlinkGoogle() RuntimeAfterUnlinkGoogleFunction

func (*Runtime) AfterUnlinkSteam

func (r *Runtime) AfterUnlinkSteam() RuntimeAfterUnlinkSteamFunction

func (*Runtime) AfterUpdateAccount

func (r *Runtime) AfterUpdateAccount() RuntimeAfterUpdateAccountFunction

func (*Runtime) AfterUpdateGroup

func (r *Runtime) AfterUpdateGroup() RuntimeAfterUpdateGroupFunction

func (*Runtime) AfterWriteLeaderboardRecord

func (r *Runtime) AfterWriteLeaderboardRecord() RuntimeAfterWriteLeaderboardRecordFunction

func (*Runtime) AfterWriteStorageObjects

func (r *Runtime) AfterWriteStorageObjects() RuntimeAfterWriteStorageObjectsFunction

func (*Runtime) AfterWriteTournamentRecord

func (r *Runtime) AfterWriteTournamentRecord() RuntimeAfterWriteTournamentRecordFunction

func (*Runtime) BeforeAddFriends

func (r *Runtime) BeforeAddFriends() RuntimeBeforeAddFriendsFunction

func (*Runtime) BeforeAddGroupUsers

func (r *Runtime) BeforeAddGroupUsers() RuntimeBeforeAddGroupUsersFunction

func (*Runtime) BeforeAuthenticateApple added in v2.13.0

func (r *Runtime) BeforeAuthenticateApple() RuntimeBeforeAuthenticateAppleFunction

func (*Runtime) BeforeAuthenticateCustom

func (r *Runtime) BeforeAuthenticateCustom() RuntimeBeforeAuthenticateCustomFunction

func (*Runtime) BeforeAuthenticateDevice

func (r *Runtime) BeforeAuthenticateDevice() RuntimeBeforeAuthenticateDeviceFunction

func (*Runtime) BeforeAuthenticateEmail

func (r *Runtime) BeforeAuthenticateEmail() RuntimeBeforeAuthenticateEmailFunction

func (*Runtime) BeforeAuthenticateFacebook

func (r *Runtime) BeforeAuthenticateFacebook() RuntimeBeforeAuthenticateFacebookFunction

func (*Runtime) BeforeAuthenticateFacebookInstantGame added in v2.11.0

func (r *Runtime) BeforeAuthenticateFacebookInstantGame() RuntimeBeforeAuthenticateFacebookInstantGameFunction

func (*Runtime) BeforeAuthenticateGameCenter

func (r *Runtime) BeforeAuthenticateGameCenter() RuntimeBeforeAuthenticateGameCenterFunction

func (*Runtime) BeforeAuthenticateGoogle

func (r *Runtime) BeforeAuthenticateGoogle() RuntimeBeforeAuthenticateGoogleFunction

func (*Runtime) BeforeAuthenticateSteam

func (r *Runtime) BeforeAuthenticateSteam() RuntimeBeforeAuthenticateSteamFunction

func (*Runtime) BeforeBanGroupUsers added in v2.9.0

func (r *Runtime) BeforeBanGroupUsers() RuntimeBeforeBanGroupUsersFunction

func (*Runtime) BeforeBlockFriends

func (r *Runtime) BeforeBlockFriends() RuntimeBeforeBlockFriendsFunction

func (*Runtime) BeforeCreateGroup

func (r *Runtime) BeforeCreateGroup() RuntimeBeforeCreateGroupFunction

func (*Runtime) BeforeDeleteFriends

func (r *Runtime) BeforeDeleteFriends() RuntimeBeforeDeleteFriendsFunction

func (*Runtime) BeforeDeleteGroup

func (r *Runtime) BeforeDeleteGroup() RuntimeBeforeDeleteGroupFunction

func (*Runtime) BeforeDeleteLeaderboardRecord

func (r *Runtime) BeforeDeleteLeaderboardRecord() RuntimeBeforeDeleteLeaderboardRecordFunction

func (*Runtime) BeforeDeleteNotification

func (r *Runtime) BeforeDeleteNotification() RuntimeBeforeDeleteNotificationFunction

func (*Runtime) BeforeDeleteStorageObjects

func (r *Runtime) BeforeDeleteStorageObjects() RuntimeBeforeDeleteStorageObjectsFunction

func (*Runtime) BeforeDemoteGroupUsers added in v2.13.0

func (r *Runtime) BeforeDemoteGroupUsers() RuntimeBeforeDemoteGroupUsersFunction

func (*Runtime) BeforeEvent added in v2.8.0

func (r *Runtime) BeforeEvent() RuntimeBeforeEventFunction

func (*Runtime) BeforeGetAccount

func (r *Runtime) BeforeGetAccount() RuntimeBeforeGetAccountFunction

func (*Runtime) BeforeGetUsers

func (r *Runtime) BeforeGetUsers() RuntimeBeforeGetUsersFunction

func (*Runtime) BeforeImportFacebookFriends

func (r *Runtime) BeforeImportFacebookFriends() RuntimeBeforeImportFacebookFriendsFunction

func (*Runtime) BeforeJoinGroup

func (r *Runtime) BeforeJoinGroup() RuntimeBeforeJoinGroupFunction

func (*Runtime) BeforeJoinTournament

func (r *Runtime) BeforeJoinTournament() RuntimeBeforeJoinTournamentFunction

func (*Runtime) BeforeKickGroupUsers

func (r *Runtime) BeforeKickGroupUsers() RuntimeBeforeKickGroupUsersFunction

func (*Runtime) BeforeLeaveGroup

func (r *Runtime) BeforeLeaveGroup() RuntimeBeforeLeaveGroupFunction

func (*Runtime) BeforeLinkApple added in v2.13.0

func (r *Runtime) BeforeLinkApple() RuntimeBeforeLinkAppleFunction

func (*Runtime) BeforeLinkCustom

func (r *Runtime) BeforeLinkCustom() RuntimeBeforeLinkCustomFunction

func (*Runtime) BeforeLinkDevice

func (r *Runtime) BeforeLinkDevice() RuntimeBeforeLinkDeviceFunction

func (*Runtime) BeforeLinkEmail

func (r *Runtime) BeforeLinkEmail() RuntimeBeforeLinkEmailFunction

func (*Runtime) BeforeLinkFacebook

func (r *Runtime) BeforeLinkFacebook() RuntimeBeforeLinkFacebookFunction

func (*Runtime) BeforeLinkFacebookInstantGame added in v2.11.0

func (r *Runtime) BeforeLinkFacebookInstantGame() RuntimeBeforeLinkFacebookInstantGameFunction

func (*Runtime) BeforeLinkGameCenter

func (r *Runtime) BeforeLinkGameCenter() RuntimeBeforeLinkGameCenterFunction

func (*Runtime) BeforeLinkGoogle

func (r *Runtime) BeforeLinkGoogle() RuntimeBeforeLinkGoogleFunction

func (*Runtime) BeforeLinkSteam

func (r *Runtime) BeforeLinkSteam() RuntimeBeforeLinkSteamFunction

func (*Runtime) BeforeListChannelMessages

func (r *Runtime) BeforeListChannelMessages() RuntimeBeforeListChannelMessagesFunction

func (*Runtime) BeforeListFriends

func (r *Runtime) BeforeListFriends() RuntimeBeforeListFriendsFunction

func (*Runtime) BeforeListGroupUsers

func (r *Runtime) BeforeListGroupUsers() RuntimeBeforeListGroupUsersFunction

func (*Runtime) BeforeListGroups

func (r *Runtime) BeforeListGroups() RuntimeBeforeListGroupsFunction

func (*Runtime) BeforeListLeaderboardRecords

func (r *Runtime) BeforeListLeaderboardRecords() RuntimeBeforeListLeaderboardRecordsFunction

func (*Runtime) BeforeListLeaderboardRecordsAroundOwner

func (r *Runtime) BeforeListLeaderboardRecordsAroundOwner() RuntimeBeforeListLeaderboardRecordsAroundOwnerFunction

func (*Runtime) BeforeListMatches

func (r *Runtime) BeforeListMatches() RuntimeBeforeListMatchesFunction

func (*Runtime) BeforeListNotifications

func (r *Runtime) BeforeListNotifications() RuntimeBeforeListNotificationsFunction

func (*Runtime) BeforeListStorageObjects

func (r *Runtime) BeforeListStorageObjects() RuntimeBeforeListStorageObjectsFunction

func (*Runtime) BeforeListTournamentRecords

func (r *Runtime) BeforeListTournamentRecords() RuntimeBeforeListTournamentRecordsFunction

func (*Runtime) BeforeListTournamentRecordsAroundOwner

func (r *Runtime) BeforeListTournamentRecordsAroundOwner() RuntimeBeforeListTournamentRecordsAroundOwnerFunction

func (*Runtime) BeforeListTournaments

func (r *Runtime) BeforeListTournaments() RuntimeBeforeListTournamentsFunction

func (*Runtime) BeforeListUserGroups

func (r *Runtime) BeforeListUserGroups() RuntimeBeforeListUserGroupsFunction

func (*Runtime) BeforePromoteGroupUsers

func (r *Runtime) BeforePromoteGroupUsers() RuntimeBeforePromoteGroupUsersFunction

func (*Runtime) BeforeReadStorageObjects

func (r *Runtime) BeforeReadStorageObjects() RuntimeBeforeReadStorageObjectsFunction

func (*Runtime) BeforeRt

func (r *Runtime) BeforeRt(id string) RuntimeBeforeRtFunction

func (*Runtime) BeforeUnlinkApple added in v2.13.0

func (r *Runtime) BeforeUnlinkApple() RuntimeBeforeUnlinkAppleFunction

func (*Runtime) BeforeUnlinkCustom

func (r *Runtime) BeforeUnlinkCustom() RuntimeBeforeUnlinkCustomFunction

func (*Runtime) BeforeUnlinkDevice

func (r *Runtime) BeforeUnlinkDevice() RuntimeBeforeUnlinkDeviceFunction

func (*Runtime) BeforeUnlinkEmail

func (r *Runtime) BeforeUnlinkEmail() RuntimeBeforeUnlinkEmailFunction

func (*Runtime) BeforeUnlinkFacebook

func (r *Runtime) BeforeUnlinkFacebook() RuntimeBeforeUnlinkFacebookFunction

func (*Runtime) BeforeUnlinkFacebookInstantGame added in v2.11.0

func (r *Runtime) BeforeUnlinkFacebookInstantGame() RuntimeBeforeUnlinkFacebookInstantGameFunction

func (*Runtime) BeforeUnlinkGameCenter

func (r *Runtime) BeforeUnlinkGameCenter() RuntimeBeforeUnlinkGameCenterFunction

func (*Runtime) BeforeUnlinkGoogle

func (r *Runtime) BeforeUnlinkGoogle() RuntimeBeforeUnlinkGoogleFunction

func (*Runtime) BeforeUnlinkSteam

func (r *Runtime) BeforeUnlinkSteam() RuntimeBeforeUnlinkSteamFunction

func (*Runtime) BeforeUpdateAccount

func (r *Runtime) BeforeUpdateAccount() RuntimeBeforeUpdateAccountFunction

func (*Runtime) BeforeUpdateGroup

func (r *Runtime) BeforeUpdateGroup() RuntimeBeforeUpdateGroupFunction

func (*Runtime) BeforeWriteLeaderboardRecord

func (r *Runtime) BeforeWriteLeaderboardRecord() RuntimeBeforeWriteLeaderboardRecordFunction

func (*Runtime) BeforeWriteStorageObjects

func (r *Runtime) BeforeWriteStorageObjects() RuntimeBeforeWriteStorageObjectsFunction

func (*Runtime) BeforeWriteTournamentRecord

func (r *Runtime) BeforeWriteTournamentRecord() RuntimeBeforeWriteTournamentRecordFunction

func (*Runtime) Event added in v2.8.0

func (*Runtime) EventSessionEnd

func (r *Runtime) EventSessionEnd() RuntimeEventSessionEndFunction

func (*Runtime) EventSessionStart

func (r *Runtime) EventSessionStart() RuntimeEventSessionStartFunction

func (*Runtime) LeaderboardReset

func (r *Runtime) LeaderboardReset() RuntimeLeaderboardResetFunction

func (*Runtime) MatchCreateFunction

func (r *Runtime) MatchCreateFunction() RuntimeMatchCreateFunction

func (*Runtime) MatchmakerMatched

func (r *Runtime) MatchmakerMatched() RuntimeMatchmakerMatchedFunction

func (*Runtime) Rpc

func (r *Runtime) Rpc(id string) RuntimeRpcFunction

func (*Runtime) TournamentEnd

func (r *Runtime) TournamentEnd() RuntimeTournamentEndFunction

func (*Runtime) TournamentReset

func (r *Runtime) TournamentReset() RuntimeTournamentResetFunction

type RuntimeAfterAddFriendsFunction

type RuntimeAfterAddFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AddFriendsRequest) error

type RuntimeAfterAddGroupUsersFunction

type RuntimeAfterAddGroupUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AddGroupUsersRequest) error

type RuntimeAfterAuthenticateAppleFunction added in v2.13.0

type RuntimeAfterAuthenticateAppleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.Session, in *api.AuthenticateAppleRequest) error

type RuntimeAfterAuthenticateCustomFunction

type RuntimeAfterAuthenticateCustomFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.Session, in *api.AuthenticateCustomRequest) error

type RuntimeAfterAuthenticateDeviceFunction

type RuntimeAfterAuthenticateDeviceFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.Session, in *api.AuthenticateDeviceRequest) error

type RuntimeAfterAuthenticateEmailFunction

type RuntimeAfterAuthenticateEmailFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.Session, in *api.AuthenticateEmailRequest) error

type RuntimeAfterAuthenticateFacebookFunction

type RuntimeAfterAuthenticateFacebookFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.Session, in *api.AuthenticateFacebookRequest) error

type RuntimeAfterAuthenticateFacebookInstantGameFunction added in v2.11.0

type RuntimeAfterAuthenticateFacebookInstantGameFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.Session, in *api.AuthenticateFacebookInstantGameRequest) error

type RuntimeAfterAuthenticateGameCenterFunction

type RuntimeAfterAuthenticateGameCenterFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.Session, in *api.AuthenticateGameCenterRequest) error

type RuntimeAfterAuthenticateGoogleFunction

type RuntimeAfterAuthenticateGoogleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.Session, in *api.AuthenticateGoogleRequest) error

type RuntimeAfterAuthenticateSteamFunction

type RuntimeAfterAuthenticateSteamFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.Session, in *api.AuthenticateSteamRequest) error

type RuntimeAfterBanGroupUsersFunction added in v2.9.0

type RuntimeAfterBanGroupUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.BanGroupUsersRequest) error

type RuntimeAfterBlockFriendsFunction

type RuntimeAfterBlockFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.BlockFriendsRequest) error

type RuntimeAfterCreateGroupFunction

type RuntimeAfterCreateGroupFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.Group, in *api.CreateGroupRequest) error

type RuntimeAfterDeleteFriendsFunction

type RuntimeAfterDeleteFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.DeleteFriendsRequest) error

type RuntimeAfterDeleteGroupFunction

type RuntimeAfterDeleteGroupFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.DeleteGroupRequest) error

type RuntimeAfterDeleteLeaderboardRecordFunction

type RuntimeAfterDeleteLeaderboardRecordFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.DeleteLeaderboardRecordRequest) error

type RuntimeAfterDeleteNotificationFunction

type RuntimeAfterDeleteNotificationFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.DeleteNotificationsRequest) error

type RuntimeAfterDeleteStorageObjectsFunction

type RuntimeAfterDeleteStorageObjectsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.DeleteStorageObjectsRequest) error

type RuntimeAfterDemoteGroupUsersFunction added in v2.13.0

type RuntimeAfterDemoteGroupUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.DemoteGroupUsersRequest) error

type RuntimeAfterEventFunction added in v2.8.0

type RuntimeAfterEventFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.Event) error

type RuntimeAfterGetAccountFunction

type RuntimeAfterGetAccountFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.Account) error

type RuntimeAfterGetUsersFunction

type RuntimeAfterGetUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.Users, in *api.GetUsersRequest) error

type RuntimeAfterImportFacebookFriendsFunction

type RuntimeAfterImportFacebookFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ImportFacebookFriendsRequest) error

type RuntimeAfterJoinGroupFunction

type RuntimeAfterJoinGroupFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.JoinGroupRequest) error

type RuntimeAfterJoinTournamentFunction

type RuntimeAfterJoinTournamentFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.JoinTournamentRequest) error

type RuntimeAfterKickGroupUsersFunction

type RuntimeAfterKickGroupUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.KickGroupUsersRequest) error

type RuntimeAfterLeaveGroupFunction

type RuntimeAfterLeaveGroupFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.LeaveGroupRequest) error

type RuntimeAfterLinkAppleFunction added in v2.13.0

type RuntimeAfterLinkAppleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountApple) error

type RuntimeAfterLinkCustomFunction

type RuntimeAfterLinkCustomFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountCustom) error

type RuntimeAfterLinkDeviceFunction

type RuntimeAfterLinkDeviceFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountDevice) error

type RuntimeAfterLinkEmailFunction

type RuntimeAfterLinkEmailFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountEmail) error

type RuntimeAfterLinkFacebookFunction

type RuntimeAfterLinkFacebookFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.LinkFacebookRequest) error

type RuntimeAfterLinkFacebookInstantGameFunction added in v2.11.0

type RuntimeAfterLinkFacebookInstantGameFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountFacebookInstantGame) error

type RuntimeAfterLinkGameCenterFunction

type RuntimeAfterLinkGameCenterFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountGameCenter) error

type RuntimeAfterLinkGoogleFunction

type RuntimeAfterLinkGoogleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountGoogle) error

type RuntimeAfterLinkSteamFunction

type RuntimeAfterLinkSteamFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountSteam) error

type RuntimeAfterListChannelMessagesFunction

type RuntimeAfterListChannelMessagesFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.ChannelMessageList, in *api.ListChannelMessagesRequest) error

type RuntimeAfterListFriendsFunction

type RuntimeAfterListFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.FriendList) error

type RuntimeAfterListGroupUsersFunction

type RuntimeAfterListGroupUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.GroupUserList, in *api.ListGroupUsersRequest) error

type RuntimeAfterListGroupsFunction

type RuntimeAfterListGroupsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.GroupList, in *api.ListGroupsRequest) error

type RuntimeAfterListLeaderboardRecordsAroundOwnerFunction

type RuntimeAfterListLeaderboardRecordsAroundOwnerFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.LeaderboardRecordList, in *api.ListLeaderboardRecordsAroundOwnerRequest) error

type RuntimeAfterListLeaderboardRecordsFunction

type RuntimeAfterListLeaderboardRecordsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.LeaderboardRecordList, in *api.ListLeaderboardRecordsRequest) error

type RuntimeAfterListMatchesFunction

type RuntimeAfterListMatchesFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.MatchList, in *api.ListMatchesRequest) error

type RuntimeAfterListNotificationsFunction

type RuntimeAfterListNotificationsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.NotificationList, in *api.ListNotificationsRequest) error

type RuntimeAfterListStorageObjectsFunction

type RuntimeAfterListStorageObjectsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.StorageObjectList, in *api.ListStorageObjectsRequest) error

type RuntimeAfterListTournamentRecordsAroundOwnerFunction

type RuntimeAfterListTournamentRecordsAroundOwnerFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.TournamentRecordList, in *api.ListTournamentRecordsAroundOwnerRequest) error

type RuntimeAfterListTournamentRecordsFunction

type RuntimeAfterListTournamentRecordsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.TournamentRecordList, in *api.ListTournamentRecordsRequest) error

type RuntimeAfterListTournamentsFunction

type RuntimeAfterListTournamentsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.TournamentList, in *api.ListTournamentsRequest) error

type RuntimeAfterListUserGroupsFunction

type RuntimeAfterListUserGroupsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.UserGroupList, in *api.ListUserGroupsRequest) error

type RuntimeAfterPromoteGroupUsersFunction

type RuntimeAfterPromoteGroupUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.PromoteGroupUsersRequest) error

type RuntimeAfterReadStorageObjectsFunction

type RuntimeAfterReadStorageObjectsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.StorageObjects, in *api.ReadStorageObjectsRequest) error

type RuntimeAfterReqFunctions

type RuntimeAfterReqFunctions struct {
	// contains filtered or unexported fields
}

type RuntimeAfterRtFunction

type RuntimeAfterRtFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, sessionID, clientIP, clientPort string, envelope *rtapi.Envelope) error

type RuntimeAfterUnlinkAppleFunction added in v2.13.0

type RuntimeAfterUnlinkAppleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountApple) error

type RuntimeAfterUnlinkCustomFunction

type RuntimeAfterUnlinkCustomFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountCustom) error

type RuntimeAfterUnlinkDeviceFunction

type RuntimeAfterUnlinkDeviceFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountDevice) error

type RuntimeAfterUnlinkEmailFunction

type RuntimeAfterUnlinkEmailFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountEmail) error

type RuntimeAfterUnlinkFacebookFunction

type RuntimeAfterUnlinkFacebookFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountFacebook) error

type RuntimeAfterUnlinkFacebookInstantGameFunction added in v2.11.0

type RuntimeAfterUnlinkFacebookInstantGameFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountFacebookInstantGame) error

type RuntimeAfterUnlinkGameCenterFunction

type RuntimeAfterUnlinkGameCenterFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountGameCenter) error

type RuntimeAfterUnlinkGoogleFunction

type RuntimeAfterUnlinkGoogleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountGoogle) error

type RuntimeAfterUnlinkSteamFunction

type RuntimeAfterUnlinkSteamFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountSteam) error

type RuntimeAfterUpdateAccountFunction

type RuntimeAfterUpdateAccountFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.UpdateAccountRequest) error

type RuntimeAfterUpdateGroupFunction

type RuntimeAfterUpdateGroupFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.UpdateGroupRequest) error

type RuntimeAfterWriteLeaderboardRecordFunction

type RuntimeAfterWriteLeaderboardRecordFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.LeaderboardRecord, in *api.WriteLeaderboardRecordRequest) error

type RuntimeAfterWriteStorageObjectsFunction

type RuntimeAfterWriteStorageObjectsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.StorageObjectAcks, in *api.WriteStorageObjectsRequest) error

type RuntimeAfterWriteTournamentRecordFunction

type RuntimeAfterWriteTournamentRecordFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.LeaderboardRecord, in *api.WriteTournamentRecordRequest) error

type RuntimeBeforeAddFriendsFunction

type RuntimeBeforeAddFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AddFriendsRequest) (*api.AddFriendsRequest, error, codes.Code)

type RuntimeBeforeAddGroupUsersFunction

type RuntimeBeforeAddGroupUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AddGroupUsersRequest) (*api.AddGroupUsersRequest, error, codes.Code)

type RuntimeBeforeAuthenticateAppleFunction added in v2.13.0

type RuntimeBeforeAuthenticateAppleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AuthenticateAppleRequest) (*api.AuthenticateAppleRequest, error, codes.Code)

type RuntimeBeforeAuthenticateCustomFunction

type RuntimeBeforeAuthenticateCustomFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AuthenticateCustomRequest) (*api.AuthenticateCustomRequest, error, codes.Code)

type RuntimeBeforeAuthenticateDeviceFunction

type RuntimeBeforeAuthenticateDeviceFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AuthenticateDeviceRequest) (*api.AuthenticateDeviceRequest, error, codes.Code)

type RuntimeBeforeAuthenticateEmailFunction

type RuntimeBeforeAuthenticateEmailFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AuthenticateEmailRequest) (*api.AuthenticateEmailRequest, error, codes.Code)

type RuntimeBeforeAuthenticateFacebookFunction

type RuntimeBeforeAuthenticateFacebookFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AuthenticateFacebookRequest) (*api.AuthenticateFacebookRequest, error, codes.Code)

type RuntimeBeforeAuthenticateFacebookInstantGameFunction added in v2.11.0

type RuntimeBeforeAuthenticateFacebookInstantGameFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AuthenticateFacebookInstantGameRequest) (*api.AuthenticateFacebookInstantGameRequest, error, codes.Code)

type RuntimeBeforeAuthenticateGameCenterFunction

type RuntimeBeforeAuthenticateGameCenterFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AuthenticateGameCenterRequest) (*api.AuthenticateGameCenterRequest, error, codes.Code)

type RuntimeBeforeAuthenticateGoogleFunction

type RuntimeBeforeAuthenticateGoogleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AuthenticateGoogleRequest) (*api.AuthenticateGoogleRequest, error, codes.Code)

type RuntimeBeforeAuthenticateSteamFunction

type RuntimeBeforeAuthenticateSteamFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AuthenticateSteamRequest) (*api.AuthenticateSteamRequest, error, codes.Code)

type RuntimeBeforeBanGroupUsersFunction added in v2.9.0

type RuntimeBeforeBanGroupUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.BanGroupUsersRequest) (*api.BanGroupUsersRequest, error, codes.Code)

type RuntimeBeforeBlockFriendsFunction

type RuntimeBeforeBlockFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.BlockFriendsRequest) (*api.BlockFriendsRequest, error, codes.Code)

type RuntimeBeforeCreateGroupFunction

type RuntimeBeforeCreateGroupFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.CreateGroupRequest) (*api.CreateGroupRequest, error, codes.Code)

type RuntimeBeforeDeleteFriendsFunction

type RuntimeBeforeDeleteFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.DeleteFriendsRequest) (*api.DeleteFriendsRequest, error, codes.Code)

type RuntimeBeforeDeleteGroupFunction

type RuntimeBeforeDeleteGroupFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.DeleteGroupRequest) (*api.DeleteGroupRequest, error, codes.Code)

type RuntimeBeforeDeleteLeaderboardRecordFunction

type RuntimeBeforeDeleteLeaderboardRecordFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.DeleteLeaderboardRecordRequest) (*api.DeleteLeaderboardRecordRequest, error, codes.Code)

type RuntimeBeforeDeleteNotificationFunction

type RuntimeBeforeDeleteNotificationFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.DeleteNotificationsRequest) (*api.DeleteNotificationsRequest, error, codes.Code)

type RuntimeBeforeDeleteStorageObjectsFunction

type RuntimeBeforeDeleteStorageObjectsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.DeleteStorageObjectsRequest) (*api.DeleteStorageObjectsRequest, error, codes.Code)

type RuntimeBeforeDemoteGroupUsersFunction added in v2.13.0

type RuntimeBeforeDemoteGroupUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.DemoteGroupUsersRequest) (*api.DemoteGroupUsersRequest, error, codes.Code)

type RuntimeBeforeEventFunction added in v2.8.0

type RuntimeBeforeEventFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.Event) (*api.Event, error, codes.Code)

type RuntimeBeforeGetAccountFunction

type RuntimeBeforeGetAccountFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string) (error, codes.Code)

type RuntimeBeforeGetUsersFunction

type RuntimeBeforeGetUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.GetUsersRequest) (*api.GetUsersRequest, error, codes.Code)

type RuntimeBeforeImportFacebookFriendsFunction

type RuntimeBeforeImportFacebookFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ImportFacebookFriendsRequest) (*api.ImportFacebookFriendsRequest, error, codes.Code)

type RuntimeBeforeJoinGroupFunction

type RuntimeBeforeJoinGroupFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.JoinGroupRequest) (*api.JoinGroupRequest, error, codes.Code)

type RuntimeBeforeJoinTournamentFunction

type RuntimeBeforeJoinTournamentFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.JoinTournamentRequest) (*api.JoinTournamentRequest, error, codes.Code)

type RuntimeBeforeKickGroupUsersFunction

type RuntimeBeforeKickGroupUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.KickGroupUsersRequest) (*api.KickGroupUsersRequest, error, codes.Code)

type RuntimeBeforeLeaveGroupFunction

type RuntimeBeforeLeaveGroupFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.LeaveGroupRequest) (*api.LeaveGroupRequest, error, codes.Code)

type RuntimeBeforeLinkAppleFunction added in v2.13.0

type RuntimeBeforeLinkAppleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountApple) (*api.AccountApple, error, codes.Code)

type RuntimeBeforeLinkCustomFunction

type RuntimeBeforeLinkCustomFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountCustom) (*api.AccountCustom, error, codes.Code)

type RuntimeBeforeLinkDeviceFunction

type RuntimeBeforeLinkDeviceFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountDevice) (*api.AccountDevice, error, codes.Code)

type RuntimeBeforeLinkEmailFunction

type RuntimeBeforeLinkEmailFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountEmail) (*api.AccountEmail, error, codes.Code)

type RuntimeBeforeLinkFacebookFunction

type RuntimeBeforeLinkFacebookFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.LinkFacebookRequest) (*api.LinkFacebookRequest, error, codes.Code)

type RuntimeBeforeLinkFacebookInstantGameFunction added in v2.11.0

type RuntimeBeforeLinkFacebookInstantGameFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountFacebookInstantGame) (*api.AccountFacebookInstantGame, error, codes.Code)

type RuntimeBeforeLinkGameCenterFunction

type RuntimeBeforeLinkGameCenterFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountGameCenter) (*api.AccountGameCenter, error, codes.Code)

type RuntimeBeforeLinkGoogleFunction

type RuntimeBeforeLinkGoogleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountGoogle) (*api.AccountGoogle, error, codes.Code)

type RuntimeBeforeLinkSteamFunction

type RuntimeBeforeLinkSteamFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountSteam) (*api.AccountSteam, error, codes.Code)

type RuntimeBeforeListChannelMessagesFunction

type RuntimeBeforeListChannelMessagesFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListChannelMessagesRequest) (*api.ListChannelMessagesRequest, error, codes.Code)

type RuntimeBeforeListFriendsFunction

type RuntimeBeforeListFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListFriendsRequest) (*api.ListFriendsRequest, error, codes.Code)

type RuntimeBeforeListGroupUsersFunction

type RuntimeBeforeListGroupUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListGroupUsersRequest) (*api.ListGroupUsersRequest, error, codes.Code)

type RuntimeBeforeListGroupsFunction

type RuntimeBeforeListGroupsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListGroupsRequest) (*api.ListGroupsRequest, error, codes.Code)

type RuntimeBeforeListLeaderboardRecordsAroundOwnerFunction

type RuntimeBeforeListLeaderboardRecordsAroundOwnerFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListLeaderboardRecordsAroundOwnerRequest) (*api.ListLeaderboardRecordsAroundOwnerRequest, error, codes.Code)

type RuntimeBeforeListLeaderboardRecordsFunction

type RuntimeBeforeListLeaderboardRecordsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListLeaderboardRecordsRequest) (*api.ListLeaderboardRecordsRequest, error, codes.Code)

type RuntimeBeforeListMatchesFunction

type RuntimeBeforeListMatchesFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListMatchesRequest) (*api.ListMatchesRequest, error, codes.Code)

type RuntimeBeforeListNotificationsFunction

type RuntimeBeforeListNotificationsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListNotificationsRequest) (*api.ListNotificationsRequest, error, codes.Code)

type RuntimeBeforeListStorageObjectsFunction

type RuntimeBeforeListStorageObjectsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListStorageObjectsRequest) (*api.ListStorageObjectsRequest, error, codes.Code)

type RuntimeBeforeListTournamentRecordsAroundOwnerFunction

type RuntimeBeforeListTournamentRecordsAroundOwnerFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListTournamentRecordsAroundOwnerRequest) (*api.ListTournamentRecordsAroundOwnerRequest, error, codes.Code)

type RuntimeBeforeListTournamentRecordsFunction

type RuntimeBeforeListTournamentRecordsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListTournamentRecordsRequest) (*api.ListTournamentRecordsRequest, error, codes.Code)

type RuntimeBeforeListTournamentsFunction

type RuntimeBeforeListTournamentsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListTournamentsRequest) (*api.ListTournamentsRequest, error, codes.Code)

type RuntimeBeforeListUserGroupsFunction

type RuntimeBeforeListUserGroupsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListUserGroupsRequest) (*api.ListUserGroupsRequest, error, codes.Code)

type RuntimeBeforePromoteGroupUsersFunction

type RuntimeBeforePromoteGroupUsersFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.PromoteGroupUsersRequest) (*api.PromoteGroupUsersRequest, error, codes.Code)

type RuntimeBeforeReadStorageObjectsFunction

type RuntimeBeforeReadStorageObjectsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ReadStorageObjectsRequest) (*api.ReadStorageObjectsRequest, error, codes.Code)

type RuntimeBeforeReqFunctions

type RuntimeBeforeReqFunctions struct {
	// contains filtered or unexported fields
}

type RuntimeBeforeRtFunction

type RuntimeBeforeRtFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, sessionID, clientIP, clientPort string, envelope *rtapi.Envelope) (*rtapi.Envelope, error)

type RuntimeBeforeUnlinkAppleFunction added in v2.13.0

type RuntimeBeforeUnlinkAppleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountApple) (*api.AccountApple, error, codes.Code)

type RuntimeBeforeUnlinkCustomFunction

type RuntimeBeforeUnlinkCustomFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountCustom) (*api.AccountCustom, error, codes.Code)

type RuntimeBeforeUnlinkDeviceFunction

type RuntimeBeforeUnlinkDeviceFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountDevice) (*api.AccountDevice, error, codes.Code)

type RuntimeBeforeUnlinkEmailFunction

type RuntimeBeforeUnlinkEmailFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountEmail) (*api.AccountEmail, error, codes.Code)

type RuntimeBeforeUnlinkFacebookFunction

type RuntimeBeforeUnlinkFacebookFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountFacebook) (*api.AccountFacebook, error, codes.Code)

type RuntimeBeforeUnlinkFacebookInstantGameFunction added in v2.11.0

type RuntimeBeforeUnlinkFacebookInstantGameFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountFacebookInstantGame) (*api.AccountFacebookInstantGame, error, codes.Code)

type RuntimeBeforeUnlinkGameCenterFunction

type RuntimeBeforeUnlinkGameCenterFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountGameCenter) (*api.AccountGameCenter, error, codes.Code)

type RuntimeBeforeUnlinkGoogleFunction

type RuntimeBeforeUnlinkGoogleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountGoogle) (*api.AccountGoogle, error, codes.Code)

type RuntimeBeforeUnlinkSteamFunction

type RuntimeBeforeUnlinkSteamFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountSteam) (*api.AccountSteam, error, codes.Code)

type RuntimeBeforeUpdateAccountFunction

type RuntimeBeforeUpdateAccountFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.UpdateAccountRequest) (*api.UpdateAccountRequest, error, codes.Code)

type RuntimeBeforeUpdateGroupFunction

type RuntimeBeforeUpdateGroupFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.UpdateGroupRequest) (*api.UpdateGroupRequest, error, codes.Code)

type RuntimeBeforeWriteLeaderboardRecordFunction

type RuntimeBeforeWriteLeaderboardRecordFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.WriteLeaderboardRecordRequest) (*api.WriteLeaderboardRecordRequest, error, codes.Code)

type RuntimeBeforeWriteStorageObjectsFunction

type RuntimeBeforeWriteStorageObjectsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.WriteStorageObjectsRequest) (*api.WriteStorageObjectsRequest, error, codes.Code)

type RuntimeBeforeWriteTournamentRecordFunction

type RuntimeBeforeWriteTournamentRecordFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.WriteTournamentRecordRequest) (*api.WriteTournamentRecordRequest, error, codes.Code)

type RuntimeConfig

type RuntimeConfig struct {
	Environment       map[string]string `yaml:"-" json:"-"`
	Env               []string          `yaml:"env" json:"env" usage:"Values to pass into Runtime as environment variables."`
	Path              string            `yaml:"path" json:"path" usage:"Path for the server to scan for Lua and Go library files."`
	HTTPKey           string            `yaml:"http_key" json:"http_key" usage:"Runtime HTTP Invocation key."`
	MinCount          int               `yaml:"min_count" json:"min_count" usage:"Minimum number of runtime instances to allocate. Default 16."`
	MaxCount          int               `yaml:"max_count" json:"max_count" usage:"Maximum number of runtime instances to allocate. Default 48."`
	CallStackSize     int               `yaml:"call_stack_size" json:"call_stack_size" usage:"Size of each runtime instance's call stack. Default 128."`
	RegistrySize      int               `yaml:"registry_size" json:"registry_size" usage:"Size of each runtime instance's registry. Default 512."`
	EventQueueSize    int               `yaml:"event_queue_size" json:"event_queue_size" usage:"Size of the event queue buffer. Default 65536."`
	EventQueueWorkers int               `` /* 134-byte string literal not displayed */
	ReadOnlyGlobals   bool              `` /* 161-byte string literal not displayed */
}

RuntimeConfig is configuration relevant to the Runtime Lua VM.

func NewRuntimeConfig

func NewRuntimeConfig() *RuntimeConfig

NewRuntimeConfig creates a new RuntimeConfig struct.

type RuntimeEventCustomFunction added in v2.8.0

type RuntimeEventCustomFunction func(ctx context.Context, evt *api.Event)

type RuntimeEventFunction

type RuntimeEventFunction func(ctx context.Context, logger runtime.Logger, evt *api.Event)

type RuntimeEventFunctions

type RuntimeEventFunctions struct {
	// contains filtered or unexported fields
}

type RuntimeEventQueue

type RuntimeEventQueue struct {
	// contains filtered or unexported fields
}

func NewRuntimeEventQueue

func NewRuntimeEventQueue(logger *zap.Logger, config Config, metrics *Metrics) *RuntimeEventQueue

func (*RuntimeEventQueue) Queue

func (b *RuntimeEventQueue) Queue(fn func())

func (*RuntimeEventQueue) Stop

func (b *RuntimeEventQueue) Stop()

type RuntimeEventSessionEndFunction

type RuntimeEventSessionEndFunction func(userID, username string, vars map[string]string, expiry int64, sessionID, clientIP, clientPort string, evtTimeSec int64, reason string)

type RuntimeEventSessionStartFunction

type RuntimeEventSessionStartFunction func(userID, username string, vars map[string]string, expiry int64, sessionID, clientIP, clientPort string, evtTimeSec int64)

type RuntimeExecutionMode

type RuntimeExecutionMode int
const (
	RuntimeExecutionModeEvent RuntimeExecutionMode = iota
	RuntimeExecutionModeRunOnce
	RuntimeExecutionModeRPC
	RuntimeExecutionModeBefore
	RuntimeExecutionModeAfter
	RuntimeExecutionModeMatch
	RuntimeExecutionModeMatchmaker
	RuntimeExecutionModeMatchCreate
	RuntimeExecutionModeTournamentEnd
	RuntimeExecutionModeTournamentReset
	RuntimeExecutionModeLeaderboardReset
)

func (RuntimeExecutionMode) String

func (e RuntimeExecutionMode) String() string

type RuntimeGoInitializer

type RuntimeGoInitializer struct {
	// contains filtered or unexported fields
}

func (*RuntimeGoInitializer) RegisterAfterAddFriends

func (ri *RuntimeGoInitializer) RegisterAfterAddFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AddFriendsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterAddGroupUsers

func (ri *RuntimeGoInitializer) RegisterAfterAddGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AddGroupUsersRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterAuthenticateApple added in v2.13.0

func (ri *RuntimeGoInitializer) RegisterAfterAuthenticateApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.Session, in *api.AuthenticateAppleRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterAuthenticateCustom

func (ri *RuntimeGoInitializer) RegisterAfterAuthenticateCustom(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.Session, in *api.AuthenticateCustomRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterAuthenticateDevice

func (ri *RuntimeGoInitializer) RegisterAfterAuthenticateDevice(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.Session, in *api.AuthenticateDeviceRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterAuthenticateEmail

func (ri *RuntimeGoInitializer) RegisterAfterAuthenticateEmail(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.Session, in *api.AuthenticateEmailRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterAuthenticateFacebook

func (ri *RuntimeGoInitializer) RegisterAfterAuthenticateFacebook(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.Session, in *api.AuthenticateFacebookRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterAuthenticateFacebookInstantGame added in v2.11.0

func (ri *RuntimeGoInitializer) RegisterAfterAuthenticateFacebookInstantGame(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.Session, in *api.AuthenticateFacebookInstantGameRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterAuthenticateGameCenter

func (ri *RuntimeGoInitializer) RegisterAfterAuthenticateGameCenter(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.Session, in *api.AuthenticateGameCenterRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterAuthenticateGoogle

func (ri *RuntimeGoInitializer) RegisterAfterAuthenticateGoogle(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.Session, in *api.AuthenticateGoogleRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterAuthenticateSteam

func (ri *RuntimeGoInitializer) RegisterAfterAuthenticateSteam(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.Session, in *api.AuthenticateSteamRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterBanGroupUsers added in v2.9.0

func (ri *RuntimeGoInitializer) RegisterAfterBanGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.BanGroupUsersRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterBlockFriends

func (ri *RuntimeGoInitializer) RegisterAfterBlockFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.BlockFriendsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterCreateGroup

func (ri *RuntimeGoInitializer) RegisterAfterCreateGroup(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.Group, in *api.CreateGroupRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterDeleteFriends

func (ri *RuntimeGoInitializer) RegisterAfterDeleteFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.DeleteFriendsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterDeleteGroup

func (ri *RuntimeGoInitializer) RegisterAfterDeleteGroup(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.DeleteGroupRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterDeleteLeaderboardRecord

func (ri *RuntimeGoInitializer) RegisterAfterDeleteLeaderboardRecord(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.DeleteLeaderboardRecordRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterDeleteNotification

func (ri *RuntimeGoInitializer) RegisterAfterDeleteNotification(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.DeleteNotificationsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterDeleteStorageObjects

func (ri *RuntimeGoInitializer) RegisterAfterDeleteStorageObjects(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.DeleteStorageObjectsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterDemoteGroupUsers added in v2.13.0

func (ri *RuntimeGoInitializer) RegisterAfterDemoteGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.DemoteGroupUsersRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterEvent added in v2.8.0

func (ri *RuntimeGoInitializer) RegisterAfterEvent(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.Event) error) error

func (*RuntimeGoInitializer) RegisterAfterGetAccount

func (ri *RuntimeGoInitializer) RegisterAfterGetAccount(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.Account) error) error

func (*RuntimeGoInitializer) RegisterAfterGetUsers

func (ri *RuntimeGoInitializer) RegisterAfterGetUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.Users, in *api.GetUsersRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterImportFacebookFriends

func (ri *RuntimeGoInitializer) RegisterAfterImportFacebookFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ImportFacebookFriendsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterJoinGroup

func (ri *RuntimeGoInitializer) RegisterAfterJoinGroup(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.JoinGroupRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterJoinTournament

func (ri *RuntimeGoInitializer) RegisterAfterJoinTournament(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.JoinTournamentRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterKickGroupUsers

func (ri *RuntimeGoInitializer) RegisterAfterKickGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.KickGroupUsersRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterLeaveGroup

func (ri *RuntimeGoInitializer) RegisterAfterLeaveGroup(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.LeaveGroupRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterLinkApple added in v2.13.0

func (ri *RuntimeGoInitializer) RegisterAfterLinkApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountApple) error) error

func (*RuntimeGoInitializer) RegisterAfterLinkCustom

func (ri *RuntimeGoInitializer) RegisterAfterLinkCustom(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountCustom) error) error

func (*RuntimeGoInitializer) RegisterAfterLinkDevice

func (ri *RuntimeGoInitializer) RegisterAfterLinkDevice(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountDevice) error) error

func (*RuntimeGoInitializer) RegisterAfterLinkEmail

func (ri *RuntimeGoInitializer) RegisterAfterLinkEmail(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountEmail) error) error

func (*RuntimeGoInitializer) RegisterAfterLinkFacebook

func (ri *RuntimeGoInitializer) RegisterAfterLinkFacebook(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.LinkFacebookRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterLinkFacebookInstantGame added in v2.11.0

func (ri *RuntimeGoInitializer) RegisterAfterLinkFacebookInstantGame(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountFacebookInstantGame) error) error

func (*RuntimeGoInitializer) RegisterAfterLinkGameCenter

func (ri *RuntimeGoInitializer) RegisterAfterLinkGameCenter(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountGameCenter) error) error

func (*RuntimeGoInitializer) RegisterAfterLinkGoogle

func (ri *RuntimeGoInitializer) RegisterAfterLinkGoogle(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountGoogle) error) error

func (*RuntimeGoInitializer) RegisterAfterLinkSteam

func (ri *RuntimeGoInitializer) RegisterAfterLinkSteam(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountSteam) error) error

func (*RuntimeGoInitializer) RegisterAfterListChannelMessages

func (ri *RuntimeGoInitializer) RegisterAfterListChannelMessages(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.ChannelMessageList, in *api.ListChannelMessagesRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListFriends

func (ri *RuntimeGoInitializer) RegisterAfterListFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.FriendList) error) error

func (*RuntimeGoInitializer) RegisterAfterListGroupUsers

func (ri *RuntimeGoInitializer) RegisterAfterListGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.GroupUserList, in *api.ListGroupUsersRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListGroups

func (ri *RuntimeGoInitializer) RegisterAfterListGroups(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.GroupList, in *api.ListGroupsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListLeaderboardRecords

func (ri *RuntimeGoInitializer) RegisterAfterListLeaderboardRecords(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.LeaderboardRecordList, in *api.ListLeaderboardRecordsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListLeaderboardRecordsAroundOwner

func (ri *RuntimeGoInitializer) RegisterAfterListLeaderboardRecordsAroundOwner(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.LeaderboardRecordList, in *api.ListLeaderboardRecordsAroundOwnerRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListMatches

func (ri *RuntimeGoInitializer) RegisterAfterListMatches(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.MatchList, in *api.ListMatchesRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListNotifications

func (ri *RuntimeGoInitializer) RegisterAfterListNotifications(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.NotificationList, in *api.ListNotificationsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListStorageObjects

func (ri *RuntimeGoInitializer) RegisterAfterListStorageObjects(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.StorageObjectList, in *api.ListStorageObjectsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListTournamentRecords

func (ri *RuntimeGoInitializer) RegisterAfterListTournamentRecords(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.TournamentRecordList, in *api.ListTournamentRecordsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListTournamentRecordsAroundOwner

func (ri *RuntimeGoInitializer) RegisterAfterListTournamentRecordsAroundOwner(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.TournamentRecordList, in *api.ListTournamentRecordsAroundOwnerRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListTournaments

func (ri *RuntimeGoInitializer) RegisterAfterListTournaments(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.TournamentList, in *api.ListTournamentsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListUserGroups

func (ri *RuntimeGoInitializer) RegisterAfterListUserGroups(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.UserGroupList, in *api.ListUserGroupsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterPromoteGroupUsers

func (ri *RuntimeGoInitializer) RegisterAfterPromoteGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.PromoteGroupUsersRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterReadStorageObjects

func (ri *RuntimeGoInitializer) RegisterAfterReadStorageObjects(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.StorageObjects, in *api.ReadStorageObjectsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterRt

func (ri *RuntimeGoInitializer) RegisterAfterRt(id string, fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, envelope *rtapi.Envelope) error) error

func (*RuntimeGoInitializer) RegisterAfterUnlinkApple added in v2.13.0

func (ri *RuntimeGoInitializer) RegisterAfterUnlinkApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountApple) error) error

func (*RuntimeGoInitializer) RegisterAfterUnlinkCustom

func (ri *RuntimeGoInitializer) RegisterAfterUnlinkCustom(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountCustom) error) error

func (*RuntimeGoInitializer) RegisterAfterUnlinkDevice

func (ri *RuntimeGoInitializer) RegisterAfterUnlinkDevice(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountDevice) error) error

func (*RuntimeGoInitializer) RegisterAfterUnlinkEmail

func (ri *RuntimeGoInitializer) RegisterAfterUnlinkEmail(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountEmail) error) error

func (*RuntimeGoInitializer) RegisterAfterUnlinkFacebook

func (ri *RuntimeGoInitializer) RegisterAfterUnlinkFacebook(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountFacebook) error) error

func (*RuntimeGoInitializer) RegisterAfterUnlinkFacebookInstantGame added in v2.11.0

func (ri *RuntimeGoInitializer) RegisterAfterUnlinkFacebookInstantGame(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountFacebookInstantGame) error) error

func (*RuntimeGoInitializer) RegisterAfterUnlinkGameCenter

func (ri *RuntimeGoInitializer) RegisterAfterUnlinkGameCenter(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountGameCenter) error) error

func (*RuntimeGoInitializer) RegisterAfterUnlinkGoogle

func (ri *RuntimeGoInitializer) RegisterAfterUnlinkGoogle(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountGoogle) error) error

func (*RuntimeGoInitializer) RegisterAfterUnlinkSteam

func (ri *RuntimeGoInitializer) RegisterAfterUnlinkSteam(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountSteam) error) error

func (*RuntimeGoInitializer) RegisterAfterUpdateAccount

func (ri *RuntimeGoInitializer) RegisterAfterUpdateAccount(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.UpdateAccountRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterUpdateGroup

func (ri *RuntimeGoInitializer) RegisterAfterUpdateGroup(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.UpdateGroupRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterWriteLeaderboardRecord

func (ri *RuntimeGoInitializer) RegisterAfterWriteLeaderboardRecord(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.LeaderboardRecord, in *api.WriteLeaderboardRecordRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterWriteStorageObjects

func (ri *RuntimeGoInitializer) RegisterAfterWriteStorageObjects(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.StorageObjectAcks, in *api.WriteStorageObjectsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterWriteTournamentRecord

func (ri *RuntimeGoInitializer) RegisterAfterWriteTournamentRecord(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, out *api.LeaderboardRecord, in *api.WriteTournamentRecordRequest) error) error

func (*RuntimeGoInitializer) RegisterBeforeAddFriends

func (ri *RuntimeGoInitializer) RegisterBeforeAddFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AddFriendsRequest) (*api.AddFriendsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAddGroupUsers

func (ri *RuntimeGoInitializer) RegisterBeforeAddGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AddGroupUsersRequest) (*api.AddGroupUsersRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateApple added in v2.13.0

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AuthenticateAppleRequest) (*api.AuthenticateAppleRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateCustom

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateCustom(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AuthenticateCustomRequest) (*api.AuthenticateCustomRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateDevice

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateDevice(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AuthenticateDeviceRequest) (*api.AuthenticateDeviceRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateEmail

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateEmail(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AuthenticateEmailRequest) (*api.AuthenticateEmailRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateFacebook

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateFacebook(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AuthenticateFacebookRequest) (*api.AuthenticateFacebookRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateFacebookInstantGame added in v2.11.0

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateFacebookInstantGame(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AuthenticateFacebookInstantGameRequest) (*api.AuthenticateFacebookInstantGameRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateGameCenter

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateGameCenter(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AuthenticateGameCenterRequest) (*api.AuthenticateGameCenterRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateGoogle

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateGoogle(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AuthenticateGoogleRequest) (*api.AuthenticateGoogleRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateSteam

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateSteam(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AuthenticateSteamRequest) (*api.AuthenticateSteamRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeBanGroupUsers added in v2.9.0

func (ri *RuntimeGoInitializer) RegisterBeforeBanGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.BanGroupUsersRequest) (*api.BanGroupUsersRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeBlockFriends

func (ri *RuntimeGoInitializer) RegisterBeforeBlockFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.BlockFriendsRequest) (*api.BlockFriendsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeCreateGroup

func (ri *RuntimeGoInitializer) RegisterBeforeCreateGroup(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.CreateGroupRequest) (*api.CreateGroupRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeDeleteFriends

func (ri *RuntimeGoInitializer) RegisterBeforeDeleteFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.DeleteFriendsRequest) (*api.DeleteFriendsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeDeleteGroup

func (ri *RuntimeGoInitializer) RegisterBeforeDeleteGroup(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.DeleteGroupRequest) (*api.DeleteGroupRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeDeleteLeaderboardRecord

func (ri *RuntimeGoInitializer) RegisterBeforeDeleteLeaderboardRecord(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.DeleteLeaderboardRecordRequest) (*api.DeleteLeaderboardRecordRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeDeleteNotification

func (ri *RuntimeGoInitializer) RegisterBeforeDeleteNotification(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.DeleteNotificationsRequest) (*api.DeleteNotificationsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeDeleteStorageObjects

func (ri *RuntimeGoInitializer) RegisterBeforeDeleteStorageObjects(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.DeleteStorageObjectsRequest) (*api.DeleteStorageObjectsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeDemoteGroupUsers added in v2.13.0

func (ri *RuntimeGoInitializer) RegisterBeforeDemoteGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.DemoteGroupUsersRequest) (*api.DemoteGroupUsersRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeEvent added in v2.8.0

func (ri *RuntimeGoInitializer) RegisterBeforeEvent(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.Event) (*api.Event, error)) error

func (*RuntimeGoInitializer) RegisterBeforeGetAccount

func (ri *RuntimeGoInitializer) RegisterBeforeGetAccount(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule) error) error

func (*RuntimeGoInitializer) RegisterBeforeGetUsers

func (ri *RuntimeGoInitializer) RegisterBeforeGetUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.GetUsersRequest) (*api.GetUsersRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeImportFacebookFriends

func (ri *RuntimeGoInitializer) RegisterBeforeImportFacebookFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ImportFacebookFriendsRequest) (*api.ImportFacebookFriendsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeJoinGroup

func (ri *RuntimeGoInitializer) RegisterBeforeJoinGroup(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.JoinGroupRequest) (*api.JoinGroupRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeJoinTournament

func (ri *RuntimeGoInitializer) RegisterBeforeJoinTournament(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.JoinTournamentRequest) (*api.JoinTournamentRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeKickGroupUsers

func (ri *RuntimeGoInitializer) RegisterBeforeKickGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.KickGroupUsersRequest) (*api.KickGroupUsersRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeLeaveGroup

func (ri *RuntimeGoInitializer) RegisterBeforeLeaveGroup(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.LeaveGroupRequest) (*api.LeaveGroupRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeLinkApple added in v2.13.0

func (ri *RuntimeGoInitializer) RegisterBeforeLinkApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountApple) (*api.AccountApple, error)) error

func (*RuntimeGoInitializer) RegisterBeforeLinkCustom

func (ri *RuntimeGoInitializer) RegisterBeforeLinkCustom(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountCustom) (*api.AccountCustom, error)) error

func (*RuntimeGoInitializer) RegisterBeforeLinkDevice

func (ri *RuntimeGoInitializer) RegisterBeforeLinkDevice(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountDevice) (*api.AccountDevice, error)) error

func (*RuntimeGoInitializer) RegisterBeforeLinkEmail

func (ri *RuntimeGoInitializer) RegisterBeforeLinkEmail(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountEmail) (*api.AccountEmail, error)) error

func (*RuntimeGoInitializer) RegisterBeforeLinkFacebook

func (ri *RuntimeGoInitializer) RegisterBeforeLinkFacebook(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.LinkFacebookRequest) (*api.LinkFacebookRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeLinkFacebookInstantGame added in v2.11.0

func (ri *RuntimeGoInitializer) RegisterBeforeLinkFacebookInstantGame(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountFacebookInstantGame) (*api.AccountFacebookInstantGame, error)) error

func (*RuntimeGoInitializer) RegisterBeforeLinkGameCenter

func (ri *RuntimeGoInitializer) RegisterBeforeLinkGameCenter(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountGameCenter) (*api.AccountGameCenter, error)) error

func (*RuntimeGoInitializer) RegisterBeforeLinkGoogle

func (ri *RuntimeGoInitializer) RegisterBeforeLinkGoogle(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountGoogle) (*api.AccountGoogle, error)) error

func (*RuntimeGoInitializer) RegisterBeforeLinkSteam

func (ri *RuntimeGoInitializer) RegisterBeforeLinkSteam(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountSteam) (*api.AccountSteam, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListChannelMessages

func (ri *RuntimeGoInitializer) RegisterBeforeListChannelMessages(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ListChannelMessagesRequest) (*api.ListChannelMessagesRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListFriends

func (ri *RuntimeGoInitializer) RegisterBeforeListFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ListFriendsRequest) (*api.ListFriendsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListGroupUsers

func (ri *RuntimeGoInitializer) RegisterBeforeListGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ListGroupUsersRequest) (*api.ListGroupUsersRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListGroups

func (ri *RuntimeGoInitializer) RegisterBeforeListGroups(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ListGroupsRequest) (*api.ListGroupsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListLeaderboardRecords

func (ri *RuntimeGoInitializer) RegisterBeforeListLeaderboardRecords(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ListLeaderboardRecordsRequest) (*api.ListLeaderboardRecordsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListLeaderboardRecordsAroundOwner

func (ri *RuntimeGoInitializer) RegisterBeforeListLeaderboardRecordsAroundOwner(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ListLeaderboardRecordsAroundOwnerRequest) (*api.ListLeaderboardRecordsAroundOwnerRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListMatches

func (ri *RuntimeGoInitializer) RegisterBeforeListMatches(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ListMatchesRequest) (*api.ListMatchesRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListNotifications

func (ri *RuntimeGoInitializer) RegisterBeforeListNotifications(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ListNotificationsRequest) (*api.ListNotificationsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListStorageObjects

func (ri *RuntimeGoInitializer) RegisterBeforeListStorageObjects(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ListStorageObjectsRequest) (*api.ListStorageObjectsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListTournamentRecords

func (ri *RuntimeGoInitializer) RegisterBeforeListTournamentRecords(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ListTournamentRecordsRequest) (*api.ListTournamentRecordsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListTournamentRecordsAroundOwner

func (ri *RuntimeGoInitializer) RegisterBeforeListTournamentRecordsAroundOwner(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ListTournamentRecordsAroundOwnerRequest) (*api.ListTournamentRecordsAroundOwnerRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListTournaments

func (ri *RuntimeGoInitializer) RegisterBeforeListTournaments(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ListTournamentsRequest) (*api.ListTournamentsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListUserGroups

func (ri *RuntimeGoInitializer) RegisterBeforeListUserGroups(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ListUserGroupsRequest) (*api.ListUserGroupsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforePromoteGroupUsers

func (ri *RuntimeGoInitializer) RegisterBeforePromoteGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.PromoteGroupUsersRequest) (*api.PromoteGroupUsersRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeReadStorageObjects

func (ri *RuntimeGoInitializer) RegisterBeforeReadStorageObjects(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.ReadStorageObjectsRequest) (*api.ReadStorageObjectsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeRt

func (ri *RuntimeGoInitializer) RegisterBeforeRt(id string, fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, envelope *rtapi.Envelope) (*rtapi.Envelope, error)) error

func (*RuntimeGoInitializer) RegisterBeforeUnlinkApple added in v2.13.0

func (ri *RuntimeGoInitializer) RegisterBeforeUnlinkApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountApple) (*api.AccountApple, error)) error

func (*RuntimeGoInitializer) RegisterBeforeUnlinkCustom

func (ri *RuntimeGoInitializer) RegisterBeforeUnlinkCustom(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountCustom) (*api.AccountCustom, error)) error

func (*RuntimeGoInitializer) RegisterBeforeUnlinkDevice

func (ri *RuntimeGoInitializer) RegisterBeforeUnlinkDevice(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountDevice) (*api.AccountDevice, error)) error

func (*RuntimeGoInitializer) RegisterBeforeUnlinkEmail

func (ri *RuntimeGoInitializer) RegisterBeforeUnlinkEmail(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountEmail) (*api.AccountEmail, error)) error

func (*RuntimeGoInitializer) RegisterBeforeUnlinkFacebook

func (ri *RuntimeGoInitializer) RegisterBeforeUnlinkFacebook(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountFacebook) (*api.AccountFacebook, error)) error

func (*RuntimeGoInitializer) RegisterBeforeUnlinkFacebookInstantGame added in v2.11.0

func (ri *RuntimeGoInitializer) RegisterBeforeUnlinkFacebookInstantGame(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountFacebookInstantGame) (*api.AccountFacebookInstantGame, error)) error

func (*RuntimeGoInitializer) RegisterBeforeUnlinkGameCenter

func (ri *RuntimeGoInitializer) RegisterBeforeUnlinkGameCenter(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountGameCenter) (*api.AccountGameCenter, error)) error

func (*RuntimeGoInitializer) RegisterBeforeUnlinkGoogle

func (ri *RuntimeGoInitializer) RegisterBeforeUnlinkGoogle(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountGoogle) (*api.AccountGoogle, error)) error

func (*RuntimeGoInitializer) RegisterBeforeUnlinkSteam

func (ri *RuntimeGoInitializer) RegisterBeforeUnlinkSteam(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.AccountSteam) (*api.AccountSteam, error)) error

func (*RuntimeGoInitializer) RegisterBeforeUpdateAccount

func (ri *RuntimeGoInitializer) RegisterBeforeUpdateAccount(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.UpdateAccountRequest) (*api.UpdateAccountRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeUpdateGroup

func (ri *RuntimeGoInitializer) RegisterBeforeUpdateGroup(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.UpdateGroupRequest) (*api.UpdateGroupRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeWriteLeaderboardRecord

func (ri *RuntimeGoInitializer) RegisterBeforeWriteLeaderboardRecord(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.WriteLeaderboardRecordRequest) (*api.WriteLeaderboardRecordRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeWriteStorageObjects

func (ri *RuntimeGoInitializer) RegisterBeforeWriteStorageObjects(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.WriteStorageObjectsRequest) (*api.WriteStorageObjectsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeWriteTournamentRecord

func (ri *RuntimeGoInitializer) RegisterBeforeWriteTournamentRecord(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, in *api.WriteTournamentRecordRequest) (*api.WriteTournamentRecordRequest, error)) error

func (*RuntimeGoInitializer) RegisterEvent added in v2.8.0

func (ri *RuntimeGoInitializer) RegisterEvent(fn func(ctx context.Context, logger runtime.Logger, evt *api.Event)) error

func (*RuntimeGoInitializer) RegisterEventSessionEnd

func (ri *RuntimeGoInitializer) RegisterEventSessionEnd(fn func(ctx context.Context, logger runtime.Logger, evt *api.Event)) error

func (*RuntimeGoInitializer) RegisterEventSessionStart

func (ri *RuntimeGoInitializer) RegisterEventSessionStart(fn func(ctx context.Context, logger runtime.Logger, evt *api.Event)) error

func (*RuntimeGoInitializer) RegisterLeaderboardReset

func (ri *RuntimeGoInitializer) RegisterLeaderboardReset(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, leaderboard runtime.Leaderboard, reset int64) error) error

func (*RuntimeGoInitializer) RegisterMatch

func (ri *RuntimeGoInitializer) RegisterMatch(name string, fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule) (runtime.Match, error)) error

func (*RuntimeGoInitializer) RegisterMatchmakerMatched

func (ri *RuntimeGoInitializer) RegisterMatchmakerMatched(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, entries []runtime.MatchmakerEntry) (string, error)) error

func (*RuntimeGoInitializer) RegisterRpc

func (ri *RuntimeGoInitializer) RegisterRpc(id string, fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, payload string) (string, error)) error

func (*RuntimeGoInitializer) RegisterTournamentEnd

func (ri *RuntimeGoInitializer) RegisterTournamentEnd(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, tournament *api.Tournament, end, reset int64) error) error

func (*RuntimeGoInitializer) RegisterTournamentReset

func (ri *RuntimeGoInitializer) RegisterTournamentReset(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, tournament *api.Tournament, end, reset int64) error) error

type RuntimeGoLogger

type RuntimeGoLogger struct {
	// contains filtered or unexported fields
}

func (*RuntimeGoLogger) Debug

func (l *RuntimeGoLogger) Debug(format string, v ...interface{})

func (*RuntimeGoLogger) Error

func (l *RuntimeGoLogger) Error(format string, v ...interface{})

func (*RuntimeGoLogger) Fields added in v2.13.0

func (l *RuntimeGoLogger) Fields() map[string]interface{}

func (*RuntimeGoLogger) Info

func (l *RuntimeGoLogger) Info(format string, v ...interface{})

func (*RuntimeGoLogger) Warn

func (l *RuntimeGoLogger) Warn(format string, v ...interface{})

func (*RuntimeGoLogger) WithField added in v2.13.0

func (l *RuntimeGoLogger) WithField(key string, v interface{}) nkruntime.Logger

func (*RuntimeGoLogger) WithFields added in v2.13.0

func (l *RuntimeGoLogger) WithFields(fields map[string]interface{}) nkruntime.Logger

type RuntimeGoMatchCore

type RuntimeGoMatchCore struct {
	// contains filtered or unexported fields
}

func (*RuntimeGoMatchCore) BroadcastMessage

func (r *RuntimeGoMatchCore) BroadcastMessage(opCode int64, data []byte, presences []runtime.Presence, sender runtime.Presence, reliable bool) error

func (*RuntimeGoMatchCore) BroadcastMessageDeferred

func (r *RuntimeGoMatchCore) BroadcastMessageDeferred(opCode int64, data []byte, presences []runtime.Presence, sender runtime.Presence, reliable bool) error

func (*RuntimeGoMatchCore) Cancel

func (r *RuntimeGoMatchCore) Cancel()

func (*RuntimeGoMatchCore) Label

func (r *RuntimeGoMatchCore) Label() string

func (*RuntimeGoMatchCore) MatchInit

func (r *RuntimeGoMatchCore) MatchInit(presenceList *MatchPresenceList, deferMessageFn RuntimeMatchDeferMessageFunction, params map[string]interface{}) (interface{}, int, error)

func (*RuntimeGoMatchCore) MatchJoin

func (r *RuntimeGoMatchCore) MatchJoin(tick int64, state interface{}, joins []*MatchPresence) (interface{}, error)

func (*RuntimeGoMatchCore) MatchJoinAttempt

func (r *RuntimeGoMatchCore) MatchJoinAttempt(tick int64, state interface{}, userID, sessionID uuid.UUID, username string, sessionExpiry int64, vars map[string]string, clientIP, clientPort, node string, metadata map[string]string) (interface{}, bool, string, error)

func (*RuntimeGoMatchCore) MatchKick

func (r *RuntimeGoMatchCore) MatchKick(presences []runtime.Presence) error

func (*RuntimeGoMatchCore) MatchLabelUpdate

func (r *RuntimeGoMatchCore) MatchLabelUpdate(label string) error

func (*RuntimeGoMatchCore) MatchLeave

func (r *RuntimeGoMatchCore) MatchLeave(tick int64, state interface{}, leaves []*MatchPresence) (interface{}, error)

func (*RuntimeGoMatchCore) MatchLoop

func (r *RuntimeGoMatchCore) MatchLoop(tick int64, state interface{}, inputCh <-chan *MatchDataMessage) (interface{}, error)

func (*RuntimeGoMatchCore) MatchTerminate

func (r *RuntimeGoMatchCore) MatchTerminate(tick int64, state interface{}, graceSeconds int) (interface{}, error)

type RuntimeGoNakamaModule

type RuntimeGoNakamaModule struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewRuntimeGoNakamaModule

func NewRuntimeGoNakamaModule(logger *zap.Logger, db *sql.DB, jsonpbMarshaler *jsonpb.Marshaler, config Config, socialClient *social.Client, leaderboardCache LeaderboardCache, leaderboardRankCache LeaderboardRankCache, leaderboardScheduler LeaderboardScheduler, sessionRegistry SessionRegistry, matchRegistry MatchRegistry, tracker Tracker, streamManager StreamManager, router MessageRouter) *RuntimeGoNakamaModule

func (*RuntimeGoNakamaModule) AccountDeleteId

func (n *RuntimeGoNakamaModule) AccountDeleteId(ctx context.Context, userID string, recorded bool) error

func (*RuntimeGoNakamaModule) AccountExportId

func (n *RuntimeGoNakamaModule) AccountExportId(ctx context.Context, userID string) (string, error)

func (*RuntimeGoNakamaModule) AccountGetId

func (n *RuntimeGoNakamaModule) AccountGetId(ctx context.Context, userID string) (*api.Account, error)

func (*RuntimeGoNakamaModule) AccountUpdateId

func (n *RuntimeGoNakamaModule) AccountUpdateId(ctx context.Context, userID, username string, metadata map[string]interface{}, displayName, timezone, location, langTag, avatarUrl string) error

func (*RuntimeGoNakamaModule) AccountsGetId

func (n *RuntimeGoNakamaModule) AccountsGetId(ctx context.Context, userIDs []string) ([]*api.Account, error)

func (*RuntimeGoNakamaModule) AuthenticateApple added in v2.13.0

func (n *RuntimeGoNakamaModule) AuthenticateApple(ctx context.Context, token, username string, create bool) (string, string, bool, error)

func (*RuntimeGoNakamaModule) AuthenticateCustom

func (n *RuntimeGoNakamaModule) AuthenticateCustom(ctx context.Context, id, username string, create bool) (string, string, bool, error)

func (*RuntimeGoNakamaModule) AuthenticateDevice

func (n *RuntimeGoNakamaModule) AuthenticateDevice(ctx context.Context, id, username string, create bool) (string, string, bool, error)

func (*RuntimeGoNakamaModule) AuthenticateEmail

func (n *RuntimeGoNakamaModule) AuthenticateEmail(ctx context.Context, email, password, username string, create bool) (string, string, bool, error)

func (*RuntimeGoNakamaModule) AuthenticateFacebook

func (n *RuntimeGoNakamaModule) AuthenticateFacebook(ctx context.Context, token string, importFriends bool, username string, create bool) (string, string, bool, error)

func (*RuntimeGoNakamaModule) AuthenticateFacebookInstantGame added in v2.11.0

func (n *RuntimeGoNakamaModule) AuthenticateFacebookInstantGame(ctx context.Context, signedPlayerInfo string, username string, create bool) (string, string, bool, error)

func (*RuntimeGoNakamaModule) AuthenticateGameCenter

func (n *RuntimeGoNakamaModule) AuthenticateGameCenter(ctx context.Context, playerID, bundleID string, timestamp int64, salt, signature, publicKeyUrl, username string, create bool) (string, string, bool, error)

func (*RuntimeGoNakamaModule) AuthenticateGoogle

func (n *RuntimeGoNakamaModule) AuthenticateGoogle(ctx context.Context, token, username string, create bool) (string, string, bool, error)

func (*RuntimeGoNakamaModule) AuthenticateSteam

func (n *RuntimeGoNakamaModule) AuthenticateSteam(ctx context.Context, token, username string, create bool) (string, string, bool, error)

func (*RuntimeGoNakamaModule) AuthenticateTokenGenerate

func (n *RuntimeGoNakamaModule) AuthenticateTokenGenerate(userID, username string, exp int64, vars map[string]string) (string, int64, error)

func (*RuntimeGoNakamaModule) Event added in v2.8.0

func (n *RuntimeGoNakamaModule) Event(ctx context.Context, evt *api.Event) error

func (*RuntimeGoNakamaModule) FriendsList added in v2.14.1

func (n *RuntimeGoNakamaModule) FriendsList(ctx context.Context, userID string, limit int, state *int, cursor string) ([]*api.Friend, string, error)

func (*RuntimeGoNakamaModule) GroupCreate

func (n *RuntimeGoNakamaModule) GroupCreate(ctx context.Context, userID, name, creatorID, langTag, description, avatarUrl string, open bool, metadata map[string]interface{}, maxCount int) (*api.Group, error)

func (*RuntimeGoNakamaModule) GroupDelete

func (n *RuntimeGoNakamaModule) GroupDelete(ctx context.Context, id string) error

func (*RuntimeGoNakamaModule) GroupUpdate

func (n *RuntimeGoNakamaModule) GroupUpdate(ctx context.Context, id, name, creatorID, langTag, description, avatarUrl string, open bool, metadata map[string]interface{}, maxCount int) error

func (*RuntimeGoNakamaModule) GroupUserJoin added in v2.15.0

func (n *RuntimeGoNakamaModule) GroupUserJoin(ctx context.Context, groupID, userID, username string) error

func (*RuntimeGoNakamaModule) GroupUserLeave added in v2.15.0

func (n *RuntimeGoNakamaModule) GroupUserLeave(ctx context.Context, groupID, userID, username string) error

func (*RuntimeGoNakamaModule) GroupUsersAdd added in v2.15.0

func (n *RuntimeGoNakamaModule) GroupUsersAdd(ctx context.Context, groupID string, userIDs []string) error

func (*RuntimeGoNakamaModule) GroupUsersDemote added in v2.15.0

func (n *RuntimeGoNakamaModule) GroupUsersDemote(ctx context.Context, groupID string, userIDs []string) error

func (*RuntimeGoNakamaModule) GroupUsersKick

func (n *RuntimeGoNakamaModule) GroupUsersKick(ctx context.Context, groupID string, userIDs []string) error

func (*RuntimeGoNakamaModule) GroupUsersList

func (n *RuntimeGoNakamaModule) GroupUsersList(ctx context.Context, id string, limit int, state *int, cursor string) ([]*api.GroupUserList_GroupUser, string, error)

func (*RuntimeGoNakamaModule) GroupUsersPromote added in v2.15.0

func (n *RuntimeGoNakamaModule) GroupUsersPromote(ctx context.Context, groupID string, userIDs []string) error

func (*RuntimeGoNakamaModule) GroupsGetId

func (n *RuntimeGoNakamaModule) GroupsGetId(ctx context.Context, groupIDs []string) ([]*api.Group, error)

func (*RuntimeGoNakamaModule) LeaderboardCreate

func (n *RuntimeGoNakamaModule) LeaderboardCreate(ctx context.Context, id string, authoritative bool, sortOrder, operator, resetSchedule string, metadata map[string]interface{}) error

func (*RuntimeGoNakamaModule) LeaderboardDelete

func (n *RuntimeGoNakamaModule) LeaderboardDelete(ctx context.Context, id string) error

func (*RuntimeGoNakamaModule) LeaderboardRecordDelete

func (n *RuntimeGoNakamaModule) LeaderboardRecordDelete(ctx context.Context, id, ownerID string) error

func (*RuntimeGoNakamaModule) LeaderboardRecordWrite

func (n *RuntimeGoNakamaModule) LeaderboardRecordWrite(ctx context.Context, id, ownerID, username string, score, subscore int64, metadata map[string]interface{}) (*api.LeaderboardRecord, error)

func (*RuntimeGoNakamaModule) LeaderboardRecordsList

func (n *RuntimeGoNakamaModule) LeaderboardRecordsList(ctx context.Context, id string, ownerIDs []string, limit int, cursor string, expiry int64) ([]*api.LeaderboardRecord, []*api.LeaderboardRecord, string, string, error)

func (*RuntimeGoNakamaModule) LinkApple added in v2.13.0

func (n *RuntimeGoNakamaModule) LinkApple(ctx context.Context, userID, token string) error

func (*RuntimeGoNakamaModule) LinkCustom added in v2.12.0

func (n *RuntimeGoNakamaModule) LinkCustom(ctx context.Context, userID, customID string) error

func (*RuntimeGoNakamaModule) LinkDevice added in v2.12.0

func (n *RuntimeGoNakamaModule) LinkDevice(ctx context.Context, userID, deviceID string) error

func (*RuntimeGoNakamaModule) LinkEmail added in v2.12.0

func (n *RuntimeGoNakamaModule) LinkEmail(ctx context.Context, userID, email, password string) error

func (*RuntimeGoNakamaModule) LinkFacebook added in v2.12.0

func (n *RuntimeGoNakamaModule) LinkFacebook(ctx context.Context, userID, username, token string, importFriends bool) error

func (*RuntimeGoNakamaModule) LinkFacebookInstantGame added in v2.12.0

func (n *RuntimeGoNakamaModule) LinkFacebookInstantGame(ctx context.Context, userID, signedPlayerInfo string) error

func (*RuntimeGoNakamaModule) LinkGameCenter added in v2.12.0

func (n *RuntimeGoNakamaModule) LinkGameCenter(ctx context.Context, userID, playerID, bundleID string, timestamp int64, salt, signature, publicKeyUrl string) error

func (*RuntimeGoNakamaModule) LinkGoogle added in v2.12.0

func (n *RuntimeGoNakamaModule) LinkGoogle(ctx context.Context, userID, token string) error

func (*RuntimeGoNakamaModule) LinkSteam added in v2.12.0

func (n *RuntimeGoNakamaModule) LinkSteam(ctx context.Context, userID, token string) error

func (*RuntimeGoNakamaModule) MatchCreate

func (n *RuntimeGoNakamaModule) MatchCreate(ctx context.Context, module string, params map[string]interface{}) (string, error)

func (*RuntimeGoNakamaModule) MatchGet added in v2.12.0

func (n *RuntimeGoNakamaModule) MatchGet(ctx context.Context, id string) (*api.Match, error)

func (*RuntimeGoNakamaModule) MatchList

func (n *RuntimeGoNakamaModule) MatchList(ctx context.Context, limit int, authoritative bool, label string, minSize, maxSize *int, query string) ([]*api.Match, error)

func (*RuntimeGoNakamaModule) MultiUpdate added in v2.13.0

func (n *RuntimeGoNakamaModule) MultiUpdate(ctx context.Context, accountUpdates []*runtime.AccountUpdate, storageWrites []*runtime.StorageWrite, walletUpdates []*runtime.WalletUpdate, updateLedger bool) ([]*api.StorageObjectAck, []*runtime.WalletUpdateResult, error)

func (*RuntimeGoNakamaModule) NotificationSend

func (n *RuntimeGoNakamaModule) NotificationSend(ctx context.Context, userID, subject string, content map[string]interface{}, code int, sender string, persistent bool) error

func (*RuntimeGoNakamaModule) NotificationsSend

func (n *RuntimeGoNakamaModule) NotificationsSend(ctx context.Context, notifications []*runtime.NotificationSend) error

func (*RuntimeGoNakamaModule) SessionDisconnect

func (n *RuntimeGoNakamaModule) SessionDisconnect(ctx context.Context, sessionID string) error

func (*RuntimeGoNakamaModule) SetEventFn added in v2.8.0

func (*RuntimeGoNakamaModule) SetMatchCreateFn

func (n *RuntimeGoNakamaModule) SetMatchCreateFn(fn RuntimeMatchCreateFunction)

func (*RuntimeGoNakamaModule) StorageDelete

func (n *RuntimeGoNakamaModule) StorageDelete(ctx context.Context, deletes []*runtime.StorageDelete) error

func (*RuntimeGoNakamaModule) StorageList

func (n *RuntimeGoNakamaModule) StorageList(ctx context.Context, userID, collection string, limit int, cursor string) ([]*api.StorageObject, string, error)

func (*RuntimeGoNakamaModule) StorageRead

func (n *RuntimeGoNakamaModule) StorageRead(ctx context.Context, reads []*runtime.StorageRead) ([]*api.StorageObject, error)

func (*RuntimeGoNakamaModule) StorageWrite

func (n *RuntimeGoNakamaModule) StorageWrite(ctx context.Context, writes []*runtime.StorageWrite) ([]*api.StorageObjectAck, error)

func (*RuntimeGoNakamaModule) StreamClose

func (n *RuntimeGoNakamaModule) StreamClose(mode uint8, subject, subcontext, label string) error

func (*RuntimeGoNakamaModule) StreamCount

func (n *RuntimeGoNakamaModule) StreamCount(mode uint8, subject, subcontext, label string) (int, error)

func (*RuntimeGoNakamaModule) StreamSend

func (n *RuntimeGoNakamaModule) StreamSend(mode uint8, subject, subcontext, label, data string, presences []runtime.Presence, reliable bool) error

func (*RuntimeGoNakamaModule) StreamSendRaw

func (n *RuntimeGoNakamaModule) StreamSendRaw(mode uint8, subject, subcontext, label string, msg *rtapi.Envelope, presences []runtime.Presence, reliable bool) error

func (*RuntimeGoNakamaModule) StreamUserGet

func (n *RuntimeGoNakamaModule) StreamUserGet(mode uint8, subject, subcontext, label, userID, sessionID string) (runtime.PresenceMeta, error)

func (*RuntimeGoNakamaModule) StreamUserJoin

func (n *RuntimeGoNakamaModule) StreamUserJoin(mode uint8, subject, subcontext, label, userID, sessionID string, hidden, persistence bool, status string) (bool, error)

func (*RuntimeGoNakamaModule) StreamUserKick

func (n *RuntimeGoNakamaModule) StreamUserKick(mode uint8, subject, subcontext, label string, presence runtime.Presence) error

func (*RuntimeGoNakamaModule) StreamUserLeave

func (n *RuntimeGoNakamaModule) StreamUserLeave(mode uint8, subject, subcontext, label, userID, sessionID string) error

func (*RuntimeGoNakamaModule) StreamUserList

func (n *RuntimeGoNakamaModule) StreamUserList(mode uint8, subject, subcontext, label string, includeHidden, includeNotHidden bool) ([]runtime.Presence, error)

func (*RuntimeGoNakamaModule) StreamUserUpdate

func (n *RuntimeGoNakamaModule) StreamUserUpdate(mode uint8, subject, subcontext, label, userID, sessionID string, hidden, persistence bool, status string) error

func (*RuntimeGoNakamaModule) TournamentAddAttempt

func (n *RuntimeGoNakamaModule) TournamentAddAttempt(ctx context.Context, id, ownerID string, count int) error

func (*RuntimeGoNakamaModule) TournamentCreate

func (n *RuntimeGoNakamaModule) TournamentCreate(ctx context.Context, id string, sortOrder, operator, resetSchedule string, metadata map[string]interface{}, title, description string, category, startTime, endTime, duration, maxSize, maxNumScore int, joinRequired bool) error

func (*RuntimeGoNakamaModule) TournamentDelete

func (n *RuntimeGoNakamaModule) TournamentDelete(ctx context.Context, id string) error

func (*RuntimeGoNakamaModule) TournamentJoin

func (n *RuntimeGoNakamaModule) TournamentJoin(ctx context.Context, id, ownerID, username string) error

func (*RuntimeGoNakamaModule) TournamentList

func (n *RuntimeGoNakamaModule) TournamentList(ctx context.Context, categoryStart, categoryEnd, startTime, endTime, limit int, cursor string) (*api.TournamentList, error)

func (*RuntimeGoNakamaModule) TournamentRecordWrite

func (n *RuntimeGoNakamaModule) TournamentRecordWrite(ctx context.Context, id, ownerID, username string, score, subscore int64, metadata map[string]interface{}) (*api.LeaderboardRecord, error)

func (*RuntimeGoNakamaModule) TournamentRecordsHaystack

func (n *RuntimeGoNakamaModule) TournamentRecordsHaystack(ctx context.Context, id, ownerID string, limit int, expiry int64) ([]*api.LeaderboardRecord, error)

func (*RuntimeGoNakamaModule) TournamentRecordsList added in v2.14.1

func (n *RuntimeGoNakamaModule) TournamentRecordsList(ctx context.Context, tournamentId string, ownerIDs []string, limit int, cursor string, overrideExpiry int64) ([]*api.LeaderboardRecord, []*api.LeaderboardRecord, string, string, error)

func (*RuntimeGoNakamaModule) TournamentsGetId added in v2.9.0

func (n *RuntimeGoNakamaModule) TournamentsGetId(ctx context.Context, tournamentIDs []string) ([]*api.Tournament, error)

func (*RuntimeGoNakamaModule) UnlinkApple added in v2.13.0

func (n *RuntimeGoNakamaModule) UnlinkApple(ctx context.Context, userID, token string) error

func (*RuntimeGoNakamaModule) UnlinkCustom added in v2.12.0

func (n *RuntimeGoNakamaModule) UnlinkCustom(ctx context.Context, userID, customID string) error

func (*RuntimeGoNakamaModule) UnlinkDevice added in v2.12.0

func (n *RuntimeGoNakamaModule) UnlinkDevice(ctx context.Context, userID, deviceID string) error

func (*RuntimeGoNakamaModule) UnlinkEmail added in v2.12.0

func (n *RuntimeGoNakamaModule) UnlinkEmail(ctx context.Context, userID, email string) error

func (*RuntimeGoNakamaModule) UnlinkFacebook added in v2.12.0

func (n *RuntimeGoNakamaModule) UnlinkFacebook(ctx context.Context, userID, token string) error

func (*RuntimeGoNakamaModule) UnlinkFacebookInstantGame added in v2.12.0

func (n *RuntimeGoNakamaModule) UnlinkFacebookInstantGame(ctx context.Context, userID, signedPlayerInfo string) error

func (*RuntimeGoNakamaModule) UnlinkGameCenter added in v2.12.0

func (n *RuntimeGoNakamaModule) UnlinkGameCenter(ctx context.Context, userID, playerID, bundleID string, timestamp int64, salt, signature, publicKeyUrl string) error

func (*RuntimeGoNakamaModule) UnlinkGoogle added in v2.12.0

func (n *RuntimeGoNakamaModule) UnlinkGoogle(ctx context.Context, userID, token string) error

func (*RuntimeGoNakamaModule) UnlinkSteam added in v2.12.0

func (n *RuntimeGoNakamaModule) UnlinkSteam(ctx context.Context, userID, token string) error

func (*RuntimeGoNakamaModule) UserGroupsList

func (n *RuntimeGoNakamaModule) UserGroupsList(ctx context.Context, userID string, limit int, state *int, cursor string) ([]*api.UserGroupList_UserGroup, string, error)

func (*RuntimeGoNakamaModule) UsersBanId

func (n *RuntimeGoNakamaModule) UsersBanId(ctx context.Context, userIDs []string) error

func (*RuntimeGoNakamaModule) UsersGetId

func (n *RuntimeGoNakamaModule) UsersGetId(ctx context.Context, userIDs []string) ([]*api.User, error)

func (*RuntimeGoNakamaModule) UsersGetUsername

func (n *RuntimeGoNakamaModule) UsersGetUsername(ctx context.Context, usernames []string) ([]*api.User, error)

func (*RuntimeGoNakamaModule) UsersUnbanId

func (n *RuntimeGoNakamaModule) UsersUnbanId(ctx context.Context, userIDs []string) error

func (*RuntimeGoNakamaModule) WalletLedgerList

func (n *RuntimeGoNakamaModule) WalletLedgerList(ctx context.Context, userID string, limit int, cursor string) ([]runtime.WalletLedgerItem, string, error)

func (*RuntimeGoNakamaModule) WalletLedgerUpdate

func (n *RuntimeGoNakamaModule) WalletLedgerUpdate(ctx context.Context, itemID string, metadata map[string]interface{}) (runtime.WalletLedgerItem, error)

func (*RuntimeGoNakamaModule) WalletUpdate

func (n *RuntimeGoNakamaModule) WalletUpdate(ctx context.Context, userID string, changeset map[string]int64, metadata map[string]interface{}, updateLedger bool) (map[string]int64, map[string]int64, error)

func (*RuntimeGoNakamaModule) WalletsUpdate

func (n *RuntimeGoNakamaModule) WalletsUpdate(ctx context.Context, updates []*runtime.WalletUpdate, updateLedger bool) ([]*runtime.WalletUpdateResult, error)

type RuntimeLeaderboardResetFunction

type RuntimeLeaderboardResetFunction func(ctx context.Context, leaderboard runtime.Leaderboard, reset int64) error

type RuntimeLua

type RuntimeLua struct {
	// contains filtered or unexported fields
}

func (*RuntimeLua) GetCallback

func (r *RuntimeLua) GetCallback(e RuntimeExecutionMode, key string) *lua.LFunction

func (*RuntimeLua) InvokeFunction

func (r *RuntimeLua) InvokeFunction(execMode RuntimeExecutionMode, fn *lua.LFunction, queryParams map[string][]string, uid string, username string, vars map[string]string, sessionExpiry int64, sid string, clientIP string, clientPort string, payloads ...interface{}) (interface{}, error, codes.Code, bool)

func (*RuntimeLua) Stop

func (r *RuntimeLua) Stop()

type RuntimeLuaCallbacks

type RuntimeLuaCallbacks struct {
	RPC              map[string]*lua.LFunction
	Before           map[string]*lua.LFunction
	After            map[string]*lua.LFunction
	Matchmaker       *lua.LFunction
	TournamentEnd    *lua.LFunction
	TournamentReset  *lua.LFunction
	LeaderboardReset *lua.LFunction
}

type RuntimeLuaLocalCache

type RuntimeLuaLocalCache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewRuntimeLuaLocalCache

func NewRuntimeLuaLocalCache() *RuntimeLuaLocalCache

func (*RuntimeLuaLocalCache) Delete

func (lc *RuntimeLuaLocalCache) Delete(key string)

func (*RuntimeLuaLocalCache) Get

func (lc *RuntimeLuaLocalCache) Get(key string) (lua.LValue, bool)

func (*RuntimeLuaLocalCache) Put

func (lc *RuntimeLuaLocalCache) Put(key string, value lua.LValue)

type RuntimeLuaMatchCore

type RuntimeLuaMatchCore struct {
	// contains filtered or unexported fields
}

func (*RuntimeLuaMatchCore) Cancel

func (r *RuntimeLuaMatchCore) Cancel()

func (*RuntimeLuaMatchCore) Label

func (r *RuntimeLuaMatchCore) Label() string

func (*RuntimeLuaMatchCore) MatchInit

func (r *RuntimeLuaMatchCore) MatchInit(presenceList *MatchPresenceList, deferMessageFn RuntimeMatchDeferMessageFunction, params map[string]interface{}) (interface{}, int, error)

func (*RuntimeLuaMatchCore) MatchJoin

func (r *RuntimeLuaMatchCore) MatchJoin(tick int64, state interface{}, joins []*MatchPresence) (interface{}, error)

func (*RuntimeLuaMatchCore) MatchJoinAttempt

func (r *RuntimeLuaMatchCore) MatchJoinAttempt(tick int64, state interface{}, userID, sessionID uuid.UUID, username string, sessionExpiry int64, vars map[string]string, clientIP, clientPort, node string, metadata map[string]string) (interface{}, bool, string, error)

func (*RuntimeLuaMatchCore) MatchLeave

func (r *RuntimeLuaMatchCore) MatchLeave(tick int64, state interface{}, leaves []*MatchPresence) (interface{}, error)

func (*RuntimeLuaMatchCore) MatchLoop

func (r *RuntimeLuaMatchCore) MatchLoop(tick int64, state interface{}, inputCh <-chan *MatchDataMessage) (interface{}, error)

func (*RuntimeLuaMatchCore) MatchTerminate

func (r *RuntimeLuaMatchCore) MatchTerminate(tick int64, state interface{}, graceSeconds int) (interface{}, error)

type RuntimeLuaModule

type RuntimeLuaModule struct {
	Name    string
	Path    string
	Content []byte
}

type RuntimeLuaModuleCache

type RuntimeLuaModuleCache struct {
	Names   []string
	Modules map[string]*RuntimeLuaModule
}

func (*RuntimeLuaModuleCache) Add

type RuntimeLuaNakamaModule

type RuntimeLuaNakamaModule struct {
	// contains filtered or unexported fields
}

func NewRuntimeLuaNakamaModule

func NewRuntimeLuaNakamaModule(logger *zap.Logger, db *sql.DB, jsonpbMarshaler *jsonpb.Marshaler, jsonpbUnmarshaler *jsonpb.Unmarshaler, config Config, socialClient *social.Client, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, leaderboardScheduler LeaderboardScheduler, sessionRegistry SessionRegistry, matchRegistry MatchRegistry, tracker Tracker, streamManager StreamManager, router MessageRouter, once *sync.Once, localCache *RuntimeLuaLocalCache, matchCreateFn RuntimeMatchCreateFunction, eventFn RuntimeEventCustomFunction, registerCallbackFn func(RuntimeExecutionMode, string, *lua.LFunction), announceCallbackFn func(RuntimeExecutionMode, string)) *RuntimeLuaNakamaModule

func (*RuntimeLuaNakamaModule) Loader

func (n *RuntimeLuaNakamaModule) Loader(l *lua.LState) int

type RuntimeMatchCore

type RuntimeMatchCore interface {
	MatchInit(presenceList *MatchPresenceList, deferMessageFn RuntimeMatchDeferMessageFunction, params map[string]interface{}) (interface{}, int, error)
	MatchJoinAttempt(tick int64, state interface{}, userID, sessionID uuid.UUID, username string, sessionExpiry int64, vars map[string]string, clientIP, clientPort, node string, metadata map[string]string) (interface{}, bool, string, error)
	MatchJoin(tick int64, state interface{}, joins []*MatchPresence) (interface{}, error)
	MatchLeave(tick int64, state interface{}, leaves []*MatchPresence) (interface{}, error)
	MatchLoop(tick int64, state interface{}, inputCh <-chan *MatchDataMessage) (interface{}, error)
	MatchTerminate(tick int64, state interface{}, graceSeconds int) (interface{}, error)
	Label() string
	Cancel()
}

func NewRuntimeGoMatchCore

func NewRuntimeGoMatchCore(logger *zap.Logger, matchRegistry MatchRegistry, router MessageRouter, id uuid.UUID, node string, stopped *atomic.Bool, db *sql.DB, env map[string]string, nk runtime.NakamaModule, match runtime.Match) (RuntimeMatchCore, error)

func NewRuntimeLuaMatchCore

func NewRuntimeLuaMatchCore(logger *zap.Logger, db *sql.DB, jsonpbMarshaler *jsonpb.Marshaler, jsonpbUnmarshaler *jsonpb.Unmarshaler, config Config, socialClient *social.Client, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, leaderboardScheduler LeaderboardScheduler, sessionRegistry SessionRegistry, matchRegistry MatchRegistry, tracker Tracker, streamManager StreamManager, router MessageRouter, stdLibs map[string]lua.LGFunction, once *sync.Once, localCache *RuntimeLuaLocalCache, goMatchCreateFn RuntimeMatchCreateFunction, eventFn RuntimeEventCustomFunction, sharedReg, sharedGlobals *lua.LTable, id uuid.UUID, node string, stopped *atomic.Bool, name string) (RuntimeMatchCore, error)

type RuntimeMatchCreateFunction

type RuntimeMatchCreateFunction func(ctx context.Context, logger *zap.Logger, id uuid.UUID, node string, stopped *atomic.Bool, name string) (RuntimeMatchCore, error)

type RuntimeMatchDeferMessageFunction

type RuntimeMatchDeferMessageFunction func(msg *DeferredMessage) error

type RuntimeMatchmakerMatchedFunction

type RuntimeMatchmakerMatchedFunction func(ctx context.Context, entries []*MatchmakerEntry) (string, bool, error)

type RuntimeProviderLua

type RuntimeProviderLua struct {
	// contains filtered or unexported fields
}

func (*RuntimeProviderLua) AfterReq

func (rp *RuntimeProviderLua) AfterReq(ctx context.Context, id string, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, res interface{}, req interface{}) error

func (*RuntimeProviderLua) AfterRt

func (rp *RuntimeProviderLua) AfterRt(ctx context.Context, id string, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, sessionID, clientIP, clientPort string, envelope *rtapi.Envelope) error

func (*RuntimeProviderLua) BeforeReq

func (rp *RuntimeProviderLua) BeforeReq(ctx context.Context, id string, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, req interface{}) (interface{}, error, codes.Code)

func (*RuntimeProviderLua) BeforeRt

func (rp *RuntimeProviderLua) BeforeRt(ctx context.Context, id string, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, sessionID, clientIP, clientPort string, envelope *rtapi.Envelope) (*rtapi.Envelope, error)

func (*RuntimeProviderLua) Get

func (*RuntimeProviderLua) LeaderboardReset

func (rp *RuntimeProviderLua) LeaderboardReset(ctx context.Context, leaderboard runtime.Leaderboard, reset int64) error

func (*RuntimeProviderLua) MatchmakerMatched

func (rp *RuntimeProviderLua) MatchmakerMatched(ctx context.Context, entries []*MatchmakerEntry) (string, bool, error)

func (*RuntimeProviderLua) Put

func (rp *RuntimeProviderLua) Put(r *RuntimeLua)

func (*RuntimeProviderLua) Rpc

func (rp *RuntimeProviderLua) Rpc(ctx context.Context, id string, queryParams map[string][]string, userID, username string, vars map[string]string, expiry int64, sessionID, clientIP, clientPort, payload string) (string, error, codes.Code)

func (*RuntimeProviderLua) TournamentEnd

func (rp *RuntimeProviderLua) TournamentEnd(ctx context.Context, tournament *api.Tournament, end, reset int64) error

func (*RuntimeProviderLua) TournamentReset

func (rp *RuntimeProviderLua) TournamentReset(ctx context.Context, tournament *api.Tournament, end, reset int64) error

type RuntimeRpcFunction

type RuntimeRpcFunction func(ctx context.Context, queryParams map[string][]string, userID, username string, vars map[string]string, expiry int64, sessionID, clientIP, clientPort, payload string) (string, error, codes.Code)

type RuntimeTournamentEndFunction

type RuntimeTournamentEndFunction func(ctx context.Context, tournament *api.Tournament, end, reset int64) error

type RuntimeTournamentResetFunction

type RuntimeTournamentResetFunction func(ctx context.Context, tournament *api.Tournament, end, reset int64) error

type Scannable

type Scannable interface {
	Scan(dest ...interface{}) error
}

Interface to help utility functions accept either *sql.Row or *sql.Rows for scanning one row at a time.

type Session

type Session interface {
	Logger() *zap.Logger
	ID() uuid.UUID
	UserID() uuid.UUID
	Vars() map[string]string
	ClientIP() string
	ClientPort() string

	Context() context.Context

	Username() string
	SetUsername(string)

	Expiry() int64
	Consume()

	Format() SessionFormat
	Send(envelope *rtapi.Envelope, reliable bool) error
	SendBytes(payload []byte, reliable bool) error

	Close(reason string)
}

func NewSessionWS

func NewSessionWS(logger *zap.Logger, config Config, format SessionFormat, sessionID, userID uuid.UUID, username string, vars map[string]string, expiry int64, clientIP string, clientPort string, jsonpbMarshaler *jsonpb.Marshaler, jsonpbUnmarshaler *jsonpb.Unmarshaler, conn *websocket.Conn, sessionRegistry SessionRegistry, matchmaker Matchmaker, tracker Tracker, metrics *Metrics, pipeline *Pipeline, runtime *Runtime) Session

type SessionConfig

type SessionConfig struct {
	EncryptionKey  string `yaml:"encryption_key" json:"encryption_key" usage:"The encryption key used to produce the client token."`
	TokenExpirySec int64  `yaml:"token_expiry_sec" json:"token_expiry_sec" usage:"Token expiry in seconds."`
}

SessionConfig is configuration relevant to the session.

func NewSessionConfig

func NewSessionConfig() *SessionConfig

NewSessionConfig creates a new SessionConfig struct.

type SessionFormat

type SessionFormat uint8
const (
	SessionFormatJson SessionFormat = iota
	SessionFormatProtobuf
)

type SessionRegistry

type SessionRegistry interface {
	Stop()
	Count() int
	Get(sessionID uuid.UUID) Session
	Add(session Session)
	Remove(sessionID uuid.UUID)
	Disconnect(ctx context.Context, sessionID uuid.UUID) error
}

func NewLocalSessionRegistry

func NewLocalSessionRegistry(metrics *Metrics) SessionRegistry

type SessionTokenClaims

type SessionTokenClaims struct {
	UserId    string            `json:"uid,omitempty"`
	Username  string            `json:"usn,omitempty"`
	Vars      map[string]string `json:"vrs,omitempty"`
	ExpiresAt int64             `json:"exp,omitempty"`
}

func (*SessionTokenClaims) Valid

func (stc *SessionTokenClaims) Valid() error

type SocialConfig

type SocialConfig struct {
	Steam               *SocialConfigSteam               `yaml:"steam" json:"steam" usage:"Steam configuration."`
	FacebookInstantGame *SocialConfigFacebookInstantGame `yaml:"facebook_instant_game" json:"facebook_instant_game" usage:"Facebook Instant Game configuration"`
	Apple               *SocialConfigApple               `yaml:"apple" json:"apple" usage:"Apple Sign In configuration."`
}

SocialConfig is configuration relevant to the social authentication providers.

func NewSocialConfig

func NewSocialConfig() *SocialConfig

NewSocialConfig creates a new SocialConfig struct.

type SocialConfigApple added in v2.13.0

type SocialConfigApple struct {
	BundleId string `yaml:"bundle_id" json:"bundle_id" usage:"Apple Sign In bundle ID."`
}

SocialConfigApple is configuration relevant to Apple Sign In.

type SocialConfigFacebookInstantGame added in v2.11.0

type SocialConfigFacebookInstantGame struct {
	AppSecret string `yaml:"app_secret" json:"app_secret" usage:"Facebook Instant App secret."`
}

SocialConfigFacebookInstantGame is configuration relevant to Facebook Instant Games.

type SocialConfigSteam

type SocialConfigSteam struct {
	PublisherKey string `yaml:"publisher_key" json:"publisher_key" usage:"Steam Publisher Key value."`
	AppID        int    `yaml:"app_id" json:"app_id" usage:"Steam App ID."`
}

SocialConfigSteam is configuration relevant to Steam.

type SocketConfig

type SocketConfig struct {
	ServerKey            string            `yaml:"server_key" json:"server_key" usage:"Server key to use to establish a connection to the server."`
	Port                 int               ``                  /* 154-byte string literal not displayed */
	Address              string            ``                  /* 156-byte string literal not displayed */
	Protocol             string            ``                  /* 198-byte string literal not displayed */
	MaxMessageSizeBytes  int64             ``                  /* 186-byte string literal not displayed */
	MaxRequestSizeBytes  int64             ``                  /* 180-byte string literal not displayed */
	ReadBufferSizeBytes  int               ``                  /* 136-byte string literal not displayed */
	WriteBufferSizeBytes int               ``                  /* 139-byte string literal not displayed */
	ReadTimeoutMs        int               ``                  /* 145-byte string literal not displayed */
	WriteTimeoutMs       int               ``                  /* 157-byte string literal not displayed */
	IdleTimeoutMs        int               ``                  /* 178-byte string literal not displayed */
	WriteWaitMs          int               ``                  /* 156-byte string literal not displayed */
	PongWaitMs           int               ``                  /* 156-byte string literal not displayed */
	PingPeriodMs         int               ``                  /* 204-byte string literal not displayed */
	PingBackoffThreshold int               ``                  /* 293-byte string literal not displayed */
	OutgoingQueueSize    int               ``                  /* 245-byte string literal not displayed */
	SSLCertificate       string            ``                  /* 192-byte string literal not displayed */
	SSLPrivateKey        string            ``                  /* 192-byte string literal not displayed */
	CertPEMBlock         []byte            `yaml:"-" json:"-"` // Created by fully reading the file contents of SSLCertificate, not set from input args directly.
	KeyPEMBlock          []byte            `yaml:"-" json:"-"` // Created by fully reading the file contents of SSLPrivateKey, not set from input args directly.
	TLSCert              []tls.Certificate `yaml:"-" json:"-"` // Created by processing CertPEMBlock and KeyPEMBlock, not set from input args directly.
}

SocketConfig is configuration relevant to the transport socket and protocol.

func NewSocketConfig

func NewSocketConfig() *SocketConfig

NewTransportConfig creates a new TransportConfig struct.

type StatusHandler

type StatusHandler interface {
	GetStatus(ctx context.Context) ([]*console.StatusList_Status, error)
}

func NewLocalStatusHandler

func NewLocalStatusHandler(logger *zap.Logger, sessionRegistry SessionRegistry, matchRegistry MatchRegistry, tracker Tracker, metrics *Metrics, node string) StatusHandler

type StorageOpDelete

type StorageOpDelete struct {
	OwnerID  string
	ObjectID *api.DeleteStorageObjectId
}

type StorageOpDeletes

type StorageOpDeletes []*StorageOpDelete

Internal representation for a batch of storage delete operations.

func (StorageOpDeletes) Len

func (s StorageOpDeletes) Len() int

func (StorageOpDeletes) Less

func (s StorageOpDeletes) Less(i, j int) bool

func (StorageOpDeletes) Swap

func (s StorageOpDeletes) Swap(i, j int)

type StorageOpWrite

type StorageOpWrite struct {
	OwnerID string
	Object  *api.WriteStorageObject
}

type StorageOpWrites

type StorageOpWrites []*StorageOpWrite

Internal representation for a batch of storage write operations.

func (StorageOpWrites) Len

func (s StorageOpWrites) Len() int

func (StorageOpWrites) Less

func (s StorageOpWrites) Less(i, j int) bool

func (StorageOpWrites) Swap

func (s StorageOpWrites) Swap(i, j int)

type StreamManager

type StreamManager interface {
	UserJoin(stream PresenceStream, userID, sessionID uuid.UUID, hidden, persistence bool, status string) (bool, bool, error)
	UserUpdate(stream PresenceStream, userID, sessionID uuid.UUID, hidden, persistence bool, status string) (bool, error)
	UserLeave(stream PresenceStream, userID, sessionID uuid.UUID) error
}

func NewLocalStreamManager

func NewLocalStreamManager(config Config, sessionRegistry SessionRegistry, tracker Tracker) StreamManager

type TournamentListCursor added in v2.9.1

type TournamentListCursor struct {
	Id string
}

type Tracker

type Tracker interface {
	SetMatchJoinListener(func(id uuid.UUID, joins []*MatchPresence))
	SetMatchLeaveListener(func(id uuid.UUID, leaves []*MatchPresence))
	Stop()

	// Track returns success true/false, and new presence true/false.
	Track(sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID, meta PresenceMeta, allowIfFirstForSession bool) (bool, bool)
	Untrack(sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID)
	UntrackAll(sessionID uuid.UUID)
	// Update returns success true/false - will only fail if the user has no presence and allowIfFirstForSession is false, otherwise is an upsert.
	Update(sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID, meta PresenceMeta, allowIfFirstForSession bool) bool

	// Remove all presences on a stream, effectively closing it.
	UntrackByStream(stream PresenceStream)
	// Remove all presences on a stream from the local node.
	UntrackLocalByStream(stream PresenceStream)

	// List the nodes that have at least one presence for the given stream.
	ListNodesForStream(stream PresenceStream) map[string]struct{}

	// Check if a stream exists (has any presences) or not.
	StreamExists(stream PresenceStream) bool
	// Get current total number of presences.
	Count() int
	// Get the number of presences in the given stream.
	CountByStream(stream PresenceStream) int
	// Get a snapshot of current presence counts for streams with one of the given stream modes.
	CountByStreamModeFilter(modes map[uint8]*uint8) map[*PresenceStream]int32
	// Check if a single presence on the current node exists.
	GetLocalBySessionIDStreamUserID(sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID) *PresenceMeta
	// Check if a single presence on any node exists.
	GetBySessionIDStreamUserID(node string, sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID) *PresenceMeta
	// List presences by stream, optionally include hidden ones and not hidden ones.
	ListByStream(stream PresenceStream, includeHidden bool, includeNotHidden bool) []*Presence

	// Fast lookup of local session IDs to use for message delivery.
	ListLocalSessionIDByStream(stream PresenceStream) []uuid.UUID
	// Fast lookup of node + session IDs to use for message delivery.
	ListPresenceIDByStream(stream PresenceStream) []*PresenceID
}

func StartLocalTracker

func StartLocalTracker(logger *zap.Logger, config Config, sessionRegistry SessionRegistry, metrics *Metrics, jsonpbMarshaler *jsonpb.Marshaler) Tracker

type TrackerConfig

type TrackerConfig struct {
	EventQueueSize int `` /* 210-byte string literal not displayed */
}

TrackerConfig is configuration relevant to the presence tracker.

func NewTrackerConfig

func NewTrackerConfig() *TrackerConfig

NewTrackerConfig creates a new TrackerConfig struct.

type Tx

type Tx interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	Commit() error
	Rollback() error
}

Tx is used to permit clients to implement custom transaction logic.

type TxnRestartError

type TxnRestartError struct {
	// contains filtered or unexported fields
}

TxnRestartError represents an error when restarting a transaction. `cause` is the error from restarting the txn and `retryCause` is the original error which triggered the restart.

func (*TxnRestartError) Cause

func (e *TxnRestartError) Cause() error

Cause implements the ErrorCauser interface.

func (*TxnRestartError) Error

func (e *TxnRestartError) Error() string

Error implements the error interface.

func (*TxnRestartError) RetryCause

func (e *TxnRestartError) RetryCause() error

RetryCause returns the error that caused the transaction to be restarted.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL