server

package
v0.0.0-...-403a800 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 117 Imported by: 0

Documentation

Overview

Copyright 2024 The Bombus Authors

Use of this source code is governed by a MIT style license that can be found in the LICENSE file.

Index

Constants

View Source
const (
	NotificationCodeDmRequest        int32 = -1
	NotificationCodeFriendRequest    int32 = -2
	NotificationCodeFriendAccept     int32 = -3
	NotificationCodeGroupAdd         int32 = -4
	NotificationCodeGroupJoinRequest int32 = -5
	NotificationCodeFriendJoinGame   int32 = -6
	NotificationCodeSingleSocket     int32 = -7
	NotificationCodeUserBanned       int32 = -8
)
View Source
const (
	LeaderboardSortOrderAscending = iota
	LeaderboardSortOrderDescending
)
View Source
const (
	LeaderboardOperatorBest = iota
	LeaderboardOperatorSet
	LeaderboardOperatorIncrement
	LeaderboardOperatorDecrement
)
View Source
const (
	PeerMsg_NOTIFY = iota
	PeerMsg_REMOTESTATE
	PeerMsg_REMOTESTATEJOIN
)
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
	StreamModeParty
)
View Source
const API_PREFIX = "/layerg.api.LayerG/"
View Source
const AppleNotificationTypeRefund = "REFUND"
View Source
const AppleRootPEM = `` /* 848-byte string literal not displayed */
View Source
const BANNED_CODE = 4
View Source
const INIT_MODULE_FN_NAME = "InitModule"
View Source
const JsEntrypointFilename = "index.js"
View Source
const LTSentinel = lua.LValueType(-1)
View Source
const ObfuscationString = "REDACTED"
View Source
const RTAPI_PREFIX = "*rtapi.Envelope_"

Variables

View Source
var (
	ErrLeaderboardNotFound      = errors.New("leaderboard not found")
	ErrLeaderboardAuthoritative = errors.New("leaderboard only allows authoritative submissions")
	ErrLeaderboardInvalidCursor = errors.New("leaderboard cursor invalid")
	ErrInvalidOperator          = errors.New("invalid operator")
)
View Source
var (
	ErrSessionTokenInvalid = errors.New("session token invalid")
	ErrRefreshTokenInvalid = errors.New("refresh token invalid")
)
View Source
var (
	MatchFilterValue   = uint8(0)
	MatchFilterPtr     = &MatchFilterValue
	MatchFilterRelayed = map[uint8]*uint8{StreamModeMatchRelayed: MatchFilterPtr}

	MatchLabelMaxBytes = 2048
)
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 API_PREFIX_LOWERCASE = strings.ToLower(API_PREFIX)
View Source
var BlugeKeywordAnalyzer = analyzer.NewKeywordAnalyzer()
View Source
var ErrAccountNotFound = errors.New("account not found")
View Source
var ErrDatabaseDriverMismatch = errors.New("database driver mismatch")
View Source
var ErrEmptyMemberDemote = errors.New("could not demote member")
View Source
var ErrEmptyMemberKick = errors.New("could not kick member")
View Source
var ErrEmptyMemberPromote = errors.New("could not promote member")
View Source
var ErrMatchInitStateNil = errors.New("Match initial state must not be nil")
View Source
var ErrMatchStopped = errors.New("match stopped")
View Source
var ErrPartyNotFound = errors.New("party not found")
View Source
var ErrPurchasesListInvalidCursor = errors.New("purchases list cursor invalid")
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 ErrSubscriptionNotFound = errors.New("subscription not found")
View Source
var ErrSubscriptionsListInvalidCursor = errors.New("subscriptions list cursor invalid")
View Source
var LSentinel = lua.LValue(&LSentinelType{})
View Source
var (
	OperatorIntToEnum = map[int]api.Operator{
		LeaderboardOperatorBest:      api.Operator_BEST,
		LeaderboardOperatorSet:       api.Operator_SET,
		LeaderboardOperatorIncrement: api.Operator_INCREMENT,
		LeaderboardOperatorDecrement: api.Operator_DECREMENT,
	}
)
View Source
var RTAPI_PREFIX_LOWERCASE = strings.ToLower(RTAPI_PREFIX)

Functions

func AddFriends

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

func AddGroupUsers

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

func AuthenticateApple

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 AuthenticateEvm

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

func AuthenticateFacebook

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

func AuthenticateFacebookInstantGame

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, string, bool, error)

func AuthenticateTelegram

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

func AuthenticateUA

func AuthenticateUA(ctx context.Context, logger *zap.Logger, db *sql.DB, config Config, token 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

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

func BanUsers

func BanUsers(ctx context.Context, logger *zap.Logger, db *sql.DB, config Config, sessionCache SessionCache, sessionRegistry SessionRegistry, tracker Tracker, ids []uuid.UUID) error

func BlockFriends

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

func BlugeInMemoryConfig

func BlugeInMemoryConfig() bluge.Config

func BlugeWalkDocument

func BlugeWalkDocument(data interface{}, path []string, sortablePaths map[string]bool, doc *bluge.Document)

func ChannelMessageRemove

func ChannelMessageRemove(ctx context.Context, logger *zap.Logger, db *sql.DB, router MessageRouter, channelStream PresenceStream, channelId, messageId, senderId, senderUsername string, persist bool) (*rtapi.ChannelMessageAck, error)

func ChannelMessageSend

func ChannelMessageSend(ctx context.Context, logger *zap.Logger, db *sql.DB, router MessageRouter, channelStream PresenceStream, channelId, content, senderId, senderUsername string, persist bool) (*rtapi.ChannelMessageAck, error)

func ChannelMessageUpdate

func ChannelMessageUpdate(ctx context.Context, logger *zap.Logger, db *sql.DB, router MessageRouter, channelStream PresenceStream, channelId, messageId, content, senderId, senderUsername string, persist bool) (*rtapi.ChannelMessageAck, 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 CheckRuntime

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

func CheckRuntimeProviderGo

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

func CheckRuntimeProviderJavascript

func CheckRuntimeProviderJavascript(logger *zap.Logger, config Config, version string) error

func CheckRuntimeProviderLua

func CheckRuntimeProviderLua(logger *zap.Logger, config Config, version string, 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 DbConnect

func DbConnect(ctx context.Context, logger *zap.Logger, config Config, create bool) *sql.DB

func DeleteAccount

func DeleteAccount(ctx context.Context, logger *zap.Logger, db *sql.DB, config Config, leaderboardCache LeaderboardCache, leaderboardRankCache LeaderboardRankCache, sessionRegistry SessionRegistry, sessionCache SessionCache, tracker Tracker, 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

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

func DisableTournamentRanks

func DisableTournamentRanks(ctx context.Context, logger *zap.Logger, db *sql.DB, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, id string) error

func ExecuteInTx

func ExecuteInTx(ctx context.Context, db *sql.DB, fn func(*sql.Tx) error) error

ExecuteInTx runs fn inside tx which should already have begun. fn is subject to the same restrictions as the fn passed to ExecuteTx.

func ExecuteInTxPgx

func ExecuteInTxPgx(ctx context.Context, db *sql.DB, fn func(pgx.Tx) error) error

Same as ExecuteInTx, but passes pgx.Tx to callback

func ExecuteRetryable

func ExecuteRetryable(fn func() error) error

ExecuteRetryable Retry functions that perform non-transactional database operations.

func ExecuteRetryablePgx

func ExecuteRetryablePgx(ctx context.Context, db *sql.DB, fn func(conn *pgx.Conn) error) error

ExecuteRetryablePgx Retry functions that perform non-transactional database operations on PgConn

func ExportAccount

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

func FileRead

func FileRead(rootPath, relPath string) (*os.File, error)

Open a file relative to the runtime path.

func GET

func GET(ctx context.Context, endpoint string, token string, params map[string]string, responseStruct interface{}) error

GET function with dynamic response unmarshaling and handling for nil params

func GetAccount

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

func GetAccounts

func GetAccounts(ctx context.Context, logger *zap.Logger, db *sql.DB, statusRegistry StatusRegistry, 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 GetNFTs

func GetNFTs(ctx context.Context, params runtime.NFTQueryParams, config Config) (*runtime.NFTResponse, error)

func GetPurchaseByTransactionId

func GetPurchaseByTransactionId(ctx context.Context, logger *zap.Logger, db *sql.DB, transactionID string) (*api.ValidatedPurchase, error)

func GetRandomGroups

func GetRandomGroups(ctx context.Context, logger *zap.Logger, db *sql.DB, count int) ([]*api.Group, error)

func GetRandomUsers

func GetRandomUsers(ctx context.Context, logger *zap.Logger, db *sql.DB, statusRegistry StatusRegistry, count int) ([]*api.User, error)

func GetRuntimePaths

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

func GetSubscriptionByProductId

func GetSubscriptionByProductId(ctx context.Context, logger *zap.Logger, db *sql.DB, userID, productID string) (*api.ValidatedSubscription, error)

func GetUsers

func GetUsers(ctx context.Context, logger *zap.Logger, db *sql.DB, statusRegistry StatusRegistry, 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 HandleShutdown

func HandleShutdown(ctx context.Context, logger *zap.Logger, matchRegistry MatchRegistry, graceSeconds int, shutdownFn RuntimeShutdownFunction, c chan os.Signal)

func HashFromId

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

func JoinGroup

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

func KickGroupUsers

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

func LeaderboardList

func LeaderboardList(logger *zap.Logger, leaderboardCache LeaderboardCache, limit int, cursor *LeaderboardListCursor) (*api.LeaderboardList, 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, overrideOperator api.Operator) (*api.LeaderboardRecord, error)

func LeaderboardRecordsDeleteAll

func LeaderboardRecordsDeleteAll(ctx context.Context, logger *zap.Logger, leaderboardCache LeaderboardCache, leaderboardRankCache LeaderboardRankCache, tx *sql.Tx, userID uuid.UUID, currentTime int64) error

func LeaderboardRecordsHaystack

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

func LeaderboardRecordsList

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

func LeaderboardsGet

func LeaderboardsGet(leaderboardCache LeaderboardCache, leaderboardIDs []string) []*api.Leaderboard

func LeaveGroup

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

func LinkApple

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

func LinkCustom

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

func LinkDevice

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

func LinkEmail

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

func LinkEvm

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

func LinkFacebook

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

func LinkFacebookInstantGame

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

func LinkGameCenter

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

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

func LinkSteam

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

func ListFriends

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

func ListFriendsOfFriends

func ListFriendsOfFriends(ctx context.Context, logger *zap.Logger, db *sql.DB, statusRegistry StatusRegistry, userID uuid.UUID, limit int, cursor string) (*api.FriendsOfFriendsList, error)

func ListGroupUsers

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

func ListGroups

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

func ListPurchases

func ListPurchases(ctx context.Context, logger *zap.Logger, db *sql.DB, userID string, limit int, cursor string) (*api.PurchaseList, error)

func ListSubscriptions

func ListSubscriptions(ctx context.Context, logger *zap.Logger, db *sql.DB, userID string, limit int, cursor string) (*api.SubscriptionList, error)

func ListUserGroups

func ListUserGroups(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, limit int, state *wrapperspb.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, string, error)

func MapMatchIndexEntry

func MapMatchIndexEntry(id string, in *MatchIndexEntry) (*bluge.Document, error)

func MapMatchmakerIndex

func MapMatchmakerIndex(id string, in *MatchmakerIndex) (*bluge.Document, error)

func MintNFT

func MintNFT(ctx context.Context, token string, request MintNFTRequest, config Config) error

func MultiUpdate

func MultiUpdate(ctx context.Context, logger *zap.Logger, db *sql.DB, metrics Metrics, accountUpdates []*accountUpdate, storageWrites StorageOpWrites, storageDeletes StorageOpDeletes, storageIndex StorageIndex, 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 NewGrpcCustomLogger

func NewGrpcCustomLogger(logger *zap.Logger) (grpcCustomLogger, error)

GRPC custom logger defaults to Error level, unless the logger level is higher. https://github.com/grpc/grpc-go/blob/master/grpclog/loggerv2.go

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 NewJsLogger

func NewJsLogger(r *goja.Runtime, logger *zap.Logger, fields ...zap.Field) (goja.Value, error)

func NewLocalFmCallbackHandler

func NewLocalFmCallbackHandler(config Config) runtime.FmCallbackHandler

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 NewRuntime

func NewRuntime(ctx context.Context, logger, startupLogger *zap.Logger, db *sql.DB, protojsonMarshaler *protojson.MarshalOptions, protojsonUnmarshaler *protojson.UnmarshalOptions, config Config, version string, socialClient *social.Client, leaderboardCache LeaderboardCache, leaderboardRankCache LeaderboardRankCache, leaderboardScheduler LeaderboardScheduler, sessionRegistry SessionRegistry, sessionCache SessionCache, statusRegistry StatusRegistry, matchRegistry MatchRegistry, tracker Tracker, metrics Metrics, streamManager StreamManager, router MessageRouter, storageIndex StorageIndex, fmCallbackHandler runtime.FmCallbackHandler, activeCache ActiveTokenCache) (*Runtime, *RuntimeInfo, error)

func NewRuntimeGoContext

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

ignore warnings about strings being used as ctx keys

func NewRuntimeGoLogger

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

func NewRuntimeJavascriptLayerGModule

func NewRuntimeJavascriptLayerGModule(logger *zap.Logger, db *sql.DB, protojsonMarshaler *protojson.MarshalOptions, protojsonUnmarshaler *protojson.UnmarshalOptions, config Config, socialClient *social.Client, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, storageIndex StorageIndex, localCache *RuntimeJavascriptLocalCache, leaderboardScheduler LeaderboardScheduler, sessionRegistry SessionRegistry, sessionCache SessionCache, statusRegistry StatusRegistry, matchRegistry MatchRegistry, tracker Tracker, metrics Metrics, streamManager StreamManager, router MessageRouter, eventFn RuntimeEventCustomFunction, matchCreateFn RuntimeMatchCreateFunction, activeCache ActiveTokenCache) *runtimeJavascriptLayerGModule

func NewRuntimeJsContext

func NewRuntimeJsContext(r *goja.Runtime, node, version string, env goja.Value, mode RuntimeExecutionMode, httpHeaders, queryParams map[string][]string, sessionExpiry int64, userID, username string, vars map[string]string, sessionID, clientIP, clientPort, lang string) *goja.Object

func NewRuntimeJsInitContext

func NewRuntimeJsInitContext(r *goja.Runtime, node, version string, env map[string]string) *goja.Object

func NewRuntimeLuaContext

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

func NewSocketWsAcceptor

func NewSocketWsAcceptor(logger *zap.Logger, config Config, sessionRegistry SessionRegistry, sessionCache SessionCache, statusRegistry StatusRegistry, matchmaker Matchmaker, tracker Tracker, metrics Metrics, runtime *Runtime, protojsonMarshaler *protojson.MarshalOptions, protojsonUnmarshaler *protojson.UnmarshalOptions, pipeline *Pipeline) func(http.ResponseWriter, *http.Request)

func NodeToHash

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, tracker Tracker, messageRouter MessageRouter, notifications map[uuid.UUID][]*api.Notification) error

func NotificationSendAll

func NotificationSendAll(ctx context.Context, logger *zap.Logger, db *sql.DB, gotracker Tracker, messageRouter MessageRouter, notification *api.Notification) error

func NotificationsDeleteId

func NotificationsDeleteId(ctx context.Context, logger *zap.Logger, db *sql.DB, userID string, ids ...string) error

func NotificationsGetId

func NotificationsGetId(ctx context.Context, logger *zap.Logger, db *sql.DB, userID string, ids ...string) ([]*runtime.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 POST

func POST(ctx context.Context, endpoint string, token string, body interface{}, responseStruct interface{}) error

POST function with dynamic response unmarshaling and handling for nil body

func ParseQueryString

func ParseQueryString(query string) (bluge.Query, error)

func ProfileGoja

func ProfileGoja(w http.ResponseWriter, r *http.Request)

Profile responds with the pprof-formatted cpu profile. Profiling lasts for duration specified in seconds GET parameter, or for 30 seconds if not specified. https://github.com/dop251/goja/blob/master/profiler.go#L271

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 RedirectStdLog

func RedirectStdLog(logger *zap.Logger)

func RemapGoogleId

func RemapGoogleId(ctx context.Context, logger *zap.Logger, db *sql.DB, googleProfile social.GoogleProfile) error

func RuntimeJsConvertJsValue

func RuntimeJsConvertJsValue(jv interface{}) interface{}

func RuntimeLuaConvertLuaTable

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

func RuntimeLuaConvertLuaTableString

func RuntimeLuaConvertLuaTableString(vars *lua.LTable) (map[string]string, error)

func RuntimeLuaConvertLuaValue

func RuntimeLuaConvertLuaValue(lv lua.LValue) interface{}

func RuntimeLuaConvertMap

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

func RuntimeLuaConvertMapInt64

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 SessionLogout

func SessionLogout(config Config, sessionCache SessionCache, userID uuid.UUID, token, refreshToken string) error

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, storageIndex StorageIndex, 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, metrics Metrics, storageIndex StorageIndex, authoritativeWrite bool, ops StorageOpWrites) (*api.StorageObjectAcks, codes.Code, error)

func StreamToChannelId

func StreamToChannelId(stream PresenceStream) (string, error)

func SyncUsers

func SyncUsers(ctx context.Context, db *sql.DB)

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, authoritative bool, sortOrder, operator int, resetSchedule, metadata,
	title, description string, category, startTime, endTime, duration, maxSize, maxNumScore int, joinRequired, enableRanks 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, rankCache LeaderboardRankCache, ownerID uuid.UUID, 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 TournamentRecordDelete

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

func TournamentRecordWrite

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

func TournamentRecordsHaystack

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

func TournamentRecordsList

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

func TournamentsGet

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

func TransferNFT

func TransferNFT(ctx context.Context, token string, request TransferNFTRequest, config Config) error

func UnbanUsers

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

func UnlinkApple

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

func UnlinkCustom

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

func UnlinkDevice

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

func UnlinkEmail

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

func UnlinkFacebook

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

func UnlinkFacebookInstantGame

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

func UnlinkGameCenter

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

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

func UnlinkSteam

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

func UpdateAccounts

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 *wrapperspb.StringValue, open *wrapperspb.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)

func ValidateConfig

func ValidateConfig(logger *zap.Logger, c Config) map[string]string

func ValidateConfigDatabase

func ValidateConfigDatabase(logger *zap.Logger, c Config)

func ValidatePurchaseFacebookInstant

func ValidatePurchaseFacebookInstant(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, config *IAPFacebookInstantConfig, signedRequest string, persist bool) (*api.ValidatePurchaseResponse, error)

func ValidatePurchaseGoogle

func ValidatePurchaseGoogle(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, config *IAPGoogleConfig, receipt string, persist bool) (*api.ValidatePurchaseResponse, error)

func ValidatePurchaseHuawei

func ValidatePurchaseHuawei(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, config *IAPHuaweiConfig, inAppPurchaseData, signature string, persist bool) (*api.ValidatePurchaseResponse, error)

func ValidatePurchasesApple

func ValidatePurchasesApple(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, password, receipt string, persist bool) (*api.ValidatePurchaseResponse, error)

func ValidateSubscriptionApple

func ValidateSubscriptionApple(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, password, receipt string, persist bool) (*api.ValidateSubscriptionResponse, error)

func ValidateSubscriptionGoogle

func ValidateSubscriptionGoogle(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, config *IAPGoogleConfig, receipt string, persist bool) (*api.ValidateSubscriptionResponse, error)

Types

type ActiveTokenCache

type ActiveTokenCache interface {
	Stop()

	// Check if a given user's local session token and refresh token are valid.
	IsValidLocalToken(userID uuid.UUID, exp int64, tokenId string, refreshExp int64, refreshTokenId string) bool
	// Check if a given user's global session token and refresh token are valid.
	IsValidGlobalToken(userID uuid.UUID, exp int64, tokenId string, refreshExp int64, refreshTokenId string) bool
	// Add or update the local and global tokens for a given user.
	Add(userID uuid.UUID, localSessionExp int64, localSessionTokenId string, localRefreshExp int64, localRefreshTokenId string, globalSessionExp int64, globalSessionTokenId string, globalRefreshExp int64, globalRefreshTokenId string)
	// Remove the local and global tokens for a given user.
	Remove(userID uuid.UUID, localSessionTokenId string, globalSessionTokenId string)
	// Remove all tokens (both local and global) for a given user.
	RemoveAll(userID uuid.UUID)

	GetActiveTokens(userID uuid.UUID) (localSessionToken, localRefreshToken, globalSessionToken, globalRefreshToken string, localSessionExp, localRefreshExp, globalSessionExp, globalRefreshExp int64)
}

func NewLocalActiveTokenCache

func NewLocalActiveTokenCache(localTokenExpirySec, globalTokenExpirySec int64) ActiveTokenCache

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 ApiResponse

type ApiResponse struct {
	Users      []api.User `json:"users"`
	TotalCount int        `json:"total_count"`
	NextCursor string     `json:"next_cursor"`
}

type ApiServer

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

func StartApiServer

func StartApiServer(logger *zap.Logger, startupLogger *zap.Logger, db *sql.DB, protojsonMarshaler *protojson.MarshalOptions, protojsonUnmarshaler *protojson.UnmarshalOptions, config Config, version string, socialClient *social.Client, storageIndex StorageIndex, leaderboardCache LeaderboardCache, leaderboardRankCache LeaderboardRankCache, sessionRegistry SessionRegistry, sessionCache SessionCache, statusRegistry StatusRegistry, matchRegistry MatchRegistry, matchmaker Matchmaker, tracker Tracker, router MessageRouter, streamManager StreamManager, metrics Metrics, pipeline *Pipeline, runtime *Runtime, activeCache ActiveTokenCache) *ApiServer

func (*ApiServer) AddFriends

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

func (*ApiServer) AddGroupUsers

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

func (*ApiServer) Any

func (s *ApiServer) Any(ctx context.Context, in *api.Request) (*api.ResponseWriter, error)

func (*ApiServer) AnyHTTP

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

func (*ApiServer) AuthenticateApple

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) AuthenticateEvm

func (s *ApiServer) AuthenticateEvm(ctx context.Context, in *api.AuthenticateEvmRequest) (*api.Session, error)

func (*ApiServer) AuthenticateFacebook

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

func (*ApiServer) AuthenticateFacebookInstantGame

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) AuthenticateTelegram

func (s *ApiServer) AuthenticateTelegram(ctx context.Context, in *api.AuthenticateTelegramRequest) (*api.Session, error)

func (*ApiServer) AuthenticateUA

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

func (*ApiServer) BanGroupUsers

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

func (*ApiServer) BlockFriends

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

func (*ApiServer) CreateGroup

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

func (*ApiServer) DeleteAccount

func (s *ApiServer) DeleteAccount(ctx context.Context, in *emptypb.Empty) (*emptypb.Empty, error)

func (*ApiServer) DeleteFriends

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

func (*ApiServer) DeleteGroup

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

func (*ApiServer) DeleteLeaderboardRecord

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

func (*ApiServer) DeleteNotifications

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

func (*ApiServer) DeleteStorageObjects

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

func (*ApiServer) DeleteTournamentRecord

func (s *ApiServer) DeleteTournamentRecord(ctx context.Context, in *api.DeleteTournamentRecordRequest) (*emptypb.Empty, error)

func (*ApiServer) DemoteGroupUsers

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

func (*ApiServer) Event

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

func (*ApiServer) GetAccount

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

func (*ApiServer) GetMatchmakerStats

func (s *ApiServer) GetMatchmakerStats(ctx context.Context, in *emptypb.Empty) (*api.MatchmakerStats, error)

func (*ApiServer) GetSubscription

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 *emptypb.Empty) (*emptypb.Empty, error)

func (*ApiServer) ImportFacebookFriends

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

func (*ApiServer) ImportSteamFriends

func (s *ApiServer) ImportSteamFriends(ctx context.Context, in *api.ImportSteamFriendsRequest) (*emptypb.Empty, error)

func (*ApiServer) JoinGroup

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

func (*ApiServer) JoinTournament

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

func (*ApiServer) KickGroupUsers

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

func (*ApiServer) LeaveGroup

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

func (*ApiServer) LinkApple

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

func (*ApiServer) LinkCustom

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

func (*ApiServer) LinkDevice

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

func (*ApiServer) LinkEmail

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

func (*ApiServer) LinkEvm

func (s *ApiServer) LinkEvm(ctx context.Context, in *api.AccountEvm) (*emptypb.Empty, error)

func (*ApiServer) LinkFacebook

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

func (*ApiServer) LinkFacebookInstantGame

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

func (*ApiServer) LinkGameCenter

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

func (*ApiServer) LinkGoogle

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

func (*ApiServer) LinkSteam

func (s *ApiServer) LinkSteam(ctx context.Context, in *api.LinkSteamRequest) (*emptypb.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) ListFriendsOfFriends

func (s *ApiServer) ListFriendsOfFriends(ctx context.Context, in *api.ListFriendsOfFriendsRequest) (*api.FriendsOfFriendsList, 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) ListSubscriptions

func (s *ApiServer) ListSubscriptions(ctx context.Context, in *api.ListSubscriptionsRequest) (*api.SubscriptionList, 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) (*emptypb.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) SessionLogout

func (s *ApiServer) SessionLogout(ctx context.Context, in *api.SessionLogoutRequest) (*emptypb.Empty, error)

func (*ApiServer) SessionRefresh

func (s *ApiServer) SessionRefresh(ctx context.Context, in *api.SessionRefreshRequest) (*api.Session, error)

func (*ApiServer) Stop

func (s *ApiServer) Stop()

func (*ApiServer) UnlinkApple

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

func (*ApiServer) UnlinkCustom

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

func (*ApiServer) UnlinkDevice

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

func (*ApiServer) UnlinkEmail

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

func (*ApiServer) UnlinkFacebook

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

func (*ApiServer) UnlinkFacebookInstantGame

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

func (*ApiServer) UnlinkGameCenter

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

func (*ApiServer) UnlinkGoogle

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

func (*ApiServer) UnlinkSteam

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

func (*ApiServer) UpdateAccount

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

func (*ApiServer) UpdateGroup

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

func (*ApiServer) ValidatePurchaseApple

func (*ApiServer) ValidatePurchaseGoogle

func (*ApiServer) ValidatePurchaseHuawei

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 Attribute

type Attribute struct {
	Value     string `json:"value"`
	TraitType string `json:"trait_type"`
}

Struct to represent individual metadata attributes

type AuthenticatorServiceClient

type AuthenticatorServiceClient interface {
	AuthenticateEmail(ctx context.Context, in *api.AuthenticateEmailRequest, opts ...grpc.CallOption) (*api.Session, error)
	AuthenticateGoogle(ctx context.Context, in *api.AuthenticateGoogleRequest, opts ...grpc.CallOption) (*api.Session, error)
	AuthenticateApple(ctx context.Context, in *api.AuthenticateAppleRequest, opts ...grpc.CallOption) (*api.Session, error)
	AuthenticateCustom(ctx context.Context, in *api.AuthenticateCustomRequest, opts ...grpc.CallOption) (*api.Session, error)
	AuthenticateDevice(ctx context.Context, in *api.AuthenticateDeviceRequest, opts ...grpc.CallOption) (*api.Session, error)
	AuthenticateFacebook(ctx context.Context, in *api.AuthenticateFacebookRequest, opts ...grpc.CallOption) (*api.Session, error)
	AuthenticateFacebookInstantGame(ctx context.Context, in *api.AuthenticateFacebookInstantGameRequest, opts ...grpc.CallOption) (*api.Session, error)
	AuthenticateGameCenter(ctx context.Context, in *api.AuthenticateGameCenterRequest, opts ...grpc.CallOption) (*api.Session, error)
	AuthenticateSteam(ctx context.Context, in *api.AuthenticateSteamRequest, opts ...grpc.CallOption) (*api.Session, error)
	AuthenticateEvm(ctx context.Context, in *api.AuthenticateEvmRequest, opts ...grpc.CallOption) (*api.Session, error)
	AuthenticateTelegram(ctx context.Context, in *api.AuthenticateTelegramRequest, opts ...grpc.CallOption) (*api.Session, error)
	SessionRefresh(ctx context.Context, in *api.SessionRefreshRequest, opts ...grpc.CallOption) (*api.Session, error)
}

type BinaryLog

type BinaryLog interface {
	Push(log *pb.BinaryLog) bool
	NextID() uint64
	CurrentID() uint64
	GetBroadcasts(limit int) []*pb.BinaryLog
	GetCheckPoint() *pb.CheckPoint
	MergeCheckPoint(checkPoint *pb.CheckPoint, join bool)
	SetLocalCheckPoint(name string, version uint64)
	ClearBinaryLogByNode(node string)
	GetBinaryLogVersionByNode(node string) (min, max uint64)
	GetBinaryLogVersions() map[string][2]uint64
	Len() int
	Stop()
	GetPendingBinaryLog() []*pb.BinaryLog
}

func NewLocalBinaryLog

func NewLocalBinaryLog(ctx context.Context, logger *zap.Logger, node string, numMembers func() int) BinaryLog

type BlugeResult

type BlugeResult struct {
	Hits []*blugeMatch
}

func IterateBlugeMatches

func IterateBlugeMatches(dmi search.DocumentMatchIterator, loadFields map[string]struct{}, logger *zap.Logger) (*BlugeResult, error)

type Buffer

type Buffer[T any] struct {
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer(size int) *Buffer[MatchmakerStatsEntry]

func (*Buffer[T]) Clone

func (q *Buffer[T]) Clone() []T

func (*Buffer[T]) Insert

func (q *Buffer[T]) Insert(v T)

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 Claims

type Claims struct {
	ID     string `json:"id"`
	Exp    int64  `json:"exp"`
	ApiKey string `json:"apiKey"`
	jwt.StandardClaims
}

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
	GetMatchmaker() *MatchmakerConfig
	GetIAP() *IAPConfig
	GetGoogleAuth() *GoogleAuthConfig
	GetSatori() *SatoriConfig
	GetStorage() *StorageConfig
	GetMFA() *MFAConfig
	GetLimit() int
	GetCluster() *PeerConfig
	GetLayerGCoreConfig() *LayerGCoreConfig

	Clone() (Config, error)
}

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."`
	MFA                 *MFAConfig `yaml:"mfa" json:"mfa" usage:"MFA settings."`
	PublicKey           string     `yaml:"ua_public_key" json:"ua_public_key" usage:"UA Public key."`
}

ConsoleConfig is configuration relevant to the embedded console.

func NewConsoleConfig

func NewConsoleConfig() *ConsoleConfig

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, streamManager StreamManager, metrics Metrics, sessionRegistry SessionRegistry, sessionCache SessionCache, consoleSessionCache SessionCache, loginAttemptCache LoginAttemptCache, statusRegistry StatusRegistry, statusHandler StatusHandler, runtimeInfo *RuntimeInfo, matchRegistry MatchRegistry, configWarnings map[string]string, serverVersion string, leaderboardCache LeaderboardCache, leaderboardRankCache LeaderboardRankCache, leaderboardScheduler LeaderboardScheduler, storageIndex StorageIndex, api *ApiServer, runtime *Runtime, cookie string) *ConsoleServer

func (*ConsoleServer) AddGroupUsers

func (*ConsoleServer) AddUser

func (*ConsoleServer) Authenticate

func (*ConsoleServer) AuthenticateLogout

func (s *ConsoleServer) AuthenticateLogout(ctx context.Context, in *console.AuthenticateLogoutRequest) (*emptypb.Empty, error)

func (*ConsoleServer) BanAccount

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

func (*ConsoleServer) CallApiEndpoint

func (*ConsoleServer) CallRpcEndpoint

func (*ConsoleServer) DeleteAccount

func (*ConsoleServer) DeleteAccounts deprecated

func (s *ConsoleServer) DeleteAccounts(ctx context.Context, in *emptypb.Empty) (*emptypb.Empty, error)

Deprecated: replaced by DeleteAllData

func (*ConsoleServer) DeleteAllData

func (s *ConsoleServer) DeleteAllData(ctx context.Context, in *emptypb.Empty) (*emptypb.Empty, error)

func (*ConsoleServer) DeleteFriend

func (*ConsoleServer) DeleteGroup

func (*ConsoleServer) DeleteGroupUser

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

func (*ConsoleServer) DeleteLeaderboard

func (s *ConsoleServer) DeleteLeaderboard(ctx context.Context, in *console.LeaderboardRequest) (*emptypb.Empty, error)

func (*ConsoleServer) DeleteLeaderboardRecord

func (s *ConsoleServer) DeleteLeaderboardRecord(ctx context.Context, in *console.DeleteLeaderboardRecordRequest) (*emptypb.Empty, error)

func (*ConsoleServer) DeleteStorage

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

func (*ConsoleServer) DeleteStorageObject

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

func (*ConsoleServer) DeleteUser

func (s *ConsoleServer) DeleteUser(ctx context.Context, in *console.Username) (*emptypb.Empty, error)

func (*ConsoleServer) DeleteWalletLedger

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

func (*ConsoleServer) DemoteGroupMember

func (*ConsoleServer) ExportAccount

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

func (*ConsoleServer) ExportGroup

func (s *ConsoleServer) ExportGroup(ctx context.Context, in *console.GroupId) (*console.GroupExport, 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 *emptypb.Empty) (*console.Config, error)

func (*ConsoleServer) GetFriends

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

func (*ConsoleServer) GetGroup

func (s *ConsoleServer) GetGroup(ctx context.Context, in *console.GroupId) (*api.Group, error)

func (*ConsoleServer) GetGroups

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

func (*ConsoleServer) GetLeaderboard

func (*ConsoleServer) GetMatchState

func (*ConsoleServer) GetMembers

func (s *ConsoleServer) GetMembers(ctx context.Context, in *console.GroupId) (*api.GroupUserList, error)

func (*ConsoleServer) GetPurchase

func (*ConsoleServer) GetRuntime

func (s *ConsoleServer) GetRuntime(ctx context.Context, in *emptypb.Empty) (*console.RuntimeInfo, error)

func (*ConsoleServer) GetStatus

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

func (*ConsoleServer) GetStorage

func (*ConsoleServer) GetSubscription

func (*ConsoleServer) GetWalletLedger

func (*ConsoleServer) ListAccounts

func (*ConsoleServer) ListApiEndpoints

func (s *ConsoleServer) ListApiEndpoints(ctx context.Context, _ *emptypb.Empty) (*console.ApiEndpointList, error)

func (*ConsoleServer) ListChannelMessages

func (*ConsoleServer) ListGroups

func (*ConsoleServer) ListLeaderboardRecords

func (*ConsoleServer) ListLeaderboards

func (*ConsoleServer) ListMatches

func (*ConsoleServer) ListPurchases

func (*ConsoleServer) ListStorage

func (*ConsoleServer) ListStorageCollections

func (s *ConsoleServer) ListStorageCollections(ctx context.Context, in *emptypb.Empty) (*console.StorageCollectionsList, error)

func (*ConsoleServer) ListSubscriptions

func (*ConsoleServer) ListUsers

func (s *ConsoleServer) ListUsers(ctx context.Context, in *emptypb.Empty) (*console.UserList, error)

func (*ConsoleServer) PromoteGroupMember

func (s *ConsoleServer) PromoteGroupMember(ctx context.Context, in *console.UpdateGroupUserStateRequest) (*emptypb.Empty, error)

func (*ConsoleServer) Stop

func (s *ConsoleServer) Stop()

func (*ConsoleServer) UnbanAccount

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

func (*ConsoleServer) UnlinkApple

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

func (*ConsoleServer) UnlinkCustom

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

func (*ConsoleServer) UnlinkDevice

func (*ConsoleServer) UnlinkEmail

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

func (*ConsoleServer) UnlinkFacebook

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

func (*ConsoleServer) UnlinkFacebookInstantGame

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

func (*ConsoleServer) UnlinkGameCenter

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

func (*ConsoleServer) UnlinkGoogle

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

func (*ConsoleServer) UnlinkSteam

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

func (*ConsoleServer) UpdateAccount

func (*ConsoleServer) UpdateGroup

func (*ConsoleServer) WriteStorageObject

type ConsoleTokenClaims

type ConsoleTokenClaims struct {
	ID        string           `json:"id,omitempty"`
	Username  string           `json:"usn,omitempty"`
	Email     string           `json:"ema,omitempty"`
	Role      console.UserRole `json:"rol,omitempty"`
	ExpiresAt int64            `json:"exp,omitempty"`
	Cookie    string           `json:"cki,omitempty"`
}

func (*ConsoleTokenClaims) Valid

func (stc *ConsoleTokenClaims) Valid() error

type CreateAssetNFTRequest

type CreateAssetNFTRequest struct {
	Name         string `json:"name"`
	Description  string `json:"description"`
	TokenId      string `json:"tokenId"`
	CollectionId string `json:"collectionId"`
	Quantity     string `json:"quantity,omitempty"`
	Media        struct {
		S3Url string `json:"S3Url"`
	} `json:"media"`
	Metadata struct {
		Metadata struct {
			Creator    string `json:"creator"`
			Attributes []struct {
				TraitType string `json:"trait_type"`
				Value     string `json:"value"`
			} `json:"attributes"`
		} `json:"metadata"`
	} `json:"metadata"`
}

Struct for the POST request body

type CreateAssetNFTResponse

type CreateAssetNFTResponse struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	AvatarUrl   string `json:"avatarUrl"`
	ProjectId   string `json:"projectId"`
	CreatedAt   string `json:"createdAt"`
	UpdatedAt   string `json:"updatedAt"`
}

Struct for the POST request response

func CreateAssetNFT

func CreateAssetNFT(ctx context.Context, token string, request CreateAssetNFTRequest, config Config) (*CreateAssetNFTResponse, error)

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 */
	DnsScanIntervalSec int      `` /* 171-byte string literal not displayed */
}

DatabaseConfig is configuration relevant to the Database storage.

func NewDatabaseConfig

func NewDatabaseConfig() *DatabaseConfig

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 Endpoint

type Endpoint interface {
	Name() string
	Weight(v ...int32) int32
	Balancer(v ...int32) int32
	Status(v ...int32) int32
	PingRTT(v ...time.Duration) time.Duration
	Metadata() map[string]string
	GetMetadata(k string) string
	SetMetadata(k, v string)
	ResetMetadata(md map[string]string)
	DeleteMetadata(deleteKey string)
	PingCompleted(rtt time.Duration)
	BindMemberlistNode(node *memberlist.Node)
	MemberlistNode() *memberlist.Node
	SessionCount() int32
	PresenceCount() int32
	MatchCount() int32
	GoroutineCount() int32
	AvgLatencyMs() float64
	AvgRateSec() float64
	AvgInputKbs() float64
	AvgOutputKbs() float64
	MergeStateAt() int64
	UpdateState(status *pb.Status)
	MarshalJSON() ([]byte, error)
	MarshalProtoBuffer() ([]byte, error)
}

func NewPeerEndpont

func NewPeerEndpont(name string, md map[string]string, status, weight, balancer int32, protojsonMarshaler *protojson.MarshalOptions, node ...*memberlist.Node) Endpoint

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 FifoQueue

type FifoQueue[T any] interface {
	Insert(T)
	Clone() []T
}

type GoogleAuthConfig

type GoogleAuthConfig struct {
	CredentialsJSON string         `yaml:"credentials_json" json:"credentials_json" usage:"Google's Access Credentials."`
	OAuthConfig     *oauth2.Config `yaml:"-" json:"-"`
}

func NewGoogleAuthConfig

func NewGoogleAuthConfig() *GoogleAuthConfig

type GoogleRefundScheduler

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

func NewGoogleRefundScheduler

func NewGoogleRefundScheduler(logger *zap.Logger, db *sql.DB, config Config) GoogleRefundScheduler

type IAPAppleConfig

type IAPAppleConfig struct {
	SharedPassword          string `` /* 158-byte string literal not displayed */
	NotificationsEndpointId string `` /* 150-byte string literal not displayed */
}

type IAPConfig

type IAPConfig struct {
	Apple           *IAPAppleConfig           `yaml:"apple" json:"apple" usage:"Apple App Store purchase validation configuration."`
	Google          *IAPGoogleConfig          `yaml:"google" json:"google" usage:"Google Play Store purchase validation configuration."`
	Huawei          *IAPHuaweiConfig          `yaml:"huawei" json:"huawei" usage:"Huawei purchase validation configuration."`
	FacebookInstant *IAPFacebookInstantConfig `yaml:"facebook_instant" json:"facebook_instant" usage:"Facebook Instant purchase validation configuration."`
}

func NewIAPConfig

func NewIAPConfig() *IAPConfig

type IAPFacebookInstantConfig

type IAPFacebookInstantConfig struct {
	AppSecret string `yaml:"app_secret" json:"app_secret" usage:"Facebook Instant OAuth app client secret."`
}

type IAPGoogleConfig

type IAPGoogleConfig struct {
	ClientEmail             string `yaml:"client_email" json:"client_email" usage:"Google Service Account client email."`
	PrivateKey              string `yaml:"private_key" json:"private_key" usage:"Google Service Account private key."`
	NotificationsEndpointId string `` /* 146-byte string literal not displayed */
	RefundCheckPeriodMin    int    `` /* 139-byte string literal not displayed */
	PackageName             string `yaml:"package_name" json:"package_name" usage:"Google Play Store App Package Name."`
}

func (*IAPGoogleConfig) Enabled

func (iapg *IAPGoogleConfig) Enabled() bool

type IAPHuaweiConfig

type IAPHuaweiConfig struct {
	PublicKey    string `yaml:"public_key" json:"public_key" usage:"Huawei IAP store Base64 encoded Public Key."`
	ClientID     string `yaml:"client_id" json:"client_id" usage:"Huawei OAuth client secret."`
	ClientSecret string `yaml:"client_secret" json:"client_secret" usage:"Huawei OAuth app client secret."`
}

type JWTClaims

type JWTClaims struct {
	UserId    string `json:"user_id"`
	Wallet    string `json:"wallet"`
	Exp       int64  `json:"exp"`
	Iat       int64  `json:"iat"`
	TokenID   string `json:"token_id"`
	Signature struct {
		R   string `json:"r"`
		S   string `json:"s"`
		Msg string `json:"msg"`
	} `json:"signature"`
}

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 LayerGCoreConfig

type LayerGCoreConfig struct {
	ApiKey              string `yaml:"api_key" json:"api_key" usage:"api key to communicate with core server"`
	ApiKeyID            string `yaml:"api_key_id" json:"api_key_id" usage:"api key id to communicate with core server"`
	URL                 string `yaml:"url" json:"url" usage:"url of core server"`
	UniversalAccountURL string `yaml:"ua_url" json:"ua_url" usage:"ua_url of core server"`
}

func NewLayerGCore

func NewLayerGCore() *LayerGCoreConfig

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
	EnableRanks      bool
}

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) HasMaxSize

func (l *Leaderboard) HasMaxSize() bool

func (*Leaderboard) IsTournament

func (l *Leaderboard) IsTournament() bool

type LeaderboardAllCursor

type LeaderboardAllCursor struct {
	Offset int
}

type LeaderboardCache

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

func NewLocalLeaderboardCache

func NewLocalLeaderboardCache(ctx context.Context, 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 */
	RankCacheWorkers     int      `` /* 269-byte string literal not displayed */
}

LeaderboardConfig is configuration relevant to the leaderboard system.

func NewLeaderboardConfig

func NewLeaderboardConfig() *LeaderboardConfig

type LeaderboardListCursor

type LeaderboardListCursor struct {
	Offset int
}

type LeaderboardRankCache

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

func NewLocalLeaderboardRankCache

func NewLocalLeaderboardRankCache(ctx context.Context, 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

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

type LeaderboardWithExpiry

type LeaderboardWithExpiry struct {
	LeaderboardId string
	Expiry        int64
}

type LocalActiveTokenCache

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

func (*LocalActiveTokenCache) Add

func (s *LocalActiveTokenCache) Add(userID uuid.UUID, localSessionExp int64, localSessionTokenId string, localRefreshExp int64, localRefreshTokenId string, globalSessionExp int64, globalSessionTokenId string, globalRefreshExp int64, globalRefreshTokenId string)

func (*LocalActiveTokenCache) GetActiveTokens

func (s *LocalActiveTokenCache) GetActiveTokens(userID uuid.UUID) (localSessionToken, localRefreshToken, globalSessionToken, globalRefreshToken string, localSessionExp, localRefreshExp, globalSessionExp, globalRefreshExp int64)

func (*LocalActiveTokenCache) IsValidGlobalToken

func (s *LocalActiveTokenCache) IsValidGlobalToken(userID uuid.UUID, exp int64, tokenId string, refreshExp int64, refreshTokenId string) bool

func (*LocalActiveTokenCache) IsValidLocalToken

func (s *LocalActiveTokenCache) IsValidLocalToken(userID uuid.UUID, exp int64, tokenId string, refreshExp int64, refreshTokenId string) bool

func (*LocalActiveTokenCache) Remove

func (s *LocalActiveTokenCache) Remove(userID uuid.UUID, localSessionTokenId string, globalSessionTokenId string)

func (*LocalActiveTokenCache) RemoveAll

func (s *LocalActiveTokenCache) RemoveAll(userID uuid.UUID)

func (*LocalActiveTokenCache) Stop

func (s *LocalActiveTokenCache) Stop()

type LocalBinaryLog

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

func (*LocalBinaryLog) ClearBinaryLogByNode

func (b *LocalBinaryLog) ClearBinaryLogByNode(node string)

func (*LocalBinaryLog) CurrentID

func (b *LocalBinaryLog) CurrentID() uint64

func (*LocalBinaryLog) GetBinaryLogVersionByNode

func (b *LocalBinaryLog) GetBinaryLogVersionByNode(node string) (min, max uint64)

func (*LocalBinaryLog) GetBinaryLogVersions

func (b *LocalBinaryLog) GetBinaryLogVersions() map[string][2]uint64

func (*LocalBinaryLog) GetBroadcasts

func (b *LocalBinaryLog) GetBroadcasts(limit int) []*pb.BinaryLog

func (*LocalBinaryLog) GetCheckPoint

func (b *LocalBinaryLog) GetCheckPoint() *pb.CheckPoint

func (*LocalBinaryLog) GetPendingBinaryLog

func (b *LocalBinaryLog) GetPendingBinaryLog() []*pb.BinaryLog

func (*LocalBinaryLog) Len

func (b *LocalBinaryLog) Len() int

func (*LocalBinaryLog) MergeCheckPoint

func (b *LocalBinaryLog) MergeCheckPoint(checkPoint *pb.CheckPoint, join bool)

func (*LocalBinaryLog) NextID

func (b *LocalBinaryLog) NextID() uint64

func (*LocalBinaryLog) Push

func (b *LocalBinaryLog) Push(log *pb.BinaryLog) bool

func (*LocalBinaryLog) SetLocalCheckPoint

func (b *LocalBinaryLog) SetLocalCheckPoint(name string, version uint64)

func (*LocalBinaryLog) Stop

func (b *LocalBinaryLog) Stop()

type LocalFmCallbackHandler

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

func (*LocalFmCallbackHandler) GenerateCallbackId

func (fch *LocalFmCallbackHandler) GenerateCallbackId() string

func (*LocalFmCallbackHandler) InvokeCallback

func (fch *LocalFmCallbackHandler) InvokeCallback(callbackId string, status runtime.FmCreateStatus, instanceInfo *runtime.InstanceInfo, sessionInfo []*runtime.SessionInfo, metadata map[string]any, err error)

func (*LocalFmCallbackHandler) SetCallback

func (fch *LocalFmCallbackHandler) SetCallback(callbackId string, fn runtime.FmCreateCallbackFn)

type LocalGoogleRefundScheduler

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

func (*LocalGoogleRefundScheduler) Pause

func (g *LocalGoogleRefundScheduler) Pause()

func (*LocalGoogleRefundScheduler) Resume

func (g *LocalGoogleRefundScheduler) Resume()

func (*LocalGoogleRefundScheduler) Start

func (g *LocalGoogleRefundScheduler) Start(runtime *Runtime)

func (*LocalGoogleRefundScheduler) Stop

func (g *LocalGoogleRefundScheduler) Stop()

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, enableRanks bool) (*Leaderboard, bool, error)

func (*LocalLeaderboardCache) CreateTournament

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

func (*LocalLeaderboardCache) Delete

func (l *LocalLeaderboardCache) Delete(ctx context.Context, rankCache LeaderboardRankCache, scheduler LeaderboardScheduler, id string) (bool, error)

func (*LocalLeaderboardCache) Get

func (*LocalLeaderboardCache) Insert

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

func (*LocalLeaderboardCache) InsertTournament

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

func (*LocalLeaderboardCache) List

func (*LocalLeaderboardCache) ListAll

func (l *LocalLeaderboardCache) ListAll(limit int, reverse bool, cursor *LeaderboardAllCursor) ([]*Leaderboard, int, *LeaderboardAllCursor)

func (*LocalLeaderboardCache) ListTournaments

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, enableRanks bool) int64

func (*LocalLeaderboardRankCache) Get

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

func (*LocalLeaderboardRankCache) GetDataByRank

func (l *LocalLeaderboardRankCache) GetDataByRank(leaderboardId string, expiryUnix int64, sortOrder int, rank int64) (ownerID uuid.UUID, score, subscore int64, err error)

func (*LocalLeaderboardRankCache) Insert

func (l *LocalLeaderboardRankCache) Insert(leaderboardId string, sortOrder int, score, subscore int64, generation int32, expiryUnix int64, ownerID uuid.UUID, enableRanks bool) 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 LocalLoginAttemptCache

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

func (*LocalLoginAttemptCache) Add

func (c *LocalLoginAttemptCache) Add(account, ip string) (LockoutType, time.Time)

func (*LocalLoginAttemptCache) Allow

func (c *LocalLoginAttemptCache) Allow(account, ip string) bool

func (*LocalLoginAttemptCache) Reset

func (c *LocalLoginAttemptCache) Reset(account string)

func (*LocalLoginAttemptCache) Stop

func (c *LocalLoginAttemptCache) Stop()

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, createFn RuntimeMatchCreateFunction, module string, params map[string]interface{}) (string, error)

func (*LocalMatchRegistry) GetMatch

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

func (*LocalMatchRegistry) GetState

func (r *LocalMatchRegistry) GetState(ctx context.Context, id uuid.UUID, node string) ([]*rtapi.UserPresence, int64, string, 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 *wrapperspb.BoolValue, label *wrapperspb.StringValue, minSize *wrapperspb.Int32Value, maxSize *wrapperspb.Int32Value, queryString *wrapperspb.StringValue, node *wrapperspb.StringValue) ([]*api.Match, []string, 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) SetPeer

func (r *LocalMatchRegistry) SetPeer(peer Peer)

func (*LocalMatchRegistry) Signal

func (r *LocalMatchRegistry) Signal(ctx context.Context, id, data string) (string, error)

func (*LocalMatchRegistry) Stop

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

func (*LocalMatchRegistry) UpdateMatchLabel

func (r *LocalMatchRegistry) UpdateMatchLabel(id uuid.UUID, tickRate int, handlerName, label string, createTime int64) error

type LocalMatchmaker

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

func (*LocalMatchmaker) Add

func (m *LocalMatchmaker) Add(ctx context.Context, presences []*MatchmakerPresence, sessionID, partyId, query string, minCount, maxCount, countMultiple int, stringProperties map[string]string, numericProperties map[string]float64) (string, int64, error)

func (*LocalMatchmaker) Extract

func (m *LocalMatchmaker) Extract() []*MatchmakerExtract

func (*LocalMatchmaker) GetStats

func (m *LocalMatchmaker) GetStats() *api.MatchmakerStats

func (*LocalMatchmaker) Insert

func (m *LocalMatchmaker) Insert(extracts []*MatchmakerExtract) error

func (*LocalMatchmaker) OnMatchedEntries

func (m *LocalMatchmaker) OnMatchedEntries(fn func(entries [][]*MatchmakerEntry))

func (*LocalMatchmaker) OnStatsUpdate

func (m *LocalMatchmaker) OnStatsUpdate(fn func(*api.MatchmakerStats))

func (*LocalMatchmaker) Pause

func (m *LocalMatchmaker) Pause()

func (*LocalMatchmaker) Process

func (m *LocalMatchmaker) Process()

func (*LocalMatchmaker) Remove

func (m *LocalMatchmaker) Remove(tickets []string)

func (*LocalMatchmaker) RemoveAll

func (m *LocalMatchmaker) RemoveAll(node string)

func (*LocalMatchmaker) RemoveParty

func (m *LocalMatchmaker) RemoveParty(partyID, ticket string) error

func (*LocalMatchmaker) RemovePartyAll

func (m *LocalMatchmaker) RemovePartyAll(partyID string) error

func (*LocalMatchmaker) RemoveSession

func (m *LocalMatchmaker) RemoveSession(sessionID, ticket string) error

func (*LocalMatchmaker) RemoveSessionAll

func (m *LocalMatchmaker) RemoveSessionAll(sessionID string) error

func (*LocalMatchmaker) Resume

func (m *LocalMatchmaker) Resume()

func (*LocalMatchmaker) SetStats

func (m *LocalMatchmaker) SetStats(stats *api.MatchmakerStats)

func (*LocalMatchmaker) Stop

func (m *LocalMatchmaker) Stop()

type LocalMessageRouter

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

func (*LocalMessageRouter) SendDeferred

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

func (*LocalMessageRouter) SendToAll

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

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)

func (*LocalMessageRouter) SetPeer

func (r *LocalMessageRouter) SetPeer(peer Peer)

type LocalMetrics

type LocalMetrics struct {
	PrometheusScope tally.Scope
	// contains filtered or unexported fields
}

func NewLocalMetrics

func NewLocalMetrics(logger, startupLogger *zap.Logger, db *sql.DB, config Config) *LocalMetrics

func (*LocalMetrics) Api

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

func (*LocalMetrics) ApiAfter

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

func (*LocalMetrics) ApiBefore

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

func (*LocalMetrics) ApiRpc

func (m *LocalMetrics) ApiRpc(id string, elapsed time.Duration, recvBytes, sentBytes int64, isErr bool)

func (*LocalMetrics) CountDroppedEvents

func (m *LocalMetrics) CountDroppedEvents(delta int64)

Increment the number of dropped events.

func (*LocalMetrics) CountUntaggedGrpcStatsCalls

func (m *LocalMetrics) CountUntaggedGrpcStatsCalls(delta int64)

Increment the number of untagged gRpc stats calls.

func (*LocalMetrics) CountWebsocketClosed

func (m *LocalMetrics) CountWebsocketClosed(delta int64)

Increment the number of closed WS connections.

func (*LocalMetrics) CountWebsocketOpened

func (m *LocalMetrics) CountWebsocketOpened(delta int64)

Increment the number of opened WS connections.

func (*LocalMetrics) CustomCounter

func (m *LocalMetrics) CustomCounter(name string, tags map[string]string, delta int64)

CustomCounter adds the given delta to a counter with the specified name and tags.

func (*LocalMetrics) CustomGauge

func (m *LocalMetrics) CustomGauge(name string, tags map[string]string, value float64)

CustomGauge sets the given value to a gauge with the specified name and tags.

func (*LocalMetrics) CustomTimer

func (m *LocalMetrics) CustomTimer(name string, tags map[string]string, value time.Duration)

CustomTimer records the given value to a timer with the specified name and tags.

func (*LocalMetrics) GaugeAuthoritativeMatches

func (m *LocalMetrics) GaugeAuthoritativeMatches(value float64)

Set the absolute value of currently running authoritative matches.

func (*LocalMetrics) GaugeJsRuntimes

func (m *LocalMetrics) GaugeJsRuntimes(value float64)

Set the absolute value of currently allocated JavaScript runtime VMs.

func (*LocalMetrics) GaugeLuaRuntimes

func (m *LocalMetrics) GaugeLuaRuntimes(value float64)

Set the absolute value of currently allocated Lua runtime VMs.

func (*LocalMetrics) GaugePresences

func (m *LocalMetrics) GaugePresences(value float64)

Set the absolute value of currently tracked presences.

func (*LocalMetrics) GaugeRuntimes

func (m *LocalMetrics) GaugeRuntimes(value float64)

Set the absolute value of currently allocated Lua runtime VMs.

func (*LocalMetrics) GaugeSessions

func (m *LocalMetrics) GaugeSessions(value float64)

Set the absolute value of currently active sessions.

func (*LocalMetrics) GaugeStorageIndexEntries

func (m *LocalMetrics) GaugeStorageIndexEntries(indexName string, value float64)

func (*LocalMetrics) Matchmaker

func (m *LocalMetrics) Matchmaker(tickets, activeTickets float64, processTime time.Duration)

Record a set of matchmaker metrics.

func (*LocalMetrics) Message

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

func (*LocalMetrics) MessageBytesSent

func (m *LocalMetrics) MessageBytesSent(sentBytes int64)

func (*LocalMetrics) PresenceEvent

func (m *LocalMetrics) PresenceEvent(dequeueElapsed, processElapsed time.Duration)

Count presence events and time their processing.

func (*LocalMetrics) SnapshotLatencyMs

func (m *LocalMetrics) SnapshotLatencyMs() float64

func (*LocalMetrics) SnapshotRateSec

func (m *LocalMetrics) SnapshotRateSec() float64

func (*LocalMetrics) SnapshotRecvKbSec

func (m *LocalMetrics) SnapshotRecvKbSec() float64

func (*LocalMetrics) SnapshotSentKbSec

func (m *LocalMetrics) SnapshotSentKbSec() float64

func (*LocalMetrics) Stop

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

func (*LocalMetrics) StorageWriteRejectCount

func (m *LocalMetrics) StorageWriteRejectCount(tags map[string]string, delta int64)

type LocalPartyRegistry

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

func (*LocalPartyRegistry) Create

func (p *LocalPartyRegistry) Create(open bool, maxSize int, presence *rtapi.UserPresence) *PartyHandler

func (*LocalPartyRegistry) Delete

func (p *LocalPartyRegistry) Delete(id uuid.UUID)

func (*LocalPartyRegistry) Join

func (p *LocalPartyRegistry) Join(id uuid.UUID, presences []*Presence)

func (*LocalPartyRegistry) Leave

func (p *LocalPartyRegistry) Leave(id uuid.UUID, presences []*Presence)

func (*LocalPartyRegistry) PartyAccept

func (p *LocalPartyRegistry) PartyAccept(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string, presence *rtapi.UserPresence) error

func (*LocalPartyRegistry) PartyClose

func (p *LocalPartyRegistry) PartyClose(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string) error

func (*LocalPartyRegistry) PartyDataSend

func (p *LocalPartyRegistry) PartyDataSend(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string, opCode int64, data []byte) error

func (*LocalPartyRegistry) PartyJoinRequest

func (p *LocalPartyRegistry) PartyJoinRequest(ctx context.Context, id uuid.UUID, node string, presence *Presence) (bool, error)

func (*LocalPartyRegistry) PartyJoinRequestList

func (p *LocalPartyRegistry) PartyJoinRequestList(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string) ([]*rtapi.UserPresence, error)

func (*LocalPartyRegistry) PartyMatchmakerAdd

func (p *LocalPartyRegistry) PartyMatchmakerAdd(ctx context.Context, id uuid.UUID, node, sessionID, fromNode, query string, minCount, maxCount, countMultiple int, stringProperties map[string]string, numericProperties map[string]float64) (string, []*PresenceID, error)

func (*LocalPartyRegistry) PartyMatchmakerRemove

func (p *LocalPartyRegistry) PartyMatchmakerRemove(ctx context.Context, id uuid.UUID, node, sessionID, fromNode, ticket string) error

func (*LocalPartyRegistry) PartyPromote

func (p *LocalPartyRegistry) PartyPromote(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string, presence *rtapi.UserPresence) error

func (*LocalPartyRegistry) PartyRemove

func (p *LocalPartyRegistry) PartyRemove(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string, presence *rtapi.UserPresence) error

func (*LocalPartyRegistry) SetPeer

func (p *LocalPartyRegistry) SetPeer(peer Peer)

type LocalPeer

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

func (*LocalPeer) AckPayload

func (s *LocalPeer) AckPayload() []byte

AckPayload is invoked when an ack is being sent; the returned bytes will be appended to the ack

func (*LocalPeer) Broadcast

func (s *LocalPeer) Broadcast(msg *pb.Request, reliable bool)

func (*LocalPeer) BroadcastBinaryLog

func (s *LocalPeer) BroadcastBinaryLog(b *pb.BinaryLog, toQueue bool)

func (*LocalPeer) GetBroadcasts

func (s *LocalPeer) GetBroadcasts(overhead, limit int) [][]byte

GetBroadcasts is called when user data messages can be broadcast. It can return a list of buffers to send. Each buffer should assume an overhead as provided with a limit on the total byte size allowed. The total byte size of the resulting data to send must not exceed the limit. Care should be taken that this method does not block, since doing so would block the entire UDP packet receive loop.

func (*LocalPeer) GetServiceRegistry

func (s *LocalPeer) GetServiceRegistry() kit.ServiceRegistry

func (*LocalPeer) Join

func (s *LocalPeer) Join(members ...string) (int, error)

func (*LocalPeer) Local

func (s *LocalPeer) Local() Endpoint

func (*LocalPeer) LocalState

func (s *LocalPeer) LocalState(join bool) []byte

LocalState is used for a TCP Push/Pull. This is sent to the remote side in addition to the membership information. ALogger data can be sent here. See MergeRemoteState as well. The `join` boolean indicates this is for a join instead of a push/pull.

func (*LocalPeer) MatchmakerAdd

func (s *LocalPeer) MatchmakerAdd(extract *pb.MatchmakerExtract)

func (*LocalPeer) MatchmakerRemove

func (s *LocalPeer) MatchmakerRemove(tickets []string)

func (*LocalPeer) MatchmakerRemoveAll

func (s *LocalPeer) MatchmakerRemoveAll(node string)

func (*LocalPeer) MatchmakerRemoveParty

func (s *LocalPeer) MatchmakerRemoveParty(partyID, ticket string)

func (*LocalPeer) MatchmakerRemovePartyAll

func (s *LocalPeer) MatchmakerRemovePartyAll(partyID string)

func (*LocalPeer) MatchmakerRemoveSession

func (s *LocalPeer) MatchmakerRemoveSession(sessionID, ticket string)

func (*LocalPeer) MatchmakerRemoveSessionAll

func (s *LocalPeer) MatchmakerRemoveSessionAll(sessionID string)

func (*LocalPeer) Member

func (s *LocalPeer) Member(name string) (Endpoint, bool)

func (*LocalPeer) Members

func (s *LocalPeer) Members() []Endpoint

func (*LocalPeer) MergeRemoteState

func (s *LocalPeer) MergeRemoteState(buf []byte, join bool)

MergeRemoteState is invoked after a TCP Push/Pull. This is the state received from the remote side and is the result of the remote side's LocalState call. The 'join' boolean indicates this is for a join instead of a push/pull.

func (*LocalPeer) NodeMeta

func (s *LocalPeer) NodeMeta(limit int) []byte

when broadcasting an alive message. It's length is limited to the given byte size. This metadata is available in the Node structure.

func (*LocalPeer) NotifyAlive

func (s *LocalPeer) NotifyAlive(node *memberlist.Node) error

NotifyAlive implements the memberlist.AliveDelegate interface.

func (*LocalPeer) NotifyConflict

func (s *LocalPeer) NotifyConflict(existing, other *memberlist.Node)

NotifyConflict is invoked when a name conflict is detected

func (*LocalPeer) NotifyJoin

func (s *LocalPeer) NotifyJoin(node *memberlist.Node)

NotifyJoin is invoked when a node is detected to have joined. The Node argument must not be modified.

func (*LocalPeer) NotifyLeave

func (s *LocalPeer) NotifyLeave(node *memberlist.Node)

NotifyLeave is invoked when a node is detected to have left. The Node argument must not be modified.

func (*LocalPeer) NotifyMerge

func (s *LocalPeer) NotifyMerge(peers []*memberlist.Node) error

NotifyMerge is invoked when a merge could take place. Provides a list of the nodes known by the peer. If the return value is non-nil, the merge is canceled.

func (*LocalPeer) NotifyMsg

func (s *LocalPeer) NotifyMsg(msg []byte)

NotifyMsg is called when a user-data message is received. Care should be taken that this method does not block, since doing so would block the entire UDP packet receive loop. Additionally, the byte slice may be modified after the call returns, so it should be copied if needed

func (*LocalPeer) NotifyPingComplete

func (s *LocalPeer) NotifyPingComplete(other *memberlist.Node, rtt time.Duration, payload []byte)

NotifyPing is invoked when an ack for a ping is received

func (*LocalPeer) NotifyUpdate

func (s *LocalPeer) NotifyUpdate(node *memberlist.Node)

NotifyUpdate is invoked when a node is detected to have updated, usually involving the meta data. The Node argument must not be modified.

func (*LocalPeer) NumMembers

func (s *LocalPeer) NumMembers() int

func (*LocalPeer) Request

func (s *LocalPeer) Request(ctx context.Context, endpoint Endpoint, msg *pb.Request) (*pb.ResponseWriter, error)

func (*LocalPeer) Send

func (s *LocalPeer) Send(endpoint Endpoint, msg *pb.Request, reliable bool) error

func (*LocalPeer) Shutdown

func (s *LocalPeer) Shutdown()

func (*LocalPeer) Version

func (s *LocalPeer) Version() (map[string][2]uint64, int)

type LocalSessionCache

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

func (*LocalSessionCache) Add

func (s *LocalSessionCache) Add(userID uuid.UUID, sessionExp int64, tokenId string, refreshExp int64, refreshTokenId string)

func (*LocalSessionCache) Ban

func (s *LocalSessionCache) Ban(userIDs []uuid.UUID)

func (*LocalSessionCache) IsValidRefresh

func (s *LocalSessionCache) IsValidRefresh(userID uuid.UUID, exp int64, tokenId string) bool

func (*LocalSessionCache) IsValidSession

func (s *LocalSessionCache) IsValidSession(userID uuid.UUID, exp int64, tokenId string) bool

func (*LocalSessionCache) Remove

func (s *LocalSessionCache) Remove(userID uuid.UUID, sessionExp int64, sessionTokenId string, refreshExp int64, refreshTokenId string)

func (*LocalSessionCache) RemoveAll

func (s *LocalSessionCache) RemoveAll(userID uuid.UUID)

func (*LocalSessionCache) Stop

func (s *LocalSessionCache) Stop()

func (*LocalSessionCache) Unban

func (s *LocalSessionCache) Unban(userIDs []uuid.UUID)

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, ban bool, reason ...runtime.PresenceReason) error

func (*LocalSessionRegistry) Get

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

func (*LocalSessionRegistry) Range

func (r *LocalSessionRegistry) Range(fn func(Session) bool)

func (*LocalSessionRegistry) Remove

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

func (*LocalSessionRegistry) SetPeer

func (r *LocalSessionRegistry) SetPeer(peer Peer)

func (*LocalSessionRegistry) SingleSession

func (r *LocalSessionRegistry) SingleSession(ctx context.Context, tracker Tracker, userID, sessionID uuid.UUID)

func (*LocalSessionRegistry) Stop

func (r *LocalSessionRegistry) Stop()

type LocalStatusHandler

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

func (*LocalStatusHandler) GetServices

func (*LocalStatusHandler) GetStatus

func (*LocalStatusHandler) SetPeer

func (s *LocalStatusHandler) SetPeer(peer Peer)

type LocalStatusRegistry

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

func (*LocalStatusRegistry) FillOnlineAccounts

func (s *LocalStatusRegistry) FillOnlineAccounts(accounts []*api.Account)

func (*LocalStatusRegistry) FillOnlineFriends

func (s *LocalStatusRegistry) FillOnlineFriends(friends []*api.Friend)

func (*LocalStatusRegistry) FillOnlineGroupUsers

func (s *LocalStatusRegistry) FillOnlineGroupUsers(groupUsers []*api.GroupUserList_GroupUser)

func (*LocalStatusRegistry) FillOnlineUsers

func (s *LocalStatusRegistry) FillOnlineUsers(users []*api.User)

func (*LocalStatusRegistry) Follow

func (s *LocalStatusRegistry) Follow(sessionID uuid.UUID, userIDs map[uuid.UUID]struct{})

func (*LocalStatusRegistry) IsOnline

func (s *LocalStatusRegistry) IsOnline(userID uuid.UUID) bool

func (*LocalStatusRegistry) Queue

func (s *LocalStatusRegistry) Queue(userID uuid.UUID, joins, leaves []*rtapi.UserPresence)

func (*LocalStatusRegistry) Stop

func (s *LocalStatusRegistry) Stop()

func (*LocalStatusRegistry) Unfollow

func (s *LocalStatusRegistry) Unfollow(sessionID uuid.UUID, userIDs []uuid.UUID)

func (*LocalStatusRegistry) UnfollowAll

func (s *LocalStatusRegistry) UnfollowAll(sessionID uuid.UUID)

type LocalStorageIndex

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

func (*LocalStorageIndex) CreateIndex

func (si *LocalStorageIndex) CreateIndex(ctx context.Context, name, collection, key string, fields []string, sortableFields []string, maxEntries int, indexOnly bool) error

func (*LocalStorageIndex) Delete

func (si *LocalStorageIndex) Delete(ctx context.Context, objects StorageOpDeletes) (deletes int)

func (*LocalStorageIndex) List

func (si *LocalStorageIndex) List(ctx context.Context, callerID uuid.UUID, indexName, query string, limit int, order []string) (*api.StorageObjects, error)

func (*LocalStorageIndex) Load

func (si *LocalStorageIndex) Load(ctx context.Context) error

func (*LocalStorageIndex) RegisterFilters

func (si *LocalStorageIndex) RegisterFilters(runtime *Runtime)

func (*LocalStorageIndex) Write

func (si *LocalStorageIndex) Write(ctx context.Context, objects []*api.StorageObject) (updates int, deletes int)

type LocalStreamManager

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

func (*LocalStreamManager) UserJoin

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

func (*LocalStreamManager) UserLeave

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

func (*LocalStreamManager) UserUpdate

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) ClearRemoteTrack

func (t *LocalTracker) ClearRemoteTrack()

func (*LocalTracker) ClearTrackByNode

func (t *LocalTracker) ClearTrackByNode(node string)

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) 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) ListLocalPresenceIDByStream

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

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) ListPresenceIDByStreams

func (t *LocalTracker) ListPresenceIDByStreams(fill map[PresenceStream][]*PresenceID)

func (*LocalTracker) MergeRemoteState

func (t *LocalTracker) MergeRemoteState(fromNode string, presences []*pb.Presence, join bool)

func (*LocalTracker) Range

func (t *LocalTracker) Range(fn func(sessionID uuid.UUID, presences []*Presence) bool)

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) SetPartyJoinListener

func (t *LocalTracker) SetPartyJoinListener(f func(id uuid.UUID, joins []*Presence))

func (*LocalTracker) SetPartyLeaveListener

func (t *LocalTracker) SetPartyLeaveListener(f func(id uuid.UUID, leaves []*Presence))

func (*LocalTracker) SetPeer

func (t *LocalTracker) SetPeer(peer Peer)

func (*LocalTracker) Stop

func (t *LocalTracker) Stop()

func (*LocalTracker) StreamExists

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

func (*LocalTracker) Track

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

func (*LocalTracker) TrackMulti

func (t *LocalTracker) TrackMulti(ctx context.Context, sessionID uuid.UUID, ops []*TrackerOp, userID uuid.UUID, otherNode ...string) bool

func (*LocalTracker) TrackPeer

func (t *LocalTracker) TrackPeer(sessionID uuid.UUID, userID uuid.UUID, ops []*TrackerOp)

func (*LocalTracker) Untrack

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

func (*LocalTracker) UntrackAll

func (t *LocalTracker) UntrackAll(sessionID uuid.UUID, reason runtime.PresenceReason, otherNode ...string)

func (*LocalTracker) UntrackByModes

func (t *LocalTracker) UntrackByModes(sessionID uuid.UUID, modes map[uint8]struct{}, skipStream PresenceStream)

func (*LocalTracker) UntrackByStream

func (t *LocalTracker) UntrackByStream(stream PresenceStream)

func (*LocalTracker) UntrackLocalByModes

func (t *LocalTracker) UntrackLocalByModes(sessionID uuid.UUID, modes map[uint8]struct{}, skipStream PresenceStream)

func (*LocalTracker) UntrackLocalByStream

func (t *LocalTracker) UntrackLocalByStream(stream PresenceStream)

func (*LocalTracker) UntrackMulti

func (t *LocalTracker) UntrackMulti(sessionID uuid.UUID, streams []*PresenceStream, userID uuid.UUID)

func (*LocalTracker) UntrackPeer

func (t *LocalTracker) UntrackPeer(sessionID uuid.UUID, userID uuid.UUID, streams []*PresenceStream, modes []uint32, reason runtime.PresenceReason, skipStream *PresenceStream)

func (*LocalTracker) Update

func (t *LocalTracker) Update(ctx context.Context, sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID, meta PresenceMeta, otherNode ...string) bool

func (*LocalTracker) UpdateTrackPeer

func (t *LocalTracker) UpdateTrackPeer(sessionID uuid.UUID, userID uuid.UUID, ops []*TrackerOp)

type LockoutType

type LockoutType uint8
const (
	LockoutTypeNone LockoutType = iota
	LockoutTypeAccount
	LockoutTypeIp
)

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

type LoggingFormat

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

type LoginAttemptCache

type LoginAttemptCache interface {
	Stop()
	// Allow checks whether account or IP is locked out or should be allowed to attempt to authenticate.
	Allow(account, ip string) bool
	// Add a failed attempt and return current lockout status.
	Add(account, ip string) (LockoutType, time.Time)
	// Reset account attempts on successful login.
	Reset(account string)
}

func NewLocalLoginAttemptCache

func NewLocalLoginAttemptCache() LoginAttemptCache

type LoginRequest

type LoginRequest struct {
	ApiKey   string `json:"apiKey"`
	ApiKeyID string `json:"apiKeyID"`
}

type LoginResponse

type LoginResponse struct {
	AccessToken  string `json:"accessToken"`
	RefreshToken string `json:"refreshToken"`
}

type MFAConfig

type MFAConfig struct {
	StorageEncryptionKey string `` /* 156-byte string literal not displayed */
	AdminAccountOn       bool   `yaml:"admin_account_enabled" json:"admin_account_enabled" usage:"Require MFA for the Console Admin account."`
}

func NewMFAConfig

func NewMFAConfig() *MFAConfig

type MapOf

type MapOf[K comparable, V any] struct {
	// contains filtered or unexported fields
}

MapOf is like a Go map[interface{}]interface{} but is safe for concurrent use by multiple goroutines without additional locking or coordination. Loads, stores, and deletes run in amortized constant time.

The MapOf type is specialized. Most code should use a plain Go map instead, with separate locking or coordination, for better type safety and to make it easier to maintain other invariants along with the map content.

The MapOf type is optimized for two common use cases: (1) when the entry for a given key is only ever written once but read many times, as in caches that only grow, or (2) when multiple goroutines read, write, and overwrite entries for disjoint sets of keys. In these two cases, use of a MapOf may significantly reduce lock contention compared to a Go map paired with a separate Mutex or RWMutex.

The zero MapOf is empty and ready for use. A MapOf must not be copied after first use.

func (*MapOf[K, V]) Delete

func (m *MapOf[K, V]) Delete(key K)

Delete deletes the value for a key.

func (*MapOf[K, V]) Load

func (m *MapOf[K, V]) Load(key K) (value V, ok bool)

Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.

func (*MapOf[K, V]) LoadAndDelete

func (m *MapOf[K, V]) LoadAndDelete(key K) (value V, loaded bool)

LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present.

func (*MapOf[K, V]) LoadOrStore

func (m *MapOf[K, V]) LoadOrStore(key K, value V) (actual V, loaded bool)

LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored.

func (*MapOf[K, V]) Range

func (m *MapOf[K, V]) Range(f func(key K, value V) bool)

Range calls f sequentially for each key and value present in the map. If f returns false, range stops the iteration.

Range does not necessarily correspond to any consistent snapshot of the MapOf's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.

Range may be O(N) with the number of elements in the map even if f returns false after a constant number of calls.

func (*MapOf[K, V]) Store

func (m *MapOf[K, V]) Store(key K, value V)

Store sets the value for a key.

type MatchConfig

type MatchConfig struct {
	InputQueueSize        int `` /* 181-byte string literal not displayed */
	CallQueueSize         int `` /* 176-byte string literal not displayed */
	SignalQueueSize       int `` /* 191-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 */
	LabelUpdateIntervalMs int `` /* 150-byte string literal not displayed */
}

MatchConfig is configuration relevant to authoritative realtime multiplayer matches.

func NewMatchConfig

func NewMatchConfig() *MatchConfig

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) GetReason

func (m *MatchDataMessage) GetReason() runtime.PresenceReason

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 MatchFnId

type MatchFnId string
const (
	MatchInit        MatchFnId = "matchInit"
	MatchJoinAttempt MatchFnId = "matchJoinAttempt"
	MatchJoin        MatchFnId = "matchJoin"
	MatchLeave       MatchFnId = "matchLeave"
	MatchLoop        MatchFnId = "matchLoop"
	MatchTerminate   MatchFnId = "matchTerminate"
	MatchSignal      MatchFnId = "matchSignal"
)

type MatchGetStateResult

type MatchGetStateResult struct {
	Error     error
	Presences []*MatchPresence
	Tick      int64
	State     string
}

type MatchHandler

type MatchHandler struct {
	JoinMarkerList *MatchJoinMarkerList
	PresenceList   *MatchPresenceList
	Core           RuntimeMatchCore

	// 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) CreateTime

func (mh *MatchHandler) CreateTime() int64

func (*MatchHandler) HandlerName

func (mh *MatchHandler) HandlerName() string

func (*MatchHandler) Label

func (mh *MatchHandler) Label() string

func (*MatchHandler) QueueData

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

func (*MatchHandler) QueueGetState

func (mh *MatchHandler) QueueGetState(ctx context.Context, resultCh chan<- *MatchGetStateResult) bool

func (*MatchHandler) QueueJoin

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

func (*MatchHandler) QueueJoinAttempt

func (mh *MatchHandler) QueueJoinAttempt(ctx context.Context, resultCh chan<- *MatchJoinAttemptResult, 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) QueueSignal

func (mh *MatchHandler) QueueSignal(ctx context.Context, resultCh chan<- *MatchSignalResult, data string) 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.

func (*MatchHandler) TickRate

func (mh *MatchHandler) TickRate() int

type MatchIndexEntry

type MatchIndexEntry struct {
	Node        string                 `json:"node"`
	Label       map[string]interface{} `json:"label"`
	LabelString string                 `json:"label_string"`
	TickRate    int                    `json:"tick_rate"`
	HandlerName string                 `json:"handler_name"`
	CreateTime  int64                  `json:"create_time"`
}

type MatchJoinAttemptResult

type MatchJoinAttemptResult struct {
	Allow  bool
	Reason string
	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 MatchNamesListFunction

type MatchNamesListFunction func() []string

type MatchPresence

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

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) GetReason

func (p *MatchPresence) GetReason() runtime.PresenceReason

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) FilterPresenceIDs

func (m *MatchPresenceList) FilterPresenceIDs(ids []*PresenceID) []*PresenceID

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 MatchProvider

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

func NewMatchProvider

func NewMatchProvider() *MatchProvider

func (*MatchProvider) CreateMatch

func (mp *MatchProvider) CreateMatch(ctx context.Context, logger *zap.Logger, id uuid.UUID, node string, stopped *atomic.Bool, name string) (RuntimeMatchCore, error)

func (*MatchProvider) RegisterCreateFn

func (mp *MatchProvider) RegisterCreateFn(name string, fn RuntimeMatchCreateFunction)

type MatchRegistry

type MatchRegistry interface {
	// Create and start a new match, given a Lua module name or registered Go or JS match function.
	CreateMatch(ctx context.Context, 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, string, 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, tickRate int, handlerName, label string, createTime int64) error
	// List (and optionally filter) currently running matches.
	// This can list across both authoritative and relayed matches.
	ListMatches(ctx context.Context, limit int, authoritative *wrapperspb.BoolValue, label *wrapperspb.StringValue, minSize *wrapperspb.Int32Value, maxSize *wrapperspb.Int32Value, query *wrapperspb.StringValue, node *wrapperspb.StringValue) ([]*api.Match, []string, 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)
	// Signal a match and wait for a response from its arbitrary signal handler function.
	Signal(ctx context.Context, id, data string) (string, error)
	// Get a snapshot of the match state in a string representation.
	GetState(ctx context.Context, id uuid.UUID, node string) ([]*rtapi.UserPresence, int64, string, error)

	SetPeer(peer Peer)
}

func NewLocalMatchRegistry

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

type MatchSignalResult

type MatchSignalResult struct {
	Success bool
	Result  string
}

type Matchmaker

type Matchmaker interface {
	Pause()
	Resume()
	Stop()
	OnMatchedEntries(fn func(entries [][]*MatchmakerEntry))
	OnStatsUpdate(fn func(stats *api.MatchmakerStats))
	Add(ctx context.Context, presences []*MatchmakerPresence, sessionID, partyId, query string, minCount, maxCount, countMultiple int, stringProperties map[string]string, numericProperties map[string]float64) (string, int64, error)
	Insert(extracts []*MatchmakerExtract) error
	Extract() []*MatchmakerExtract
	RemoveSession(sessionID, ticket string) error
	RemoveSessionAll(sessionID string) error
	RemoveParty(partyID, ticket string) error
	RemovePartyAll(partyID string) error
	RemoveAll(node string)
	Remove(tickets []string)
	GetStats() *api.MatchmakerStats
	SetStats(*api.MatchmakerStats)
}

func NewLocalMatchmaker

func NewLocalMatchmaker(logger, startupLogger *zap.Logger, config Config, router MessageRouter, metrics Metrics, runtime *Runtime) Matchmaker

type MatchmakerConfig

type MatchmakerConfig struct {
	MaxTickets   int  `` /* 135-byte string literal not displayed */
	IntervalSec  int  `yaml:"interval_sec" json:"interval_sec" usage:"How quickly the matchmaker attempts to form matches, in seconds. Default 15."`
	MaxIntervals int  `` /* 171-byte string literal not displayed */
	RevPrecision bool `yaml:"rev_precision" json:"rev_precision" usage:"Reverse matching precision. Default false."`
	RevThreshold int  `yaml:"rev_threshold" json:"rev_threshold" usage:"Reverse matching threshold. Default 1."`
}

func NewMatchmakerConfig

func NewMatchmakerConfig() *MatchmakerConfig

type MatchmakerEntry

type MatchmakerEntry struct {
	Ticket     string                 `json:"ticket"`
	Presence   *MatchmakerPresence    `json:"presence"`
	Properties map[string]interface{} `json:"properties"`
	PartyId    string                 `json:"party_id"`
	CreateTime int64                  `json:"create_time"`

	StringProperties  map[string]string  `json:"-"`
	NumericProperties map[string]float64 `json:"-"`
}

func (*MatchmakerEntry) GetPartyId

func (m *MatchmakerEntry) GetPartyId() string

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 MatchmakerExtract

type MatchmakerExtract struct {
	Presences         []*MatchmakerPresence
	SessionID         string
	PartyId           string
	Query             string
	MinCount          int
	MaxCount          int
	CountMultiple     int
	StringProperties  map[string]string
	NumericProperties map[string]float64
	Ticket            string
	Count             int
	Intervals         int
	CreatedAt         int64
	Node              string
}

type MatchmakerIndex

type MatchmakerIndex struct {
	Ticket     string                 `json:"ticket"`
	Properties map[string]interface{} `json:"properties"`
	MinCount   int                    `json:"min_count"`
	MaxCount   int                    `json:"max_count"`
	PartyId    string                 `json:"party_id"`
	CreatedAt  int64                  `json:"created_at"`

	// Parameters used for correctly processing various matchmaker operations, but not indexed for searching.
	Query             string              `json:"-"`
	Count             int                 `json:"-"`
	CountMultiple     int                 `json:"-"`
	SessionID         string              `json:"-"`
	Intervals         int                 `json:"-"`
	SessionIDs        map[string]struct{} `json:"-"`
	Node              string              `json:"-"`
	StringProperties  map[string]string   `json:"-"`
	NumericProperties map[string]float64  `json:"-"`
	ParsedQuery       bluge.Query         `json:"-"`
	Entries           []*MatchmakerEntry  `json:"-"`
}

type MatchmakerIndexGroup

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

type MatchmakerPresence

type MatchmakerPresence struct {
	UserId    string    `json:"user_id"`
	SessionId string    `json:"session_id"`
	Username  string    `json:"username"`
	Node      string    `json:"node"`
	SessionID uuid.UUID `json:"-"`
}

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) GetReason

func (p *MatchmakerPresence) GetReason() runtime.PresenceReason

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 MatchmakerStatsEntry

type MatchmakerStatsEntry struct {
	CreatedAt   int64 // Unix nanoseconds.
	CompletedAt int64 // Unix nanoseconds.
}

type Media

type Media struct {
	ID      string `json:"id"`
	S3Url   string `json:"S3Url"`
	IPFSUrl string `json:"IPFSUrl"`
	AssetId string `json:"AssetId"`
}

Struct to represent media information

type MessageRouter

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

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, protojsonMarshaler *protojson.MarshalOptions) MessageRouter

type Metadata

type Metadata struct {
	ID       string          `json:"id"`
	Metadata MetadataDetails `json:"metadata"`
	IPFSUrl  string          `json:"IPFSUrl"`
	AssetId  string          `json:"AssetId"`
}

Struct to represent metadata with asset information

type MetadataDetails

type MetadataDetails struct {
	Creator    string      `json:"creator"`
	Attributes []Attribute `json:"attributes"`
}

Struct to represent metadata details

type MethodName

type MethodName string

type Metrics

type Metrics interface {
	Stop(logger *zap.Logger)

	SnapshotLatencyMs() float64
	SnapshotRateSec() float64
	SnapshotRecvKbSec() float64
	SnapshotSentKbSec() float64

	Api(name string, elapsed time.Duration, recvBytes, sentBytes int64, isErr bool)
	ApiRpc(id string, elapsed time.Duration, recvBytes, sentBytes int64, isErr bool)
	ApiBefore(name string, elapsed time.Duration, isErr bool)
	ApiAfter(name string, elapsed time.Duration, isErr bool)

	Message(recvBytes int64, isErr bool)
	MessageBytesSent(sentBytes int64)

	GaugeRuntimes(value float64)
	GaugeLuaRuntimes(value float64)
	GaugeJsRuntimes(value float64)
	GaugeAuthoritativeMatches(value float64)
	CountDroppedEvents(delta int64)
	CountWebsocketOpened(delta int64)
	CountWebsocketClosed(delta int64)
	CountUntaggedGrpcStatsCalls(delta int64)
	GaugeSessions(value float64)
	GaugePresences(value float64)
	GaugeStorageIndexEntries(indexName string, value float64)

	Matchmaker(tickets, activeTickets float64, processTime time.Duration)

	PresenceEvent(dequeueElapsed, processElapsed time.Duration)

	StorageWriteRejectCount(tags map[string]string, delta int64)

	CustomCounter(name string, tags map[string]string, delta int64)
	CustomGauge(name string, tags map[string]string, value float64)
	CustomTimer(name string, tags map[string]string, value time.Duration)
}

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 'layerg', empty string '' disables the prefix."`
	CustomPrefix     string `` /* 147-byte string literal not displayed */
}

MetricsConfig is configuration relevant to metrics capturing and output.

func NewMetricsConfig

func NewMetricsConfig() *MetricsConfig

type MetricsGrpcHandler

type MetricsGrpcHandler struct {
	MetricsFn func(name string, elapsed time.Duration, recvBytes, sentBytes int64, isErr bool)
	Metrics   Metrics
}

func (*MetricsGrpcHandler) HandleConn

HandleConn processes the Conn stats.

func (*MetricsGrpcHandler) HandleRPC

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

HandleRPC processes the RPC stats.

func (*MetricsGrpcHandler) TagConn

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

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 MintNFTRequest

type MintNFTRequest struct {
	Recipient string `json:"recipient"`
	NFTTransactionDetails
}

Struct for the Mint NFT request

type NFTData

type NFTData struct {
	ID                string   `json:"id"`
	Name              string   `json:"name"`
	TokenId           string   `json:"tokenId"`
	Description       string   `json:"description"`
	CollectionAddress string   `json:"collectionAddress"`
	Media             Media    `json:"media"`
	Metadata          Metadata `json:"metadata"`
	OffChainBalance   string   `json:"offChainBalance"`
	OnChainBalance    string   `json:"onChainBalance"`
	OwnerAddress      string   `json:"ownerAddress"`
	Type              string   `json:"type"`
}

Struct to represent individual NFT data item

type NFTQueryParams

type NFTQueryParams struct {
	CollectionAddress string   `json:"collectionAddress" required:"true"`
	Mode              string   `json:"mode"`
	Page              string   `json:"page"`
	Limit             string   `json:"limit"`
	OwnerAddress      string   `json:"ownerAddress"`
	TokenIds          []string `json:"tokenIds"`
}

type NFTResponse

type NFTResponse struct {
	Data   []NFTData `json:"data"`
	Paging Paging    `json:"paging"`
}

Main struct to represent the NFT response

type NFTTransactionDetails

type NFTTransactionDetails struct {
	NFTId   string `json:"nftId"`
	Amount  string `json:"amount"`
	UAToken string `json:"UAToken"`
}

Common struct for NFT transaction details

type OrderedTournaments

type OrderedTournaments []*Leaderboard

OrderedTournaments defines a type alias for a list of tournaments that binds together sorting functions.

func (OrderedTournaments) Len

func (l OrderedTournaments) Len() int

func (OrderedTournaments) Less

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

func (OrderedTournaments) Swap

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

type Paging

type Paging struct {
	Page    int  `json:"page"`
	Limit   int  `json:"limit"`
	HasNext bool `json:"hasNext"`
}

Struct to represent pagination information

type PartyHandler

type PartyHandler struct {
	sync.RWMutex

	ID      uuid.UUID
	Node    string
	IDStr   string
	Open    bool
	MaxSize int
	Stream  PresenceStream
	// contains filtered or unexported fields
}

func NewPartyHandler

func NewPartyHandler(logger *zap.Logger, partyRegistry PartyRegistry, matchmaker Matchmaker, tracker Tracker, streamManager StreamManager, router MessageRouter, id uuid.UUID, node string, open bool, maxSize int, presence *rtapi.UserPresence, peer Peer) *PartyHandler

func (*PartyHandler) Accept

func (p *PartyHandler) Accept(sessionID, node string, presence *rtapi.UserPresence, singleParty bool) error

func (*PartyHandler) Close

func (p *PartyHandler) Close(sessionID, node string) error

func (*PartyHandler) DataSend

func (p *PartyHandler) DataSend(sessionID, node string, opCode int64, data []byte) error

func (*PartyHandler) Join

func (p *PartyHandler) Join(presences []*Presence)

func (*PartyHandler) JoinRequest

func (p *PartyHandler) JoinRequest(presence *Presence) (bool, error)

func (*PartyHandler) JoinRequestList

func (p *PartyHandler) JoinRequestList(sessionID, node string) ([]*rtapi.UserPresence, error)

func (*PartyHandler) Leave

func (p *PartyHandler) Leave(presences []*Presence)

func (*PartyHandler) MatchmakerAdd

func (p *PartyHandler) MatchmakerAdd(sessionID, node, query string, minCount, maxCount, countMultiple int, stringProperties map[string]string, numericProperties map[string]float64) (string, []*PresenceID, error)

func (*PartyHandler) MatchmakerRemove

func (p *PartyHandler) MatchmakerRemove(sessionID, node, ticket string) error

func (*PartyHandler) Promote

func (p *PartyHandler) Promote(sessionID, node string, presence *rtapi.UserPresence) error

func (*PartyHandler) Remove

func (p *PartyHandler) Remove(sessionID, node string, presence *rtapi.UserPresence) error

type PartyJoinRequest

type PartyJoinRequest struct {
	Presence     *Presence
	UserPresence *rtapi.UserPresence
}

type PartyLeader

type PartyLeader struct {
	PresenceID   *PresenceID
	UserPresence *rtapi.UserPresence
}

type PartyPresenceList

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

func NewPartyPresenceList

func NewPartyPresenceList(maxSize int) *PartyPresenceList

func (*PartyPresenceList) Join

func (m *PartyPresenceList) Join(joins []*Presence) ([]*Presence, error)

func (*PartyPresenceList) Leave

func (m *PartyPresenceList) Leave(leaves []*Presence) ([]*Presence, []*Presence)

func (*PartyPresenceList) List

func (*PartyPresenceList) Oldest

func (*PartyPresenceList) Release

func (m *PartyPresenceList) Release(presence *Presence)

func (*PartyPresenceList) Reserve

func (m *PartyPresenceList) Reserve(presence *Presence) error

func (*PartyPresenceList) Size

func (m *PartyPresenceList) Size() int

type PartyPresenceListItem

type PartyPresenceListItem struct {
	PresenceID   *PresenceID
	Presence     *Presence
	UserPresence *rtapi.UserPresence
}

type PartyRegistry

type PartyRegistry interface {
	Create(open bool, maxSize int, leader *rtapi.UserPresence) *PartyHandler
	Delete(id uuid.UUID)

	Join(id uuid.UUID, presences []*Presence)
	Leave(id uuid.UUID, presences []*Presence)

	PartyJoinRequest(ctx context.Context, id uuid.UUID, node string, presence *Presence) (bool, error)
	PartyPromote(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string, presence *rtapi.UserPresence) error
	PartyAccept(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string, presence *rtapi.UserPresence) error
	PartyRemove(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string, presence *rtapi.UserPresence) error
	PartyClose(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string) error
	PartyJoinRequestList(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string) ([]*rtapi.UserPresence, error)
	PartyMatchmakerAdd(ctx context.Context, id uuid.UUID, node, sessionID, fromNode, query string, minCount, maxCount, countMultiple int, stringProperties map[string]string, numericProperties map[string]float64) (string, []*PresenceID, error)
	PartyMatchmakerRemove(ctx context.Context, id uuid.UUID, node, sessionID, fromNode, ticket string) error
	PartyDataSend(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string, opCode int64, data []byte) error

	SetPeer(peer Peer)
}

func NewLocalPartyRegistry

func NewLocalPartyRegistry(logger *zap.Logger, config Config, matchmaker Matchmaker, tracker Tracker, streamManager StreamManager, router MessageRouter, node string) PartyRegistry

type Peer

type Peer interface {
	memberlist.Delegate
	memberlist.EventDelegate
	memberlist.AliveDelegate
	memberlist.ConflictDelegate
	memberlist.MergeDelegate
	memberlist.PingDelegate
	Shutdown()
	Join(members ...string) (int, error)
	Local() Endpoint
	NumMembers() int
	Member(name string) (Endpoint, bool)
	Members() []Endpoint
	Broadcast(msg *pb.Request, reliable bool)
	BroadcastBinaryLog(b *pb.BinaryLog, toQueue bool)
	Send(endpoint Endpoint, msg *pb.Request, reliable bool) error
	Request(ctx context.Context, endpoint Endpoint, msg *pb.Request) (*pb.ResponseWriter, error)
	GetServiceRegistry() kit.ServiceRegistry
	Version() (map[string][2]uint64, int)
	MatchmakerAdd(extract *pb.MatchmakerExtract)
	MatchmakerRemoveSession(sessionID, ticket string)
	MatchmakerRemoveSessionAll(sessionID string)
	MatchmakerRemoveParty(partyID, ticket string)
	MatchmakerRemovePartyAll(partyID string)
	MatchmakerRemoveAll(node string)
	MatchmakerRemove(tickets []string)
}

func NewLocalPeer

func NewLocalPeer(logger *zap.Logger, name string, metadata map[string]string, metrics Metrics, sessionRegistry SessionRegistry, tracker Tracker, messageRouter MessageRouter, matchRegistry MatchRegistry, matchmaker Matchmaker, partyRegistry PartyRegistry, protojsonMarshaler *protojson.MarshalOptions, protojsonUnmarshaler *protojson.UnmarshalOptions, c *PeerConfig) Peer

type PeerBroadcast

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

func (*PeerBroadcast) Finished

func (b *PeerBroadcast) Finished()

Finished is invoked when the message will no longer be broadcast, either due to invalidation or to the transmit limit being reached

func (*PeerBroadcast) Invalidates

func (b *PeerBroadcast) Invalidates(other memberlist.Broadcast) bool

Invalidates checks if enqueuing the current broadcast invalidates a previous broadcast

func (*PeerBroadcast) Message

func (b *PeerBroadcast) Message() []byte

Returns a byte form of the message

func (*PeerBroadcast) Name

func (b *PeerBroadcast) Name() string

The unique identity of this broadcast message.

type PeerConfig

type PeerConfig struct {
	Addr                string                  `` /* 144-byte string literal not displayed */
	Port                int                     `yaml:"gossip_bindport" json:"gossip_bindport" usage:"Port number to bind LayerG to for discovery. Default value is 7352."`
	PushPullInterval    int                     `` /* 151-byte string literal not displayed */
	GossipInterval      int                     `` /* 152-byte string literal not displayed */
	TCPTimeout          int                     `` /* 219-byte string literal not displayed */
	ProbeTimeout        int                     `` /* 260-byte string literal not displayed */
	ProbeInterval       int                     `` /* 287-byte string literal not displayed */
	RetransmitMult      int                     `` /* 173-byte string literal not displayed */
	MaxGossipPacketSize int                     `` /* 236-byte string literal not displayed */
	BroadcastQueueSize  int                     `yaml:"broadcast_queue_size" json:"broadcast_queue_size" usage:"broadcast message queue size"`
	Members             []string                `yaml:"members" json:"members" usage:""`
	SecretKey           string                  `` /* 201-byte string literal not displayed */
	Etcd                *kit.EtcdClientv3Config `yaml:"etcd" json:"etcd" usage:"Etcd config"`
	Weight              int32                   `yaml:"weight" json:"weight" usage:"weight"`
	Balancer            int32                   `yaml:"balancer" json:"balancer" usage:"balancer"`
	Grpc                *kit.GrpcConfig         `yaml:"grpc" json:"grpc" usage:"grpc client setting"`
}

func NewPeerConfig

func NewPeerConfig() *PeerConfig

func (*PeerConfig) Clone

func (c *PeerConfig) Clone() *PeerConfig

func (*PeerConfig) Validate

func (c *PeerConfig) Validate(logger *zap.Logger) error

type PeerEndpoint

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

func (*PeerEndpoint) AvgInputKbs

func (endpoint *PeerEndpoint) AvgInputKbs() float64

func (*PeerEndpoint) AvgLatencyMs

func (endpoint *PeerEndpoint) AvgLatencyMs() float64

func (*PeerEndpoint) AvgOutputKbs

func (endpoint *PeerEndpoint) AvgOutputKbs() float64

func (*PeerEndpoint) AvgRateSec

func (endpoint *PeerEndpoint) AvgRateSec() float64

func (*PeerEndpoint) Balancer

func (endpoint *PeerEndpoint) Balancer(v ...int32) int32

func (*PeerEndpoint) BindMemberlistNode

func (endpoint *PeerEndpoint) BindMemberlistNode(node *memberlist.Node)

func (*PeerEndpoint) DeleteMetadata

func (endpoint *PeerEndpoint) DeleteMetadata(deleteKey string)

func (*PeerEndpoint) GetMetadata

func (endpoint *PeerEndpoint) GetMetadata(k string) string

func (*PeerEndpoint) GoroutineCount

func (endpoint *PeerEndpoint) GoroutineCount() int32

func (*PeerEndpoint) MarshalJSON

func (endpoint *PeerEndpoint) MarshalJSON() ([]byte, error)

func (*PeerEndpoint) MarshalProtoBuffer

func (endpoint *PeerEndpoint) MarshalProtoBuffer() ([]byte, error)

func (*PeerEndpoint) MatchCount

func (endpoint *PeerEndpoint) MatchCount() int32

func (*PeerEndpoint) MemberlistNode

func (endpoint *PeerEndpoint) MemberlistNode() *memberlist.Node

func (*PeerEndpoint) MergeStateAt

func (endpoint *PeerEndpoint) MergeStateAt() int64

func (*PeerEndpoint) Metadata

func (endpoint *PeerEndpoint) Metadata() map[string]string

func (*PeerEndpoint) Name

func (endpoint *PeerEndpoint) Name() string

func (*PeerEndpoint) PingCompleted

func (endpoint *PeerEndpoint) PingCompleted(rtt time.Duration)

func (*PeerEndpoint) PingRTT

func (endpoint *PeerEndpoint) PingRTT(v ...time.Duration) time.Duration

func (*PeerEndpoint) PresenceCount

func (endpoint *PeerEndpoint) PresenceCount() int32

func (*PeerEndpoint) ResetMetadata

func (endpoint *PeerEndpoint) ResetMetadata(md map[string]string)

func (*PeerEndpoint) SessionCount

func (endpoint *PeerEndpoint) SessionCount() int32

func (*PeerEndpoint) SetMetadata

func (endpoint *PeerEndpoint) SetMetadata(k, v string)

func (*PeerEndpoint) Status

func (endpoint *PeerEndpoint) Status(v ...int32) int32

func (*PeerEndpoint) UpdateState

func (endpoint *PeerEndpoint) UpdateState(status *pb.Status)

func (*PeerEndpoint) Weight

func (endpoint *PeerEndpoint) Weight(v ...int32) int32

type PeerInbox

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

func NewPeerInbox

func NewPeerInbox() *PeerInbox

func (*PeerInbox) Deregister

func (s *PeerInbox) Deregister(inbox string)

func (*PeerInbox) Register

func (s *PeerInbox) Register(inbox string, reply chan *pb.Frame) error

func (*PeerInbox) Send

func (s *PeerInbox) Send(frame *pb.Frame)

type Pipeline

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

func NewPipeline

func NewPipeline(logger *zap.Logger, config Config, db *sql.DB, protojsonMarshaler *protojson.MarshalOptions, protojsonUnmarshaler *protojson.UnmarshalOptions, sessionRegistry SessionRegistry, statusRegistry StatusRegistry, matchRegistry MatchRegistry, partyRegistry PartyRegistry, matchmaker Matchmaker, tracker Tracker, router MessageRouter, runtime *Runtime) *Pipeline

func (*Pipeline) ProcessRequest

func (p *Pipeline) ProcessRequest(logger *zap.Logger, session Session, in *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) GetReason

func (p *Presence) GetReason() runtime.PresenceReason

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

	QueueTime time.Time
}

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
	Reason      uint32
}

func (*PresenceMeta) GetHidden

func (pm *PresenceMeta) GetHidden() bool

func (*PresenceMeta) GetPersistence

func (pm *PresenceMeta) GetPersistence() bool

func (*PresenceMeta) GetReason

func (pm *PresenceMeta) GetReason() runtime.PresenceReason

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
}

func BuildChannelId

func BuildChannelId(ctx context.Context, logger *zap.Logger, db *sql.DB, userID uuid.UUID, target string, chanType rtapi.ChannelJoin_Type) (string, PresenceStream, error)

type RankAsc

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

func (RankAsc) Less

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

type RankCache

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

type RankDesc

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

func (RankDesc) Less

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

type RedirectStdLogWriter

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

func (*RedirectStdLogWriter) Write

func (r *RedirectStdLogWriter) Write(p []byte) (int, error)

type RefreshUATokenRequest

type RefreshUATokenRequest struct {
	RefreshToken string `json:"refresh_token"`
}

type RefreshUATokenResponse

type RefreshUATokenResponse struct {
	RefreshToken        string `json:"refresh_token"`
	AccessToken         string `json:"access_token"`
	AccessTokenExpires  string `json:"access_token_expires_at"`
	RefreshTokenExpires string `json:"refresh_token_expires_at"`
}

func SessionRefresh

func SessionRefresh(ctx context.Context, logger *zap.Logger, db *sql.DB, config Config, sessionCache SessionCache, token string) (uuid.UUID, string, map[string]string, string, RefreshUATokenResponse, error)

type Runtime

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

func (*Runtime) AfterAddFriends

func (r *Runtime) AfterAddFriends() RuntimeAfterAddFriendsFunction

func (*Runtime) AfterAddGroupUsers

func (r *Runtime) AfterAddGroupUsers() RuntimeAfterAddGroupUsersFunction

func (*Runtime) AfterAuthenticateApple

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) AfterAuthenticateEvm

func (r *Runtime) AfterAuthenticateEvm() RuntimeAfterAuthenticateEvmFunction

func (*Runtime) AfterAuthenticateFacebook

func (r *Runtime) AfterAuthenticateFacebook() RuntimeAfterAuthenticateFacebookFunction

func (*Runtime) AfterAuthenticateFacebookInstantGame

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) AfterAuthenticateTelegram

func (r *Runtime) AfterAuthenticateTelegram() RuntimeAfterAuthenticateTelegramFunction

func (*Runtime) AfterAuthenticateUA

func (r *Runtime) AfterAuthenticateUA() RuntimeAfterAuthenticateUAFunction

func (*Runtime) AfterBanGroupUsers

func (r *Runtime) AfterBanGroupUsers() RuntimeAfterBanGroupUsersFunction

func (*Runtime) AfterBlockFriends

func (r *Runtime) AfterBlockFriends() RuntimeAfterBlockFriendsFunction

func (*Runtime) AfterCreateGroup

func (r *Runtime) AfterCreateGroup() RuntimeAfterCreateGroupFunction

func (*Runtime) AfterDeleteAccount

func (r *Runtime) AfterDeleteAccount() RuntimeAfterDeleteAccountFunction

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) AfterDeleteNotifications

func (r *Runtime) AfterDeleteNotifications() RuntimeAfterDeleteNotificationsFunction

func (*Runtime) AfterDeleteStorageObjects

func (r *Runtime) AfterDeleteStorageObjects() RuntimeAfterDeleteStorageObjectsFunction

func (*Runtime) AfterDeleteTournamentRecord

func (r *Runtime) AfterDeleteTournamentRecord() RuntimeAfterDeleteTournamentRecordFunction

func (*Runtime) AfterDemoteGroupUsers

func (r *Runtime) AfterDemoteGroupUsers() RuntimeAfterDemoteGroupUsersFunction

func (*Runtime) AfterEvent

func (r *Runtime) AfterEvent() RuntimeAfterEventFunction

func (*Runtime) AfterGetAccount

func (r *Runtime) AfterGetAccount() RuntimeAfterGetAccountFunction

func (*Runtime) AfterGetMatchmakerStats

func (r *Runtime) AfterGetMatchmakerStats() RuntimeAfterGetMatchmakerStatsFunction

func (*Runtime) AfterGetSubscription

func (r *Runtime) AfterGetSubscription() RuntimeAfterGetSubscriptionFunction

func (*Runtime) AfterGetUsers

func (r *Runtime) AfterGetUsers() RuntimeAfterGetUsersFunction

func (*Runtime) AfterImportFacebookFriends

func (r *Runtime) AfterImportFacebookFriends() RuntimeAfterImportFacebookFriendsFunction

func (*Runtime) AfterImportSteamFriends

func (r *Runtime) AfterImportSteamFriends() RuntimeAfterImportSteamFriendsFunction

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

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) AfterLinkEvm

func (r *Runtime) AfterLinkEvm() RuntimeAfterLinkEvmFunction

func (*Runtime) AfterLinkFacebook

func (r *Runtime) AfterLinkFacebook() RuntimeAfterLinkFacebookFunction

func (*Runtime) AfterLinkFacebookInstantGame

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) AfterListFriendsOfFriends

func (r *Runtime) AfterListFriendsOfFriends() RuntimeAfterListFriendsOfFriendsFunction

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) AfterListSubscriptions

func (r *Runtime) AfterListSubscriptions() RuntimeAfterListSubscriptionsFunction

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) AfterSessionLogout

func (r *Runtime) AfterSessionLogout() RuntimeAfterSessionLogoutFunction

func (*Runtime) AfterSessionRefresh

func (r *Runtime) AfterSessionRefresh() RuntimeAfterSessionRefreshFunction

func (*Runtime) AfterUnlinkApple

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

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) AfterValidatePurchaseApple

func (r *Runtime) AfterValidatePurchaseApple() RuntimeAfterValidatePurchaseAppleFunction

func (*Runtime) AfterValidatePurchaseFacebookInstant

func (r *Runtime) AfterValidatePurchaseFacebookInstant() RuntimeAfterValidatePurchaseFacebookInstantFunction

func (*Runtime) AfterValidatePurchaseGoogle

func (r *Runtime) AfterValidatePurchaseGoogle() RuntimeAfterValidatePurchaseGoogleFunction

func (*Runtime) AfterValidatePurchaseHuawei

func (r *Runtime) AfterValidatePurchaseHuawei() RuntimeAfterValidatePurchaseHuaweiFunction

func (*Runtime) AfterValidateSubscriptionApple

func (r *Runtime) AfterValidateSubscriptionApple() RuntimeAfterValidateSubscriptionAppleFunction

func (*Runtime) AfterValidateSubscriptionGoogle

func (r *Runtime) AfterValidateSubscriptionGoogle() RuntimeAfterValidateSubscriptionGoogleFunction

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

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) BeforeAuthenticateEvm

func (r *Runtime) BeforeAuthenticateEvm() RuntimeBeforeAuthenticateEvmFunction

func (*Runtime) BeforeAuthenticateFacebook

func (r *Runtime) BeforeAuthenticateFacebook() RuntimeBeforeAuthenticateFacebookFunction

func (*Runtime) BeforeAuthenticateFacebookInstantGame

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) BeforeAuthenticateTelegram

func (r *Runtime) BeforeAuthenticateTelegram() RuntimeBeforeAuthenticateTelegramFunction

func (*Runtime) BeforeAuthenticateUA

func (r *Runtime) BeforeAuthenticateUA() RuntimeBeforeAuthenticateUAFunction

func (*Runtime) BeforeBanGroupUsers

func (r *Runtime) BeforeBanGroupUsers() RuntimeBeforeBanGroupUsersFunction

func (*Runtime) BeforeBlockFriends

func (r *Runtime) BeforeBlockFriends() RuntimeBeforeBlockFriendsFunction

func (*Runtime) BeforeCreateGroup

func (r *Runtime) BeforeCreateGroup() RuntimeBeforeCreateGroupFunction

func (*Runtime) BeforeDeleteAccount

func (r *Runtime) BeforeDeleteAccount() RuntimeBeforeDeleteAccountFunction

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) BeforeDeleteNotifications

func (r *Runtime) BeforeDeleteNotifications() RuntimeBeforeDeleteNotificationsFunction

func (*Runtime) BeforeDeleteStorageObjects

func (r *Runtime) BeforeDeleteStorageObjects() RuntimeBeforeDeleteStorageObjectsFunction

func (*Runtime) BeforeDeleteTournamentRecord

func (r *Runtime) BeforeDeleteTournamentRecord() RuntimeBeforeDeleteTournamentRecordFunction

func (*Runtime) BeforeDemoteGroupUsers

func (r *Runtime) BeforeDemoteGroupUsers() RuntimeBeforeDemoteGroupUsersFunction

func (*Runtime) BeforeEvent

func (r *Runtime) BeforeEvent() RuntimeBeforeEventFunction

func (*Runtime) BeforeGetAccount

func (r *Runtime) BeforeGetAccount() RuntimeBeforeGetAccountFunction

func (*Runtime) BeforeGetMatchmakerStats

func (r *Runtime) BeforeGetMatchmakerStats() RuntimeBeforeGetMatchmakerStatsFunction

func (*Runtime) BeforeGetSubscription

func (r *Runtime) BeforeGetSubscription() RuntimeBeforeGetSubscriptionFunction

func (*Runtime) BeforeGetUsers

func (r *Runtime) BeforeGetUsers() RuntimeBeforeGetUsersFunction

func (*Runtime) BeforeImportFacebookFriends

func (r *Runtime) BeforeImportFacebookFriends() RuntimeBeforeImportFacebookFriendsFunction

func (*Runtime) BeforeImportSteamFriends

func (r *Runtime) BeforeImportSteamFriends() RuntimeBeforeImportSteamFriendsFunction

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

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) BeforeLinkEvm

func (r *Runtime) BeforeLinkEvm() RuntimeBeforeLinkEvmFunction

func (*Runtime) BeforeLinkFacebook

func (r *Runtime) BeforeLinkFacebook() RuntimeBeforeLinkFacebookFunction

func (*Runtime) BeforeLinkFacebookInstantGame

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) BeforeListFriendsOfFriends

func (r *Runtime) BeforeListFriendsOfFriends() RuntimeBeforeListFriendsOfFriendsFunction

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) BeforeListSubscriptions

func (r *Runtime) BeforeListSubscriptions() RuntimeBeforeListSubscriptionsFunction

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) BeforeSessionLogout

func (r *Runtime) BeforeSessionLogout() RuntimeBeforeSessionLogoutFunction

func (*Runtime) BeforeSessionRefresh

func (r *Runtime) BeforeSessionRefresh() RuntimeBeforeSessionRefreshFunction

func (*Runtime) BeforeUnlinkApple

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

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) BeforeValidatePurchaseApple

func (r *Runtime) BeforeValidatePurchaseApple() RuntimeBeforeValidatePurchaseAppleFunction

func (*Runtime) BeforeValidatePurchaseFacebookInstant

func (r *Runtime) BeforeValidatePurchaseFacebookInstant() RuntimeBeforeValidatePurchaseFacebookInstantFunction

func (*Runtime) BeforeValidatePurchaseGoogle

func (r *Runtime) BeforeValidatePurchaseGoogle() RuntimeBeforeValidatePurchaseGoogleFunction

func (*Runtime) BeforeValidatePurchaseHuawei

func (r *Runtime) BeforeValidatePurchaseHuawei() RuntimeBeforeValidatePurchaseHuaweiFunction

func (*Runtime) BeforeValidateSubscriptionApple

func (r *Runtime) BeforeValidateSubscriptionApple() RuntimeBeforeValidateSubscriptionAppleFunction

func (*Runtime) BeforeValidateSubscriptionGoogle

func (r *Runtime) BeforeValidateSubscriptionGoogle() RuntimeBeforeValidateSubscriptionGoogleFunction

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

func (*Runtime) EventSessionEnd

func (r *Runtime) EventSessionEnd() RuntimeEventSessionEndFunction

func (*Runtime) EventSessionStart

func (r *Runtime) EventSessionStart() RuntimeEventSessionStartFunction

func (*Runtime) GetPeer

func (r *Runtime) GetPeer() Peer

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) PurchaseNotificationApple

func (r *Runtime) PurchaseNotificationApple() RuntimePurchaseNotificationAppleFunction

func (*Runtime) PurchaseNotificationGoogle

func (r *Runtime) PurchaseNotificationGoogle() RuntimePurchaseNotificationGoogleFunction

func (*Runtime) Rpc

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

func (*Runtime) SetPeer

func (r *Runtime) SetPeer(peer Peer)

func (*Runtime) Shutdown

func (r *Runtime) Shutdown() RuntimeShutdownFunction

func (*Runtime) StorageIndexFilterFunction

func (r *Runtime) StorageIndexFilterFunction(indexName string) RuntimeStorageIndexFilterFunction

func (*Runtime) SubscriptionNotificationApple

func (r *Runtime) SubscriptionNotificationApple() RuntimeSubscriptionNotificationAppleFunction

func (*Runtime) SubscriptionNotificationGoogle

func (r *Runtime) SubscriptionNotificationGoogle() RuntimeSubscriptionNotificationGoogleFunction

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

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 RuntimeAfterAuthenticateEvmFunction

type RuntimeAfterAuthenticateEvmFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.Session, in *api.AuthenticateEvmRequest) 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

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 RuntimeAfterAuthenticateTelegramFunction

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

type RuntimeAfterAuthenticateUAFunction

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

type RuntimeAfterBanGroupUsersFunction

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 RuntimeAfterDeleteAccountFunction

type RuntimeAfterDeleteAccountFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string) 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 RuntimeAfterDeleteNotificationsFunction

type RuntimeAfterDeleteNotificationsFunction 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 RuntimeAfterDeleteTournamentRecordFunction

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

type RuntimeAfterDemoteGroupUsersFunction

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

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 RuntimeAfterGetMatchmakerStatsFunction

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

type RuntimeAfterGetSubscriptionFunction

type RuntimeAfterGetSubscriptionFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.ValidatedSubscription, in *api.GetSubscriptionRequest) 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 RuntimeAfterImportSteamFriendsFunction

type RuntimeAfterImportSteamFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ImportSteamFriendsRequest) 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

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 RuntimeAfterLinkEvmFunction

type RuntimeAfterLinkEvmFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountEvm) 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

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.LinkSteamRequest) 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 RuntimeAfterListFriendsOfFriendsFunction

type RuntimeAfterListFriendsOfFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.FriendsOfFriendsList) 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 RuntimeAfterListSubscriptionsFunction

type RuntimeAfterListSubscriptionsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.SubscriptionList, in *api.ListSubscriptionsRequest) 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, lang string, out, in *rtapi.Envelope) error

type RuntimeAfterSessionLogoutFunction

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

type RuntimeAfterSessionRefreshFunction

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

type RuntimeAfterUnlinkAppleFunction

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

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 RuntimeAfterValidatePurchaseAppleFunction

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

type RuntimeAfterValidatePurchaseFacebookInstantFunction

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

type RuntimeAfterValidatePurchaseGoogleFunction

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

type RuntimeAfterValidatePurchaseHuaweiFunction

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

type RuntimeAfterValidateSubscriptionAppleFunction

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

type RuntimeAfterValidateSubscriptionGoogleFunction

type RuntimeAfterValidateSubscriptionGoogleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, out *api.ValidateSubscriptionResponse, in *api.ValidateSubscriptionGoogleRequest) 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

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 RuntimeBeforeAuthenticateEvmFunction

type RuntimeBeforeAuthenticateEvmFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AuthenticateEvmRequest) (*api.AuthenticateEvmRequest, 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

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 RuntimeBeforeAuthenticateTelegramFunction

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

type RuntimeBeforeAuthenticateUAFunction

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

type RuntimeBeforeBanGroupUsersFunction

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 RuntimeBeforeDeleteAccountFunction

type RuntimeBeforeDeleteAccountFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string) (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 RuntimeBeforeDeleteNotificationsFunction

type RuntimeBeforeDeleteNotificationsFunction 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 RuntimeBeforeDeleteTournamentRecordFunction

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

type RuntimeBeforeDemoteGroupUsersFunction

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

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 RuntimeBeforeGetMatchmakerStatsFunction

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

type RuntimeBeforeGetSubscriptionFunction

type RuntimeBeforeGetSubscriptionFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.GetSubscriptionRequest) (*api.GetSubscriptionRequest, 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 RuntimeBeforeImportSteamFriendsFunction

type RuntimeBeforeImportSteamFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ImportSteamFriendsRequest) (*api.ImportSteamFriendsRequest, 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

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 RuntimeBeforeLinkEvmFunction

type RuntimeBeforeLinkEvmFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.AccountEvm) (*api.AccountEvm, 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

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.LinkSteamRequest) (*api.LinkSteamRequest, 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 RuntimeBeforeListFriendsOfFriendsFunction

type RuntimeBeforeListFriendsOfFriendsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListFriendsOfFriendsRequest) (*api.ListFriendsOfFriendsRequest, 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 RuntimeBeforeListSubscriptionsFunction

type RuntimeBeforeListSubscriptionsFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ListSubscriptionsRequest) (*api.ListSubscriptionsRequest, 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, lang string, in *rtapi.Envelope) (*rtapi.Envelope, error)

type RuntimeBeforeSessionLogoutFunction

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

type RuntimeBeforeSessionRefreshFunction

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

type RuntimeBeforeUnlinkAppleFunction

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

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 RuntimeBeforeValidatePurchaseAppleFunction

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

type RuntimeBeforeValidatePurchaseFacebookInstantFunction

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

type RuntimeBeforeValidatePurchaseGoogleFunction

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

type RuntimeBeforeValidatePurchaseHuaweiFunction

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

type RuntimeBeforeValidateSubscriptionAppleFunction

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

type RuntimeBeforeValidateSubscriptionGoogleFunction

type RuntimeBeforeValidateSubscriptionGoogleFunction func(ctx context.Context, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, clientIP, clientPort string, in *api.ValidateSubscriptionGoogleRequest) (*api.ValidateSubscriptionGoogleRequest, 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 Lua runtime instances to allocate. Default 0."` // Kept for backwards compatibility
	LuaMinCount       int               `yaml:"lua_min_count" json:"lua_min_count" usage:"Minimum number of Lua runtime instances to allocate. Default 16."`
	MaxCount          int               `yaml:"max_count" json:"max_count" usage:"Maximum number of Lua runtime instances to allocate. Default 0."` // Kept for backwards compatibility
	LuaMaxCount       int               `yaml:"lua_max_count" json:"lua_max_count" usage:"Maximum number of Lua runtime instances to allocate. Default 48."`
	JsMinCount        int               `yaml:"js_min_count" json:"js_min_count" usage:"Maximum number of Javascript runtime instances to allocate. Default 16."`
	JsMaxCount        int               `yaml:"js_max_count" json:"js_max_count" usage:"Maximum number of Javascript runtime instances to allocate. Default 32."`
	CallStackSize     int               `yaml:"call_stack_size" json:"call_stack_size" usage:"Size of each runtime instance's call stack. Default 0."` // Kept for backwards compatibility
	LuaCallStackSize  int               `yaml:"lua_call_stack_size" json:"lua_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 Lua runtime instance's registry. Default 0."` // Kept for backwards compatibility
	LuaRegistrySize   int               `yaml:"lua_registry_size" json:"lua_registry_size" usage:"Size of each Lua 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              `` // Kept for backwards compatibility
	/* 161-byte string literal not displayed */
	LuaReadOnlyGlobals bool   `` /* 169-byte string literal not displayed */
	JsReadOnlyGlobals  bool   `` /* 168-byte string literal not displayed */
	LuaApiStacktrace   bool   `` /* 144-byte string literal not displayed */
	JsEntrypoint       string `yaml:"js_entrypoint" json:"js_entrypoint" usage:"Specifies the location of the bundled JavaScript runtime source code."`
}

RuntimeConfig is configuration relevant to the Runtimes.

func NewRuntimeConfig

func NewRuntimeConfig() *RuntimeConfig

func (*RuntimeConfig) GetLuaCallStackSize

func (r *RuntimeConfig) GetLuaCallStackSize() int

Function to allow backwards compatibility for CallStackSize config

func (*RuntimeConfig) GetLuaMaxCount

func (r *RuntimeConfig) GetLuaMaxCount() int

Function to allow backwards compatibility for MaxCount config

func (*RuntimeConfig) GetLuaMinCount

func (r *RuntimeConfig) GetLuaMinCount() int

Function to allow backwards compatibility for MinCount config

func (*RuntimeConfig) GetLuaReadOnlyGlobals

func (r *RuntimeConfig) GetLuaReadOnlyGlobals() bool

Function to allow backwards compatibility for LuaReadOnlyGlobals config

func (*RuntimeConfig) GetLuaRegistrySize

func (r *RuntimeConfig) GetLuaRegistrySize() int

Function to allow backwards compatibility for RegistrySize config

type RuntimeEventCustomFunction

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, lang string, evtTimeSec int64, reason string)

type RuntimeEventSessionStartFunction

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

type RuntimeExecutionMode

type RuntimeExecutionMode int
const (
	RuntimeExecutionModeEvent RuntimeExecutionMode = iota
	RuntimeExecutionModeRunOnce
	RuntimeExecutionModeRPC
	RuntimeExecutionModeBefore
	RuntimeExecutionModeAfter
	RuntimeExecutionModeMatch
	RuntimeExecutionModeMatchmaker
	RuntimeExecutionModeMatchmakerOverride
	RuntimeExecutionModeMatchCreate
	RuntimeExecutionModeTournamentEnd
	RuntimeExecutionModeTournamentReset
	RuntimeExecutionModeLeaderboardReset
	RuntimeExecutionModePurchaseNotificationApple
	RuntimeExecutionModeSubscriptionNotificationApple
	RuntimeExecutionModePurchaseNotificationGoogle
	RuntimeExecutionModeSubscriptionNotificationGoogle
	RuntimeExecutionModeStorageIndexFilter
	RuntimeExecutionModeShutdown
)

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.LayerGModule, 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.LayerGModule, in *api.AddGroupUsersRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterAuthenticateApple

func (ri *RuntimeGoInitializer) RegisterAfterAuthenticateApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, out *api.Session, in *api.AuthenticateEmailRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterAuthenticateEvm

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

func (*RuntimeGoInitializer) RegisterAfterAuthenticateFacebook

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

func (*RuntimeGoInitializer) RegisterAfterAuthenticateFacebookInstantGame

func (ri *RuntimeGoInitializer) RegisterAfterAuthenticateFacebookInstantGame(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, out *api.Session, in *api.AuthenticateSteamRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterAuthenticateTelegram

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

func (*RuntimeGoInitializer) RegisterAfterAuthenticateUA

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

func (*RuntimeGoInitializer) RegisterAfterBanGroupUsers

func (ri *RuntimeGoInitializer) RegisterAfterBanGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, out *api.Group, in *api.CreateGroupRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterDeleteAccount

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

func (*RuntimeGoInitializer) RegisterAfterDeleteFriends

func (ri *RuntimeGoInitializer) RegisterAfterDeleteFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.DeleteLeaderboardRecordRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterDeleteNotifications

func (ri *RuntimeGoInitializer) RegisterAfterDeleteNotifications(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, in *api.DeleteStorageObjectsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterDeleteTournamentRecord

func (ri *RuntimeGoInitializer) RegisterAfterDeleteTournamentRecord(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.DeleteTournamentRecordRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterDemoteGroupUsers

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

func (*RuntimeGoInitializer) RegisterAfterEvent

func (ri *RuntimeGoInitializer) RegisterAfterEvent(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, out *api.Account) error) error

func (*RuntimeGoInitializer) RegisterAfterGetMatchmakerStats

func (ri *RuntimeGoInitializer) RegisterAfterGetMatchmakerStats(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, out *api.MatchmakerStats) error) error

func (*RuntimeGoInitializer) RegisterAfterGetSubscription

func (ri *RuntimeGoInitializer) RegisterAfterGetSubscription(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, out *api.ValidatedSubscription, in *api.GetSubscriptionRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterGetUsers

func (ri *RuntimeGoInitializer) RegisterAfterGetUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, in *api.ImportFacebookFriendsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterImportSteamFriends

func (ri *RuntimeGoInitializer) RegisterAfterImportSteamFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.ImportSteamFriendsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterJoinGroup

func (ri *RuntimeGoInitializer) RegisterAfterJoinGroup(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.LeaveGroupRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterLinkApple

func (ri *RuntimeGoInitializer) RegisterAfterLinkApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.LinkFacebookRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterLinkFacebookInstantGame

func (ri *RuntimeGoInitializer) RegisterAfterLinkFacebookInstantGame(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.LinkSteamRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListChannelMessages

func (ri *RuntimeGoInitializer) RegisterAfterListChannelMessages(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, out *api.FriendList) error) error

func (*RuntimeGoInitializer) RegisterAfterListFriendsOfFriends

func (ri *RuntimeGoInitializer) RegisterAfterListFriendsOfFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, out *api.FriendsOfFriendsList) error) error

func (*RuntimeGoInitializer) RegisterAfterListGroupUsers

func (ri *RuntimeGoInitializer) RegisterAfterListGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, out *api.StorageObjectList, in *api.ListStorageObjectsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListSubscriptions

func (ri *RuntimeGoInitializer) RegisterAfterListSubscriptions(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, out *api.SubscriptionList, in *api.ListSubscriptionsRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterListTournamentRecords

func (ri *RuntimeGoInitializer) RegisterAfterListTournamentRecords(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, out, in *rtapi.Envelope) error) error

func (*RuntimeGoInitializer) RegisterAfterSessionLogout

func (ri *RuntimeGoInitializer) RegisterAfterSessionLogout(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.SessionLogoutRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterSessionRefresh

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

func (*RuntimeGoInitializer) RegisterAfterUnlinkApple

func (ri *RuntimeGoInitializer) RegisterAfterUnlinkApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.AccountFacebook) error) error

func (*RuntimeGoInitializer) RegisterAfterUnlinkFacebookInstantGame

func (ri *RuntimeGoInitializer) RegisterAfterUnlinkFacebookInstantGame(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.UpdateGroupRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterValidatePurchaseApple

func (ri *RuntimeGoInitializer) RegisterAfterValidatePurchaseApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, out *api.ValidatePurchaseResponse, in *api.ValidatePurchaseAppleRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterValidatePurchaseFacebookInstant

func (ri *RuntimeGoInitializer) RegisterAfterValidatePurchaseFacebookInstant(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, out *api.ValidatePurchaseResponse, in *api.ValidatePurchaseFacebookInstantRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterValidatePurchaseGoogle

func (ri *RuntimeGoInitializer) RegisterAfterValidatePurchaseGoogle(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, out *api.ValidatePurchaseResponse, in *api.ValidatePurchaseGoogleRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterValidatePurchaseHuawei

func (ri *RuntimeGoInitializer) RegisterAfterValidatePurchaseHuawei(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, out *api.ValidatePurchaseResponse, in *api.ValidatePurchaseHuaweiRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterValidateSubscriptionApple

func (ri *RuntimeGoInitializer) RegisterAfterValidateSubscriptionApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, out *api.ValidateSubscriptionResponse, in *api.ValidateSubscriptionAppleRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterValidateSubscriptionGoogle

func (ri *RuntimeGoInitializer) RegisterAfterValidateSubscriptionGoogle(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, out *api.ValidateSubscriptionResponse, in *api.ValidateSubscriptionGoogleRequest) error) error

func (*RuntimeGoInitializer) RegisterAfterWriteLeaderboardRecord

func (ri *RuntimeGoInitializer) RegisterAfterWriteLeaderboardRecord(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.AddGroupUsersRequest) (*api.AddGroupUsersRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateApple

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.AuthenticateEmailRequest) (*api.AuthenticateEmailRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateEvm

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateEvm(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.AuthenticateEvmRequest) (*api.AuthenticateEvmRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateFacebook

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

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateFacebookInstantGame

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateFacebookInstantGame(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.AuthenticateSteamRequest) (*api.AuthenticateSteamRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateTelegram

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateTelegram(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.AuthenticateTelegramRequest) (*api.AuthenticateTelegramRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeAuthenticateUA

func (ri *RuntimeGoInitializer) RegisterBeforeAuthenticateUA(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.AuthenticateUA) (*api.AuthenticateUA, error)) error

func (*RuntimeGoInitializer) RegisterBeforeBanGroupUsers

func (ri *RuntimeGoInitializer) RegisterBeforeBanGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.CreateGroupRequest) (*api.CreateGroupRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeDeleteAccount

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

func (*RuntimeGoInitializer) RegisterBeforeDeleteFriends

func (ri *RuntimeGoInitializer) RegisterBeforeDeleteFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.DeleteLeaderboardRecordRequest) (*api.DeleteLeaderboardRecordRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeDeleteNotifications

func (ri *RuntimeGoInitializer) RegisterBeforeDeleteNotifications(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, in *api.DeleteStorageObjectsRequest) (*api.DeleteStorageObjectsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeDeleteTournamentRecord

func (ri *RuntimeGoInitializer) RegisterBeforeDeleteTournamentRecord(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.DeleteTournamentRecordRequest) (*api.DeleteTournamentRecordRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeDemoteGroupUsers

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

func (*RuntimeGoInitializer) RegisterBeforeEvent

func (ri *RuntimeGoInitializer) RegisterBeforeEvent(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule) error) error

func (*RuntimeGoInitializer) RegisterBeforeGetMatchmakerStats

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

func (*RuntimeGoInitializer) RegisterBeforeGetSubscription

func (ri *RuntimeGoInitializer) RegisterBeforeGetSubscription(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.GetSubscriptionRequest) (*api.GetSubscriptionRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeGetUsers

func (ri *RuntimeGoInitializer) RegisterBeforeGetUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, in *api.ImportFacebookFriendsRequest) (*api.ImportFacebookFriendsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeImportSteamFriends

func (ri *RuntimeGoInitializer) RegisterBeforeImportSteamFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.ImportSteamFriendsRequest) (*api.ImportSteamFriendsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeJoinGroup

func (ri *RuntimeGoInitializer) RegisterBeforeJoinGroup(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.LeaveGroupRequest) (*api.LeaveGroupRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeLinkApple

func (ri *RuntimeGoInitializer) RegisterBeforeLinkApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.LinkFacebookRequest) (*api.LinkFacebookRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeLinkFacebookInstantGame

func (ri *RuntimeGoInitializer) RegisterBeforeLinkFacebookInstantGame(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.LinkSteamRequest) (*api.LinkSteamRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListChannelMessages

func (ri *RuntimeGoInitializer) RegisterBeforeListChannelMessages(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, in *api.ListFriendsRequest) (*api.ListFriendsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListFriendsOfFriends

func (ri *RuntimeGoInitializer) RegisterBeforeListFriendsOfFriends(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.ListFriendsOfFriendsRequest) (*api.ListFriendsOfFriendsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListGroupUsers

func (ri *RuntimeGoInitializer) RegisterBeforeListGroupUsers(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.ListStorageObjectsRequest) (*api.ListStorageObjectsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListSubscriptions

func (ri *RuntimeGoInitializer) RegisterBeforeListSubscriptions(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.ListSubscriptionsRequest) (*api.ListSubscriptionsRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeListTournamentRecords

func (ri *RuntimeGoInitializer) RegisterBeforeListTournamentRecords(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, envelope *rtapi.Envelope) (*rtapi.Envelope, error)) error

func (*RuntimeGoInitializer) RegisterBeforeSessionLogout

func (ri *RuntimeGoInitializer) RegisterBeforeSessionLogout(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.SessionLogoutRequest) (*api.SessionLogoutRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeSessionRefresh

func (ri *RuntimeGoInitializer) RegisterBeforeSessionRefresh(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.SessionRefreshRequest) (*api.SessionRefreshRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeUnlinkApple

func (ri *RuntimeGoInitializer) RegisterBeforeUnlinkApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.AccountFacebook) (*api.AccountFacebook, error)) error

func (*RuntimeGoInitializer) RegisterBeforeUnlinkFacebookInstantGame

func (ri *RuntimeGoInitializer) RegisterBeforeUnlinkFacebookInstantGame(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.UpdateGroupRequest) (*api.UpdateGroupRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeValidatePurchaseApple

func (ri *RuntimeGoInitializer) RegisterBeforeValidatePurchaseApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.ValidatePurchaseAppleRequest) (*api.ValidatePurchaseAppleRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeValidatePurchaseFacebookInstant

func (ri *RuntimeGoInitializer) RegisterBeforeValidatePurchaseFacebookInstant(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.ValidatePurchaseFacebookInstantRequest) (*api.ValidatePurchaseFacebookInstantRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeValidatePurchaseGoogle

func (ri *RuntimeGoInitializer) RegisterBeforeValidatePurchaseGoogle(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.ValidatePurchaseGoogleRequest) (*api.ValidatePurchaseGoogleRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeValidatePurchaseHuawei

func (ri *RuntimeGoInitializer) RegisterBeforeValidatePurchaseHuawei(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.ValidatePurchaseHuaweiRequest) (*api.ValidatePurchaseHuaweiRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeValidateSubscriptionApple

func (ri *RuntimeGoInitializer) RegisterBeforeValidateSubscriptionApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.ValidateSubscriptionAppleRequest) (*api.ValidateSubscriptionAppleRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeValidateSubscriptionGoogle

func (ri *RuntimeGoInitializer) RegisterBeforeValidateSubscriptionGoogle(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, in *api.ValidateSubscriptionGoogleRequest) (*api.ValidateSubscriptionGoogleRequest, error)) error

func (*RuntimeGoInitializer) RegisterBeforeWriteLeaderboardRecord

func (ri *RuntimeGoInitializer) RegisterBeforeWriteLeaderboardRecord(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, 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.LayerGModule, in *api.WriteTournamentRecordRequest) (*api.WriteTournamentRecordRequest, error)) error

func (*RuntimeGoInitializer) RegisterEvent

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) RegisterFleetManager

func (ri *RuntimeGoInitializer) RegisterFleetManager(fleetManager runtime.FleetManagerInitializer) error

func (*RuntimeGoInitializer) RegisterLeaderboardReset

func (ri *RuntimeGoInitializer) RegisterLeaderboardReset(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, leaderboard *api.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.LayerGModule) (runtime.Match, error)) error

func (*RuntimeGoInitializer) RegisterMatchmakerMatched

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

func (*RuntimeGoInitializer) RegisterMatchmakerOverride

func (ri *RuntimeGoInitializer) RegisterMatchmakerOverride(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, matches [][]runtime.MatchmakerEntry) [][]runtime.MatchmakerEntry) error

func (*RuntimeGoInitializer) RegisterPurchaseNotificationApple

func (ri *RuntimeGoInitializer) RegisterPurchaseNotificationApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, purchase *api.ValidatedPurchase, providerPayload string) error) error

func (*RuntimeGoInitializer) RegisterPurchaseNotificationGoogle

func (ri *RuntimeGoInitializer) RegisterPurchaseNotificationGoogle(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, purchase *api.ValidatedPurchase, providerPayload 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.LayerGModule, payload string) (string, error)) error

func (*RuntimeGoInitializer) RegisterShutdown

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

func (*RuntimeGoInitializer) RegisterStorageIndex

func (ri *RuntimeGoInitializer) RegisterStorageIndex(name, collection, key string, fields []string, sortableFields []string, maxEntries int, indexOnly bool) error

func (*RuntimeGoInitializer) RegisterStorageIndexFilter

func (ri *RuntimeGoInitializer) RegisterStorageIndexFilter(indexName string, fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, write *runtime.StorageWrite) bool) error

func (*RuntimeGoInitializer) RegisterSubscriptionNotificationApple

func (ri *RuntimeGoInitializer) RegisterSubscriptionNotificationApple(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, subscription *api.ValidatedSubscription, providerPayload string) error) error

func (*RuntimeGoInitializer) RegisterSubscriptionNotificationGoogle

func (ri *RuntimeGoInitializer) RegisterSubscriptionNotificationGoogle(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, subscription *api.ValidatedSubscription, providerPayload string) error) error

func (*RuntimeGoInitializer) RegisterTournamentEnd

func (ri *RuntimeGoInitializer) RegisterTournamentEnd(fn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.LayerGModule, 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.LayerGModule, tournament *api.Tournament, end, reset int64) error) error

type RuntimeGoLayerGModule

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

func NewRuntimeGoLayerGModule

func NewRuntimeGoLayerGModule(logger *zap.Logger, db *sql.DB, protojsonMarshaler *protojson.MarshalOptions, config Config, socialClient *social.Client, leaderboardCache LeaderboardCache, leaderboardRankCache LeaderboardRankCache, leaderboardScheduler LeaderboardScheduler, sessionRegistry SessionRegistry, sessionCache SessionCache, statusRegistry StatusRegistry, matchRegistry MatchRegistry, tracker Tracker, metrics Metrics, streamManager StreamManager, router MessageRouter, storageIndex StorageIndex, activeCache ActiveTokenCache) *RuntimeGoLayerGModule

func (*RuntimeGoLayerGModule) AccountDeleteId

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

@group accounts @summary Delete an account by user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) User ID for the account to be deleted. Must be valid UUID. @param recorded(type=bool, default=false) Whether to record this deletion in the database. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AccountExportId

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

@group accounts @summary Export account information for a specified user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) User ID for the account to be exported. Must be valid UUID. @return export(string) Account information for the provided user ID, in JSON format. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AccountGetId

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

@group accounts @summary Fetch account information by user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) User ID to fetch information for. Must be valid UUID. @return account(*api.Account) All account information including wallet, device IDs and more. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AccountUpdateId

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

@group accounts @summary Update an account by user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) User ID for which the information is to be updated. Must be valid UUID. @param metadata(type=map[string]interface{}) The metadata to update for this account. @param username(type=string) Username to be set. Must be unique. Use "" if it is not being updated. @param displayName(type=string) Display name to be updated. Use "" if it is not being updated. @param timezone(type=string) Timezone to be updated. Use "" if it is not being updated. @param location(type=string) Location to be updated. Use "" if it is not being updated. @param language(type=string) Lang tag to be updated. Use "" if it is not being updated. @param avatarUrl(type=string) User's avatar URL. Use "" if it is not being updated. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AccountsGetId

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

@group accounts @summary Fetch information for multiple accounts by user IDs. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userIds(type=[]string) Array of user IDs to fetch information for. Must be valid UUID. @return account([]*api.Account) An array of accounts. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AuthenticateApple

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

@group authenticate @summary Authenticate user and create a session token using an Apple sign in token. @param ctx(type=context.Context) The context object represents information about the server and requester. @param token(type=string) Apple sign in token. @param username(type=string) The user's username. If left empty, one is generated. @param create(type=bool) Create user if one didn't exist previously. @return userID(string) The user ID of the authenticated user. @return username(string) The username of the authenticated user. @return create(bool) Value indicating if this account was just created or already existed. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AuthenticateCustom

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

@group authenticate @summary Authenticate user and create a session token using a custom authentication managed by an external service or source not already supported by LayerG. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) Custom ID to use to authenticate the user. Must be between 6-128 characters. @param username(type=string, optional=true) The user's username. If left empty, one is generated. @param create(type=bool) Create user if one didn't exist previously. @return userID(string) The user ID of the authenticated user. @return username(string) The username of the authenticated user. @return create(bool) Value indicating if this account was just created or already existed. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AuthenticateDevice

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

@group authenticate @summary Authenticate user and create a session token using a device identifier. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) Device ID to use to authenticate the user. Must be between 1-128 characters. @param username(type=string, optional=true) The user's username. If left empty, one is generated. @param create(type=bool, optional=true, default=true) Create user if one didn't exist previously. @return userID(string) The user ID of the authenticated user. @return username(string) The username of the authenticated user. @return create(bool) Value indicating if this account was just created or already existed. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AuthenticateEmail

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

@group authenticate @summary Authenticate user and create a session token using an email address and password. @param ctx(type=context.Context) The context object represents information about the server and requester. @param email(type=string) Email address to use to authenticate the user. Must be between 10-255 characters. @param password(type=string) Password to set. Must be longer than 8 characters. @param username(type=string, optional=true) The user's username. If left empty, one is generated. @param create(type=bool, optional=true, default=true) Create user if one didn't exist previously. @return userID(string) The user ID of the authenticated user. @return username(string) The username of the authenticated user. @return create(bool) Value indicating if this account was just created or already existed. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AuthenticateEvm

func (n *RuntimeGoLayerGModule) AuthenticateEvm(ctx context.Context, evmAddress, signature, username string, create bool) (string, string, bool, error)

@group authenticate @summary Authenticate user and create a session token using a Evm Address and signature. @param ctx(type=context.Context) The context object represents information about the server and requester. @param evmAddress(type=string) Wallet address. @param signature(type=string) signature of the wallet. @param username(type=string) The user's username. If left empty, one is generated. @param create(type=bool) Create user if one didn't exist previously. @return userID(string) The user ID of the authenticated user. @return username(string) The username of the authenticated user. @return create(bool) Value indicating if this account was just created or already existed. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AuthenticateFacebook

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

@group authenticate @summary Authenticate user and create a session token using a Facebook account token. @param ctx(type=context.Context) The context object represents information about the server and requester. @param token(type=string) Facebook OAuth or Limited Login (JWT) access token. @param import(type=bool) Whether to automatically import Facebook friends after authentication. @param username(type=string, optional=true) The user's username. If left empty, one is generated. @param create(type=bool) Create user if one didn't exist previously. @return userID(string) The user ID of the authenticated user. @return username(string) The username of the authenticated user. @return create(bool) Value indicating if this account was just created or already existed. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AuthenticateFacebookInstantGame

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

@group authenticate @summary Authenticate user and create a session token using a Facebook Instant Game. @param ctx(type=context.Context) The context object represents information about the server and requester. @param playerInfo(type=string) Facebook Player info. @param username(type=string, optional=true) The user's username. If left empty, one is generated. @param create(type=bool) Create user if one didn't exist previously. @return userID(string) The user ID of the authenticated user. @return username(string) The username of the authenticated user. @return create(bool) Value indicating if this account was just created or already existed. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AuthenticateGameCenter

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

@group authenticate @summary Authenticate user and create a session token using Apple Game Center credentials. @param ctx(type=context.Context) The context object represents information about the server and requester. @param playerId(type=string) PlayerId provided by GameCenter. @param bundleId(type=string) BundleId of your app on iTunesConnect. @param timestamp(type=int64) Timestamp at which Game Center authenticated the client and issued a signature. @param salt(type=string) A random string returned by Game Center authentication on client. @param signature(type=string) A signature returned by Game Center authentication on client. @param publicKeyUrl(type=string) A URL to the public key returned by Game Center authentication on client. @param username(type=string, optional=true) The user's username. If left empty, one is generated. @param create(type=bool) Create user if one didn't exist previously. @return userID(string) The user ID of the authenticated user. @return username(string) The username of the authenticated user. @return create(bool) Value indicating if this account was just created or already existed. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AuthenticateGoogle

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

@group authenticate @summary Authenticate user and create a session token using a Google ID token. @param ctx(type=context.Context) The context object represents information about the server and requester. @param token(type=string) Google OAuth access token. @param username(type=string) The user's username. If left empty, one is generated. @param create(type=bool) Create user if one didn't exist previously. @return userID(string) The user ID of the authenticated user. @return username(string) The username of the authenticated user. @return create(bool) Value indicating if this account was just created or already existed. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AuthenticateSteam

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

@group authenticate @summary Authenticate user and create a session token using a Steam account token. @param ctx(type=context.Context) The context object represents information about the server and requester. @param token(type=string) Steam token. @param username(type=string, optional=true) The user's username. If left empty, one is generated. @param create(type=bool, optional=true, default=true) Create user if one didn't exist previously. @return userID(string) The user ID of the authenticated user. @return username(string) The username of the authenticated user. @return create(bool) Value indicating if this account was just created or already existed. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AuthenticateTelegram

func (n *RuntimeGoLayerGModule) AuthenticateTelegram(ctx context.Context, telegramId, telegramAppData, username string, create bool) (string, string, bool, error)

@group authenticate @summary Authenticate user and create a session token using a Telegram ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param telegramId(type=string) Tegegram ID. @param telegramAppData(type=string) The user's telegram App Data @param username(type=string) The user's username. If left empty, one is generated. @param create(type=bool) Create user if one didn't exist previously. @return userID(string) The user ID of the authenticated user. @return username(string) The username of the authenticated user. @return create(bool) Value indicating if this account was just created or already existed. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) AuthenticateTokenGenerate

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

@group authenticate @summary Generate a LayerG session token from a user ID. @param userId(type=string) User ID to use to generate the token. @param username(type=string, optional=true) The user's username. If left empty, one is generated. @param expiresAt(type=int64, optional=true) UTC time in seconds when the token must expire. Defaults to server configured expiry time. @param vars(type=map[string]string, optional=true) Extra information that will be bundled in the session token. @return token(string) The LayerG session token. @return validity(int64) The period for which the token remains valid. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) ChannelIdBuild

func (n *RuntimeGoLayerGModule) ChannelIdBuild(ctx context.Context, senderId, target string, chanType runtime.ChannelType) (string, error)

@group chat @summary Create a channel identifier to be used in other runtime calls. Does not create a channel. @param ctx(type=context.Context) The context object represents information about the server and requester. @param senderId(type=string) UserID of the message sender (when applicable). An empty string defaults to the system user. @param target(type=string) Can be the room name, group identifier, or another username. @param chanType(type=runtime.ChannelType) The type of channel, either Room (1), Direct (2), or Group (3). @return channelId(string) The generated ID representing a channel. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) ChannelMessageRemove

func (n *RuntimeGoLayerGModule) ChannelMessageRemove(ctx context.Context, channelId, messageId string, senderId, senderUsername string, persist bool) (*rtapi.ChannelMessageAck, error)

@group chat @summary Remove a message on a realtime chat channel. @param ctx(type=context.Context) The context object represents information about the server and requester. @param channelId(type=string) The ID of the channel to remove the message on. @param messageId(type=string) The ID of the message to remove. @param senderId(type=string, optional=true) The UUID for the sender of this message. If left empty, it will be assumed that it is a system message. @param senderUsername(type=string, optional=true) The username of the user who sent this message. If left empty, it will be assumed that it is a system message. @param persist(type=bool) Whether to record this in the channel history. @return channelMessageRemove(*rtapi.ChannelMessageAck) Message removed ack containing the following variables: 'channelId', 'contentStr', 'senderId', 'senderUsername', and 'persist'. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) ChannelMessageSend

func (n *RuntimeGoLayerGModule) ChannelMessageSend(ctx context.Context, channelId string, content map[string]interface{}, senderId, senderUsername string, persist bool) (*rtapi.ChannelMessageAck, error)

@group chat @summary Send a message on a realtime chat channel. @param ctx(type=context.Context) The context object represents information about the server and requester. @param channelId(type=string) The ID of the channel to send the message on. @param content(type=map[string]interface{}) Message content. @param senderId(type=string, optional=true) The UUID for the sender of this message. If left empty, it will be assumed that it is a system message. @param senderUsername(type=string, optional=true) The username of the user to send this message as. If left empty, it will be assumed that it is a system message. @param persist(type=bool) Whether to record this message in the channel history. @return channelMessageSend(*rtapi.ChannelMessageAck) Message sent ack containing the following variables: 'channelId', 'contentStr', 'senderId', 'senderUsername', and 'persist'. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) ChannelMessageUpdate

func (n *RuntimeGoLayerGModule) ChannelMessageUpdate(ctx context.Context, channelId, messageId string, content map[string]interface{}, senderId, senderUsername string, persist bool) (*rtapi.ChannelMessageAck, error)

@group chat @summary Update a message on a realtime chat channel. @param ctx(type=context.Context) The context object represents information about the server and requester. @param channelId(type=string) The ID of the channel to send the message on. @param messageId(type=string) The ID of the message to update. @param content(type=map[string]interface{}) Message content. @param senderId(type=string, optional=true) The UUID for the sender of this message. If left empty, it will be assumed that it is a system message. @param senderUsername(type=string, optional=true) The username of the user to send this message as. If left empty, it will be assumed that it is a system message. @param persist(type=bool) Whether to record this message in the channel history. @return channelMessageUpdate(*rtapi.ChannelMessageAck) Message updated ack containing the following variables: 'channelId', 'contentStr', 'senderId', 'senderUsername', and 'persist'. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) ChannelMessagesList

func (n *RuntimeGoLayerGModule) ChannelMessagesList(ctx context.Context, channelId string, limit int, forward bool, cursor string) ([]*api.ChannelMessage, string, string, error)

@group chat @summary List messages from a realtime chat channel. @param ctx(type=context.Context) The context object represents information about the server and requester. @param channelId(type=string) The ID of the channel to list messages from. @param limit(type=int) The number of messages to return per page. @param forward(type=bool) Whether to list messages from oldest to newest, or newest to oldest. @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. @return channelMessageList([]*rtapi.ChannelMessage) Messages from the specified channel. @return nextCursor(string) Cursor for the next page of messages, if any. @return prevCursor(string) Cursor for the previous page of messages, if any. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) CronNext

func (n *RuntimeGoLayerGModule) CronNext(expression string, timestamp int64) (int64, error)

@group utils @summary Parses a CRON expression and a timestamp in UTC seconds, and returns the next matching timestamp in UTC seconds. @param expression(type=string) A valid CRON expression in standard format, for example "0 0 * * *" (meaning at midnight). @param timestamp(type=int64) A time value expressed as UTC seconds. @return nextTs(int64) The next UTC seconds timestamp (number) that matches the given CRON expression, and is immediately after the given timestamp. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) CronPrev

func (n *RuntimeGoLayerGModule) CronPrev(expression string, timestamp int64) (int64, error)

@group utils @summary Parses a CRON expression and a timestamp in UTC seconds, and returns the previous matching timestamp in UTC seconds. @param expression(type=string) A valid CRON expression in standard format, for example "0 0 * * *" (meaning at midnight). @param timestamp(type=int64) A time value expressed as UTC seconds. @return prevTs(int64) The previous UTC seconds timestamp (number) that matches the given CRON expression, and is immediately before the given timestamp. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) Event

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

@group events @summary Generate an event. @param ctx(type=context.Context) The context object represents information about the server and requester. @param evt(type=*api.Event) The event to be generated. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) FriendsAdd

func (n *RuntimeGoLayerGModule) FriendsAdd(ctx context.Context, userID string, username string, ids []string, usernames []string) error

@group friends @summary Add friends to a user. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The ID of the user to whom you want to add friends. @param username(type=string) The name of the user to whom you want to add friends. @param ids(type=[]string) The IDs of the users you want to add as friends. @param usernames(type=[]string) The usernames of the users you want to add as friends. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) FriendsBlock

func (n *RuntimeGoLayerGModule) FriendsBlock(ctx context.Context, userID string, username string, ids []string, usernames []string) error

@group friends @summary Block friends for a user. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The ID of the user for whom you want to block friends. @param username(type=string) The name of the user for whom you want to block friends. @param ids(type=[]string) The IDs of the users you want to block as friends. @param usernames(type=[]string) The usernames of the users you want to block as friends. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) FriendsDelete

func (n *RuntimeGoLayerGModule) FriendsDelete(ctx context.Context, userID string, username string, ids []string, usernames []string) error

@group friends @summary Delete friends from a user. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The ID of the user from whom you want to delete friends. @param username(type=string) The name of the user from whom you want to delete friends. @param ids(type=[]string) The IDs of the users you want to delete as friends. @param usernames(type=[]string) The usernames of the users you want to delete as friends. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) FriendsList

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

@group friends @summary List all friends, invites, invited, and blocked which belong to a user. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The ID of the user whose friends, invites, invited, and blocked you want to list. @param limit(type=int) The number of friends to retrieve in this page of results. No more than 100 limit allowed per result. @param state(type=int, optional=true) The state of the friendship with the user. If unspecified this returns friends in all states for the user. @param cursor(type=string) Pagination cursor from previous result. Set to "" to start fetching from the beginning. @return friends([]*api.Friend) The user information for users that are friends of the current user. @return cursor(string) An optional next page cursor that can be used to retrieve the next page of records (if any). Will be set to "" or nil when fetching last available page. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) FriendsOfFriendsList

func (n *RuntimeGoLayerGModule) FriendsOfFriendsList(ctx context.Context, userID string, limit int, cursor string) ([]*api.FriendsOfFriendsList_FriendOfFriend, string, error)

@group friends @summary List friends of friends. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The ID of the user whose friends of friends you want to list. @param limit(type=int) The number of friends of friends to retrieve in this page of results. No more than 100 limit allowed per result. @param cursor(type=string) Pagination cursor from previous result. Set to "" to start fetching from the beginning. @return friends([]*api.FriendsOfFriendsList_FriendOfFriend) The user information for users that are friends of friends the current user. @return cursor(string) An optional next page cursor that can be used to retrieve the next page of records (if any). Will be set to "" or nil when fetching last available page. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GetFleetManager

func (n *RuntimeGoLayerGModule) GetFleetManager() runtime.FleetManager

func (*RuntimeGoLayerGModule) GetNFTs

@nft @summary Get NFTs from core server. @param ctx(type=context.Context) The context object represents information about the server and requester. @param token(type=string) server token @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GetSatori

func (n *RuntimeGoLayerGModule) GetSatori() runtime.Satori

@group satori @summary Get the Satori client. @return satori(runtime.Satori) The Satori client.

func (*RuntimeGoLayerGModule) GroupCreate

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

@group groups @summary Setup a group with various configuration settings. The group will be created if they don't exist or fail if the group name is taken. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be associated as the group superadmin. @param name(type=string) Group name, must be unique. @param creatorId(type=string, optional=true) The user ID to be associated as creator. If not set or nil/null, system user will be set. @param langTag(type=string, optional=true, default="en") Group language. @param description(type=string, optional=true) Group description, can be left empty as nil/null. @param avatarUrl(type=string, optional=true) URL to the group avatar, can be left empty as nil/null. @param open(type=bool, optional=true, default=false) Whether the group is for anyone to join, or members will need to send invitations to join. @param metadata(type=map[string]interface{}, optional=true) Custom information to store for this group. Can be left empty as nil/null. @param maxCount(type=int, default=100) Maximum number of members to have in the group. @return createGroup(*api.Group) The groupId of the newly created group. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GroupDelete

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

@group groups @summary Delete a group. @param ctx(type=context.Context) The context object represents information about the server and requester. @param groupId(type=string) The ID of the group to delete. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GroupUpdate

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

@group groups @summary Update a group with various configuration settings. The group which is updated can change some or all of its fields. @param ctx(type=context.Context) The context object represents information about the server and requester. @param groupId(type=string) The ID of the group to update. @param userId(type=string) User ID calling the update operation for permission checking. Set as empty string to enact the changes as the system user. @param name(type=string) Group name, can be empty if not changed. @param creatorId(type=string) The user ID to be associated as creator. Can be empty if not changed. @param langTag(type=string) Group language. Empty if not updated. @param description(type=string) Group description, can be left empty if not updated. @param avatarUrl(type=string) URL to the group avatar, can be left empty if not updated. @param open(type=bool) Whether the group is for anyone to join or not. @param metadata(type=map[string]interface{}) Custom information to store for this group. Use nil if field is not being updated. @param maxCount(type=int) Maximum number of members to have in the group. Use 0, nil/null if field is not being updated. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GroupUserJoin

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

@group groups @summary Join a group for a particular user. @param ctx(type=context.Context) The context object represents information about the server and requester. @param groupId(type=string) The ID of the group to join. @param userId(type=string) The user ID to add to this group. @param username(type=string) The username of the user to add to this group. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GroupUserLeave

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

@group groups @summary Leave a group for a particular user. @param ctx(type=context.Context) The context object represents information about the server and requester. @param groupId(type=string) The ID of the group to leave. @param userId(type=string) The user ID to remove from this group. @param username(type=string) The username of the user to remove from this group. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GroupUsersAdd

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

@group groups @summary Add users to a group. @param ctx(type=context.Context) The context object represents information about the server and requester. @param callerId(type=string, optional=true) User ID of the caller, will apply permissions checks of the user. If empty defaults to system user and permissions are bypassed. @param groupId(type=string) The ID of the group to add users to. @param userIds(type=[]string) Table array of user IDs to add to this group. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GroupUsersBan

func (n *RuntimeGoLayerGModule) GroupUsersBan(ctx context.Context, callerID, groupID string, userIDs []string) error

@group groups @summary Ban users from a group. @param ctx(type=context.Context) The context object represents information about the server and requester. @param callerId(type=string, optional=true) User ID of the caller, will apply permissions checks of the user. If empty defaults to system user and permissions are bypassed. @param groupId(type=string) The ID of the group to ban users from. @param userIds(type=[]string) Table array of user IDs to ban from this group. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GroupUsersDemote

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

@group groups @summary Demote users in a group. @param ctx(type=context.Context) The context object represents information about the server and requester. @param callerId(type=string, optional=true) User ID of the caller, will apply permissions checks of the user. If empty defaults to system user and permissions are bypassed. @param groupId(type=string) The ID of the group whose members are being demoted. @param userIds(type=[]string) Table array of user IDs to demote. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GroupUsersKick

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

@group groups @summary Kick users from a group. @param ctx(type=context.Context) The context object represents information about the server and requester. @param callerId(type=string, optional=true) User ID of the caller, will apply permissions checks of the user. If empty defaults to system user and permissions are bypassed. @param groupId(type=string) The ID of the group to kick users from. @param userIds(type=[]string) Table array of user IDs to kick. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GroupUsersList

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

@group groups @summary List all members, admins and superadmins which belong to a group. This also lists incoming join requests. @param ctx(type=context.Context) The context object represents information about the server and requester. @param groupId(type=string) The ID of the group to list members for. @param limit(type=int) Return only the required number of users denoted by this limit value. @param state(type=int) Return only the users matching this state value, '0' for superadmins for example. @param cursor(type=string) Pagination cursor from previous result. Don't set to start fetching from the beginning. @return groupUsers([]*api.GroupUserList_GroupUser) The user information for members, admins and superadmins for the group. Also users who sent a join request. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GroupUsersPromote

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

@group groups @summary Promote users in a group. @param ctx(type=context.Context) The context object represents information about the server and requester. @param callerId(type=string, optional=true) User ID of the caller, will apply permissions checks of the user. If empty defaults to system user and permissions are bypassed. @param groupId(type=string) The ID of the group whose members are being promoted. @param userIds(type=[]string) Table array of user IDs to promote. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GroupsGetId

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

@group groups @summary Fetch one or more groups by their ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param groupIds(type=[]string) An array of strings of the IDs for the groups to get. @return getGroups([]*api.Group) An array of groups with their fields. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GroupsGetRandom

func (n *RuntimeGoLayerGModule) GroupsGetRandom(ctx context.Context, count int) ([]*api.Group, error)

@group groups @summary Fetch one or more groups randomly. @param ctx(type=context.Context) The context object represents information about the server and requester. @param count(type=int) The number of groups to fetch. @return users([]*api.Group) A list of group record objects. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) GroupsList

func (n *RuntimeGoLayerGModule) GroupsList(ctx context.Context, name, langTag string, members *int, open *bool, limit int, cursor string) ([]*api.Group, string, error)

@group groups @summary Find groups based on the entered criteria. @param ctx(type=context.Context) The context object represents information about the server and requester. @param name(type=string, optional=true) Search for groups that contain this value in their name. Cannot be combined with any other filter. @param langTag(type=string, optional=true) Filter based upon the entered language tag. @param members(type=int, optional=true) Search by number of group members. @param open(type=bool, optional=true) Filter based on whether groups are Open or Closed. @param limit(type=int, optional=true) Return only the required number of groups denoted by this limit value. @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. @return groups([]*api.Group) A list of groups. @return cursor(string) An optional next page cursor that can be used to retrieve the next page of records (if any). Will be set to "" or nil when fetching last available page. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LeaderboardCreate

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

@group leaderboards @summary Setup a new dynamic leaderboard with the specified ID and various configuration settings. The leaderboard will be created if it doesn't already exist, otherwise its configuration will not be updated. @param ctx(type=context.Context) The context object represents information about the server and requester. @param leaderboardID(type=string) The unique identifier for the new leaderboard. This is used by clients to submit scores. @param authoritative(type=bool, default=false) Mark the leaderboard as authoritative which ensures updates can only be made via the Go runtime. No client can submit a score directly. @param sortOrder(type=string, default="desc") The sort order for records in the leaderboard. Possible values are "asc" or "desc". @param operator(type=string, default="best") The operator that determines how scores behave when submitted. Possible values are "best", "set", or "incr". @param resetSchedule(type=string) The cron format used to define the reset schedule for the leaderboard. This controls when a leaderboard is reset and can be used to power daily/weekly/monthly leaderboards. @param metadata(type=map[string]interface{}) The metadata you want associated to the leaderboard. Some good examples are weather conditions for a racing game. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LeaderboardDelete

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

@group leaderboards @summary Delete a leaderboard and all scores that belong to it. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The unique identifier for the leaderboard to delete. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LeaderboardList

func (n *RuntimeGoLayerGModule) LeaderboardList(limit int, cursor string) (*api.LeaderboardList, error)

@group leaderboards @summary Find leaderboards which have been created on the server. Leaderboards can be filtered with categories. @param limit(type=int) Return only the required number of leaderboards denoted by this limit value. @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. @return leaderboardList(*api.LeaderboardList) A list of leaderboard results and possibly a cursor. If cursor is empty/nil there are no further results. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LeaderboardRanksDisable

func (n *RuntimeGoLayerGModule) LeaderboardRanksDisable(ctx context.Context, id string) error

@group leaderboards @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The leaderboard id. @return error(error) An optional error value if an error occurred. @summary Disable a leaderboard rank cache freeing its allocated resources. If already disabled is a NOOP.

func (*RuntimeGoLayerGModule) LeaderboardRecordDelete

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

@group leaderboards @summary Remove an owner's record from a leaderboard, if one exists. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The unique identifier for the leaderboard to delete from. @param owner(type=string) The owner of the score to delete. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LeaderboardRecordWrite

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

@group leaderboards @summary Use the preconfigured operator for the given leaderboard to submit a score for a particular user. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The unique identifier for the leaderboard to submit to. @param owner(type=string) The owner of this score submission. @param username(type=string) The owner username of this score submission, if it's a user. @param score(type=int64) The score to submit. @param subscore(type=int64, optional=true) A secondary subscore parameter for the submission. @param metadata(type=map[string]interface{}, optional=true) The metadata you want associated to this submission. Some good examples are weather conditions for a racing game. @param overrideOperator(type=*int) An override operator for the new record. The accepted values include: 0 (no override), 1 (best), 2 (set), 3 (incr), 4 (decr). Passing nil is the same as passing a pointer to 0 (no override), which uses the default leaderboard operator. @return record(*api.LeaderboardRecord) The newly created leaderboard record. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LeaderboardRecordsHaystack

func (n *RuntimeGoLayerGModule) LeaderboardRecordsHaystack(ctx context.Context, id, ownerID string, limit int, cursor string, expiry int64) (*api.LeaderboardRecordList, error)

@group leaderboards @summary Fetch the list of leaderboard records around the owner. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The ID of the leaderboard to list records for. @param ownerId(type=string) The owner ID around which to show records. @param limit(type=int) Return only the required number of leaderboard records denoted by this limit value. Between 1-100. @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. @param expiry(type=int64) Time since epoch in seconds. Must be greater than 0. @return leaderboardRecordsHaystack(*api.LeaderboardRecordList) A list of leaderboard records and possibly a cursor. If cursor is empty/nil there are no further results. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LeaderboardRecordsList

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

@group leaderboards @summary List records on the specified leaderboard, optionally filtering to only a subset of records by their owners. Records will be listed in the preconfigured leaderboard sort order. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The unique identifier for the leaderboard to list. @param owners(type=[]string) Array of owners to filter to. @param limit(type=int) The maximum number of records to return (Max 10,000). @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. @param overrideExpiry(type=int) Records with expiry in the past are not returned unless within this defined limit. Must be equal or greater than 0. @return records([]*api.LeaderboardRecord) A page of leaderboard records. @return ownerRecords([]*api.LeaderboardRecord) A list of owner leaderboard records (empty if the owners input parameter is not set). @return nextCursor(string) An optional next page cursor that can be used to retrieve the next page of records (if any). @return prevCursor(string) An optional previous page cursor that can be used to retrieve the previous page of records (if any). @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LeaderboardRecordsListCursorFromRank

func (n *RuntimeGoLayerGModule) LeaderboardRecordsListCursorFromRank(id string, rank, expiry int64) (string, error)

@group leaderboards @summary Build a cursor to be used with leaderboardRecordsList to fetch records starting at a given rank. Only available if rank cache is not disabled for the leaderboard. @param leaderboardID(type=string) The unique identifier of the leaderboard. @param rank(type=int64) The rank to start listing leaderboard records from. @param overrideExpiry(type=int64) Records with expiry in the past are not returned unless within this defined limit. Must be equal or greater than 0. @return leaderboardListCursor(string) A string cursor to be used with leaderboardRecordsList. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LeaderboardsGetId

func (n *RuntimeGoLayerGModule) LeaderboardsGetId(ctx context.Context, IDs []string) ([]*api.Leaderboard, error)

@group leaderboards @summary Fetch one or more leaderboards by ID. @param ids(type=[]string) The table array of leaderboard ids. @return leaderboardsGet([]*api.Leaderboard) The leaderboard records according to ID. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LinkApple

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

@group authenticate @summary Link Apple authentication to a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be linked. @param token(type=string) Apple sign in token. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LinkCustom

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

@group authenticate @summary Link custom authentication to a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be linked. @param customId(type=string) Custom ID to be linked to the user. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LinkDevice

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

@group authenticate @summary Link device authentication to a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be linked. @param deviceId(type=string) Device ID to be linked to the user. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LinkEmail

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

@group authenticate @summary Link email authentication to a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be linked. @param email(type=string) Authentication email to be linked to the user. @param password(type=string) Password to set. Must be longer than 8 characters. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LinkFacebook

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

@group authenticate @summary Link Facebook authentication to a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be linked. @param username(type=string, optional=true) If left empty, one is generated. @param token(type=string) Facebook OAuth or Limited Login (JWT) access token. @param importFriends(type=bool) Whether to automatically import Facebook friends after authentication. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LinkFacebookInstantGame

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

@group authenticate @summary Link Facebook Instant Game authentication to a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be linked. @param signedPlayerInfo(type=string) Facebook player info. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LinkGameCenter

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

@group authenticate @summary Link Apple Game Center authentication to a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be linked. @param playerId(type=string) Player ID provided by Game Center. @param bundleId(type=string) Bundle ID of your app on iTunesConnect. @param timestamp(type=int64) Timestamp at which Game Center authenticated the client and issued a signature. @param salt(type=string) A random string returned by Game Center authentication on client. @param signature(type=string) A signature returned by Game Center authentication on client. @param publicKeyUrl(type=string) A URL to the public key returned by Game Center authentication on client. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LinkGoogle

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

@group authenticate @summary Link Google authentication to a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be linked. @param token(type=string) Google OAuth access token. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) LinkSteam

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

@group authenticate @summary Link Steam authentication to a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be linked. @param username(type=string, optional=true) If left empty, one is generated. @param token(type=string) Steam access token. @param importFriends(type=bool) Whether to automatically import Steam friends after authentication. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) MatchCreate

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

@group matches @summary Create a new authoritative realtime multiplayer match running on the given runtime module name. The given params are passed to the match's init hook. @param ctx(type=context.Context) The context object represents information about the server and requester. @param module(type=string) The name of an available runtime module that will be responsible for the match. This was registered in InitModule. @param params(type=map[string]interface{}) Any value to pass to the match init hook. @return matchId(string) The match ID of the newly created match. Clients can immediately use this ID to join the match. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) MatchGet

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

@group matches @summary Get information on a running match. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The ID of the match to fetch. @return match(*api.Match) Information for the running match. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) MatchList

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

@group matches @summary List currently running realtime multiplayer matches and optionally filter them by authoritative mode, label, and current participant count. @param ctx(type=context.Context) The context object represents information about the server and requester. @param limit(type=int, optional=true, default=100) The maximum number of matches to list. @param authoritative(type=bool, optional=true, default=false) Set true to only return authoritative matches, false to only return relayed matches. @param label(type=string, default="") A label to filter authoritative matches by. Default "" means any label matches. @param minSize(type=int) Inclusive lower limit of current match participants. @param maxSize(type=int) Inclusive upper limit of current match participants. @param query(type=string) Additional query parameters to shortlist matches. @return match([]*api.Match) A list of matches matching the parameters criteria. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) MatchSignal

func (n *RuntimeGoLayerGModule) MatchSignal(ctx context.Context, id string, data string) (string, error)

@group matches @summary Allow the match handler to be sent a reservation signal to mark a user ID or session ID into the match state ahead of their join attempt and eventual join flow. Called when the match handler receives a runtime signal. @param ctx(type=context.Context) Context object represents information about the match and server for information purposes. @param id(type=string) The user ID or session ID to send a reservation signal for. @param data(type=string) An arbitrary input supplied by the runtime caller of the signal. @return state(interface{}) An (optionally) updated state. May be any non-nil value, or nil to end the match. @return data(string) Arbitrary data to return to the runtime caller of the signal. May be a string or nil. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) MetricsCounterAdd

func (n *RuntimeGoLayerGModule) MetricsCounterAdd(name string, tags map[string]string, delta int64)

@group metrics @summary Add a custom metrics counter. @param name(type=string) The name of the custom metrics counter. @param tags(type=map[string]string) The metrics tags associated with this counter. @param delta(type=int64) Value to update this metric with.

func (*RuntimeGoLayerGModule) MetricsGaugeSet

func (n *RuntimeGoLayerGModule) MetricsGaugeSet(name string, tags map[string]string, value float64)

@group metrics @summary Add a custom metrics gauge. @param name(type=string) The name of the custom metrics gauge. @param tags(type=map[string]string) The metrics tags associated with this gauge. @param value(type=float64) Value to update this metric with.

func (*RuntimeGoLayerGModule) MetricsTimerRecord

func (n *RuntimeGoLayerGModule) MetricsTimerRecord(name string, tags map[string]string, value time.Duration)

@group metrics @summary Add a custom metrics timer. @param name(type=string) The name of the custom metrics timer. @param tags(type=map[string]string) The metrics tags associated with this timer. @param value(type=time.Duration) Value to update this metric with.

func (*RuntimeGoLayerGModule) MultiUpdate

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

@group users @summary Update account, storage, and wallet information simultaneously. @param ctx(type=context.Context) The context object represents information about the server and requester. @param accountUpdates(type=[]*runtime.AccountUpdate) Array of account information to be updated. @param storageWrites(type=[]*runtime.StorageWrite) Array of storage objects to be updated. @param storageDeletes(type=[]*runtime.StorageDelete) Array of storage objects to be deleted. @param walletUpdates(type=[]*runtime.WalletUpdate) Array of wallet updates to be made. @param updateLedger(type=bool, optional=true, default=false) Whether to record this wallet update in the ledger. @return storageWriteOps([]*api.StorageObjectAck) A list of acks with the version of the written objects. @return walletUpdateOps([]*runtime.WalletUpdateResult) A list of wallet updates results. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) NotificationSend

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

@group notifications @summary Send one in-app notification to a user. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID of the user to be sent the notification. @param subject(type=string) Notification subject. @param content(type=map[string]interface{}) Notification content. Must be set but can be an struct. @param code(type=int) Notification code to use. Must be equal or greater than 0. @param sender(type=string, optional=true) The sender of this notification. If left empty, it will be assumed that it is a system notification. @param persistent(type=bool, default=false) Whether to record this in the database for later listing. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) NotificationSendAll

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

@group notifications @summary Send an in-app notification to all users. @param ctx(type=context.Context) The context object represents information about the server and requester. @param subject(type=string) Notification subject. @param content(type=map[string]interface{}) Notification content. Must be set but can be any empty map. @param code(type=int) Notification code to use. Must be greater than or equal to 0. @param persistent(type=bool) Whether to record this in the database for later listing. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) NotificationsDelete

func (n *RuntimeGoLayerGModule) NotificationsDelete(ctx context.Context, notifications []*runtime.NotificationDelete) error

@group notifications @summary Delete one or more in-app notifications. @param ctx(type=context.Context) The context object represents information about the server and requester. @param notifications(type=[]*runtime.NotificationDelete) A list of notifications to be deleted. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) NotificationsDeleteId

func (n *RuntimeGoLayerGModule) NotificationsDeleteId(ctx context.Context, userID string, ids []string) error

@group notifications @summary Delete notifications by their id. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userID(type=string) Optional userID to scope deletions to that user only. Use empty string to ignore. @param ids(type=[]string) A list of notification ids. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) NotificationsGetId

func (n *RuntimeGoLayerGModule) NotificationsGetId(ctx context.Context, userID string, ids []string) ([]*runtime.Notification, error)

@group notifications @summary Get notifications by their id. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userID(type=string) Optional userID to scope results to that user only. @param ids(type=[]string) A list of notification ids. @return notifications([]*api.Notification) A list of notifications. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) NotificationsSend

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

@group notifications @summary Send one or more in-app notifications to a user. @param ctx(type=context.Context) The context object represents information about the server and requester. @param notifications(type=[]*runtime.NotificationSend) A list of notifications to be sent together. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) PurchaseGetByTransactionId

func (n *RuntimeGoLayerGModule) PurchaseGetByTransactionId(ctx context.Context, transactionID string) (*api.ValidatedPurchase, error)

@group purchases @summary Look up a purchase receipt by transaction ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param transactionId(type=string) Transaction ID of the purchase to look up. @return purchase(*api.ValidatedPurchase) A validated purchase. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) PurchaseValidateApple

func (n *RuntimeGoLayerGModule) PurchaseValidateApple(ctx context.Context, userID, receipt string, persist bool, passwordOverride ...string) (*api.ValidatePurchaseResponse, error)

@group purchases @summary Validates and stores the purchases present in an Apple App Store Receipt. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID of the owner of the receipt. @param receipt(type=string) Base-64 encoded receipt data returned by the purchase operation itself. @param persist(type=bool) Persist the purchase so that seenBefore can be computed to protect against replay attacks. @param passwordOverride(type=string, optional=true) Override the iap.apple.shared_password provided in your configuration. @return validation(*api.ValidatePurchaseResponse) The resulting successfully validated purchases. Any previously validated purchases are returned with a seenBefore flag. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) PurchaseValidateFacebookInstant

func (n *RuntimeGoLayerGModule) PurchaseValidateFacebookInstant(ctx context.Context, userID, signedRequest string, persist bool) (*api.ValidatePurchaseResponse, error)

@group purchases @summary Validates and stores a purchase receipt from Facebook Instant Games. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID of the owner of the receipt. @param signedRequest(type=string) The Facebook Instant signedRequest receipt data. @param persist(type=bool) Persist the purchase so that seenBefore can be computed to protect against replay attacks. @return validation(*api.ValidatePurchaseResponse) The resulting successfully validated purchases. Any previously validated purchases are returned with a seenBefore flag. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) PurchaseValidateGoogle

func (n *RuntimeGoLayerGModule) PurchaseValidateGoogle(ctx context.Context, userID, receipt string, persist bool, overrides ...struct {
	ClientEmail string
	PrivateKey  string
}) (*api.ValidatePurchaseResponse, error)

@group purchases @summary Validates and stores a purchase receipt from the Google Play Store. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID of the owner of the receipt. @param receipt(type=string) JSON encoded Google receipt. @param persist(type=bool) Persist the purchase so that seenBefore can be computed to protect against replay attacks. @param overrides(type=string, optional=true) Override the iap.google.client_email and iap.google.private_key provided in your configuration. @return validation(*api.ValidatePurchaseResponse) The resulting successfully validated purchases. Any previously validated purchases are returned with a seenBefore flag. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) PurchaseValidateHuawei

func (n *RuntimeGoLayerGModule) PurchaseValidateHuawei(ctx context.Context, userID, signature, inAppPurchaseData string, persist bool) (*api.ValidatePurchaseResponse, error)

@group purchases @summary Validates and stores a purchase receipt from the Huawei App Gallery. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID of the owner of the receipt. @param receipt(type=string) The Huawei receipt data. @param signature(type=string) The receipt signature. @param persist(type=bool) Persist the purchase so that seenBefore can be computed to protect against replay attacks. @return validation(*api.ValidatePurchaseResponse) The resulting successfully validated purchases. Any previously validated purchases are returned with a seenBefore flag. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) PurchasesList

func (n *RuntimeGoLayerGModule) PurchasesList(ctx context.Context, userID string, limit int, cursor string) (*api.PurchaseList, error)

@group purchases @summary List stored validated purchase receipts. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) Filter by user ID. Can be an empty string to list purchases for all users. @param limit(type=int, optional=true, default=100) Limit number of records retrieved. @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. @return listPurchases(*api.PurchaseList) A page of stored validated purchases and possibly a cursor. If cursor is empty/nil there are no further results. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) ReadFile

func (n *RuntimeGoLayerGModule) ReadFile(relPath string) (*os.File, error)

@group utils @summary Read file from user device. @param relPath(type=string) Relative path to the file to be read. @return fileRead(*os.File) The read file. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) SessionDisconnect

func (n *RuntimeGoLayerGModule) SessionDisconnect(ctx context.Context, sessionID string, reason ...runtime.PresenceReason) error

@group sessions @summary Disconnect a session. @param ctx(type=context.Context) The context object represents information about the server and requester. @param sessionId(type=string) The ID of the session to be disconnected. @param reason(type=runtime.PresenceReason, optional=true) The reason for the session disconnect. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) SessionLogout

func (n *RuntimeGoLayerGModule) SessionLogout(userID, token, refreshToken string) error

@group sessions @summary Log out a user from their current session. @param userId(type=string) The ID of the user to be logged out. @param token(type=string, optional=true) The current session authentication token. If the current auth and refresh tokens are not provided, all user sessions will be logged out. @param refreshToken(type=string, optional=true) The current session refresh token. If the current auth and refresh tokens are not provided, all user sessions will be logged out. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) SetEventFn

func (*RuntimeGoLayerGModule) StorageDelete

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

@group storage @summary Remove one or more objects by their collection/keyname and optional user. @param ctx(type=context.Context) The context object represents information about the server and requester. @param objectIds(type=[]*runtime.StorageDelete) An array of object identifiers to be deleted. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StorageIndexList

func (n *RuntimeGoLayerGModule) StorageIndexList(ctx context.Context, callerID, indexName, query string, limit int, order []string) (*api.StorageObjects, error)

@group storage @summary List storage index entries @param indexName(type=string) Name of the index to list entries from. @param callerId(type=string, optional=true) User ID of the caller, will apply permissions checks of the user. If empty, defaults to system user and permissions are bypassed. @param queryString(type=string) Query to filter index entries. @param limit(type=int) Maximum number of results to be returned. @param order(type=[]string, optional=true) The storage object fields to sort the query results by. The prefix '-' before a field name indicates descending order. All specified fields must be indexed and sortable. @return objects(*api.StorageObjectList) A list of storage objects. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StorageList

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

@group storage @summary List records in a collection and page through results. The records returned can be filtered to those owned by the user or "" for public records. @param ctx(type=context.Context) The context object represents information about the server and requester. @param callerId(type=string, optional=true) User ID of the caller, will apply permissions checks of the user. If empty defaults to system user and permissions are bypassed. @param userId(type=string) User ID to list records for or "" (empty string) for public records. @param collection(type=string) Collection to list data from. @param limit(type=int, optional=true, default=100) Limit number of records retrieved. @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. @return objects([]*api.StorageObject) A list of storage objects. @return cursor(string) Pagination cursor. Will be set to "" or nil when fetching last available page. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StorageRead

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

@group storage @summary Fetch one or more records by their bucket/collection/keyname and optional user. @param ctx(type=context.Context) The context object represents information about the server and requester. @param objectIds(type=[]*runtime.StorageRead) An array of object identifiers to be fetched. @return objects([]*api.StorageObject) A list of storage objects matching the parameters criteria. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StorageWrite

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

@group storage @summary Write one or more objects by their collection/keyname and optional user. @param ctx(type=context.Context) The context object represents information about the server and requester. @param objectIds(type=[]*runtime.StorageWrite) An array of object identifiers to be written. @return acks([]*api.StorageObjectAck) A list of acks with the version of the written objects. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StreamClose

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

@group streams @summary Close a stream and remove all presences on it. @param mode(type=uint8) The Type of stream, '2' for a chat channel for example. @param subject(type=string) The primary stream subject, typically a user ID. @param subcontext(type=string) A secondary subject, for example for direct chat between two users. @param label(type=string) Meta-information about the stream, for example a chat room name. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StreamCount

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

@group streams @summary Get a count of stream presences. @param mode(type=uint8) The Type of stream, '2' for a chat channel for example. @param subject(type=string) The primary stream subject, typically a user ID. @param subcontext(type=string) A secondary subject, for example for direct chat between two users. @param label(type=string) Meta-information about the stream, for example a chat room name. @return countByStream(int) Number of current stream presences. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StreamSend

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

@group streams @summary Send data to presences on a stream. @param mode(type=uint8) The Type of stream, '2' for a chat channel for example. @param subject(type=string) The primary stream subject, typically a user ID. @param subcontext(type=string) A secondary subject, for example for direct chat between two users. @param label(type=string) Meta-information about the stream, for example a chat room name. @param data(type=string) The data to send. @param presences(type=[]runtime.Presence, optional=true, default=all) Array of presences to receive the sent data. @param reliable(type=bool) Whether the sender has been validated prior. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StreamSendRaw

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

@group streams @summary Send a message to presences on a stream. @param mode(type=uint8) The Type of stream, '2' for a chat channel for example. @param subject(type=string) The primary stream subject, typically a user ID. @param subcontext(type=string) A secondary subject, for example for direct chat between two users. @param label(type=string) Meta-information about the stream, for example a chat room name. @param msg(type=*rtapi.Envelope) The message to send. @param presences(type=[]runtime.Presence, optional=true, default=all) Array of presences to receive the sent data. @param reliable(type=bool) Whether the sender has been validated prior. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StreamUserGet

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

@group streams @summary Retrieve a stream presence and metadata by user ID. @param mode(type=uint8) The type of stream, '2' for a chat channel for example. @param subject(type=string) The primary stream subject, typically a user ID. @param subcontext(type=string) A secondary subject, for example for direct chat between two users. @param label(type=string) Meta-information about the stream, for example a chat room name. @param userId(type=string) The user ID to fetch information for. @param sessionId(type=string) The current session ID for the user. @return meta(runtime.PresenceMeta) Presence and metadata for the user. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StreamUserJoin

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

@group streams @summary Add a user to a stream. @param mode(type=uint8) The type of stream, '2' for a chat channel for example. @param subject(type=string) The primary stream subject, typically a user ID. @param subcontext(type=string) A secondary subject, for example for direct chat between two users. @param label(type=string) Meta-information about the stream, for example a chat room name. @param userId(type=string) The user ID to be added. @param sessionId(type=string) The current session ID for the user. @param hidden(type=bool) Whether the user will be marked as hidden. @param persistence(type=bool) Whether message data should be stored in the database. @param status(type=string) User status message. @return success(bool) Whether the user was successfully added. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StreamUserKick

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

@group streams @summary Kick a user from a stream. @param mode(type=uint8) The Type of stream, '2' for a chat channel for example. @param subject(type=string) The primary stream subject, typically a user ID. @param subcontext(type=string) A secondary subject, for example for direct chat between two users. @param label(type=string) Meta-information about the stream, for example a chat room name. @param presence(runtime.Presence) The presence to be kicked. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StreamUserLeave

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

@group streams @summary Remove a user from a stream. @param mode(type=uint8) The Type of stream, '2' for a chat channel for example. @param subject(type=string) The primary stream subject, typically a user ID. @param subcontext(type=string) A secondary subject, for example for direct chat between two users. @param label(type=string) Meta-information about the stream, for example a chat room name. @param userId(type=string) The user ID to be removed. @param sessionId(type=string) The current session ID for the user. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StreamUserList

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

@group streams @summary List all users currently online and connected to a stream. @param mode(type=uint8) The type of stream, '2' for a chat channel for example. @param subject(type=string) The primary stream subject, typically a user ID. @param subcontext(type=string) A secondary subject, for example for direct chat between two users. @param label(type=string) Meta-information about the stream, for example a chat room name. @param includeHidden(type=bool, optional=true) Include stream presences marked as hidden in the results. @param includeNotHidden(type=bool, optional=true) Include stream presences not marked as hidden in the results. @return presences([]runtime.Presence) Array of stream presences and their information. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) StreamUserUpdate

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

@group streams @summary Update a stream user by ID. @param mode(type=uint8) The type of stream, '2' for a chat channel for example. @param subject(type=string) The primary stream subject, typically a user ID. @param subcontext(type=string) A secondary subject, for example for direct chat between two users. @param label(type=string) Meta-information about the stream, for example a chat room name. @param userId(type=string) The user ID to be updated. @param sessionId(type=string) The current session ID for the user. @param hidden(type=bool) Whether the user will be marked as hidden. @param persistence(type=bool) Whether message data should be stored in the database. @param status(type=string) User status message. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) SubscriptionGetByProductId

func (n *RuntimeGoLayerGModule) SubscriptionGetByProductId(ctx context.Context, userID, productID string) (*api.ValidatedSubscription, error)

@group subscriptions @summary Look up a subscription receipt by productID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) User ID of the subscription owner. @param productId(type=string) Product ID of the subscription to look up. @return subscription(*api.ValidatedSubscription) A validated subscription. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) SubscriptionValidateApple

func (n *RuntimeGoLayerGModule) SubscriptionValidateApple(ctx context.Context, userID, receipt string, persist bool, passwordOverride ...string) (*api.ValidateSubscriptionResponse, error)

@group subscriptions @summary Validates and stores the subscription present in an Apple App Store Receipt. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID of the owner of the receipt. @param receipt(type=string) Base-64 encoded receipt data returned by the purchase operation itself. @param persist(type=bool) Persist the subscription. @param passwordOverride(type=string, optional=true) Override the iap.apple.shared_password provided in your configuration. @return validation(*api.ValidateSubscriptionResponse) The resulting successfully validated subscription purchase. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) SubscriptionValidateGoogle

func (n *RuntimeGoLayerGModule) SubscriptionValidateGoogle(ctx context.Context, userID, receipt string, persist bool, overrides ...struct {
	ClientEmail string
	PrivateKey  string
}) (*api.ValidateSubscriptionResponse, error)

@group subscriptions @summary Validates and stores a subscription receipt from the Google Play Store. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID of the owner of the receipt. @param receipt(type=string) JSON encoded Google receipt. @param persist(type=bool) Persist the subscription. @param overrides(type=string, optional=true) Override the iap.google.client_email and iap.google.private_key provided in your configuration. @return validation(*api.ValidateSubscriptionResponse) The resulting successfully validated subscription. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) SubscriptionsList

func (n *RuntimeGoLayerGModule) SubscriptionsList(ctx context.Context, userID string, limit int, cursor string) (*api.SubscriptionList, error)

@group subscriptions @summary List stored validated subscriptions. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) Filter by user ID. Can be an empty string to list purchases for all users. @param limit(type=int, optional=true, default=100) Limit number of records retrieved. @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. @return listSubscriptions(*api.SubscriptionList) A page of stored validated subscriptions and possibly a cursor. If cursor is empty/nil there are no further results. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) TournamentAddAttempt

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

@group tournaments @summary Add additional score attempts to the owner's tournament record. This overrides the max number of score attempts allowed in the tournament for this specific owner. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The unique identifier for the tournament to update. @param owner(type=string) The owner of the records to increment the count for. @param count(type=int) The number of attempt counts to increment. Can be negative to decrease count. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) TournamentCreate

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

@group tournaments @summary Setup a new dynamic tournament with the specified ID and various configuration settings. The underlying leaderboard will be created if it doesn't already exist, otherwise its configuration will not be updated. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The unique identifier for the new tournament. This is used by clients to submit scores. @param authoritative(type=bool) Whether the tournament created is server authoritative. @param sortOrder(type=string, default="desc") The sort order for records in the tournament. Possible values are "asc" or "desc". @param operator(type=string, default="best") The operator that determines how scores behave when submitted. The possible values are "best", "set", or "incr". @param resetSchedule(type=string) The cron format used to define the reset schedule for the tournament. This controls when the underlying leaderboard resets and the tournament is considered active again. @param metadata(type=map[string]interface{}) The metadata you want associated to the tournament. Some good examples are weather conditions for a racing game. @param title(type=string) The title of the tournament. @param description(type=string) The description of the tournament. @param category(type=int) A category associated with the tournament. This can be used to filter different types of tournaments. Between 0 and 127. @param startTime(type=int, optional=true) The start time of the tournament. Leave empty for immediately or a future time. @param endTime(type=int, optional=true, default=never) The end time of the tournament. When the end time is elapsed, the tournament will not reset and will cease to exist. Must be greater than startTime if set. @param duration(type=int) The active duration for a tournament. This is the duration when clients are able to submit new records. The duration starts from either the reset period or tournament start time, whichever is sooner. A game client can query the tournament for results between end of duration and next reset period. @param maxSize(type=int) Maximum size of participants in a tournament. @param maxNumScore(type=int, default=1000000) Maximum submission attempts for a tournament record. @param joinRequired(type=bool, default=false) Whether the tournament needs to be joined before a record write is allowed. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) TournamentDelete

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

@group tournaments @summary Delete a tournament and all records that belong to it. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The unique identifier for the tournament to delete. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) TournamentJoin

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

@group tournaments @summary A tournament may need to be joined before the owner can submit scores. This operation is idempotent and will always succeed for the owner even if they have already joined the tournament. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The unique identifier for the tournament to join. @param ownerId(type=string) The owner of the record. @param username(type=string) The username of the record owner. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) TournamentList

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

@group tournaments @summary Find tournaments which have been created on the server. Tournaments can be filtered with categories and via start and end times. @param ctx(type=context.Context) The context object represents information about the server and requester. @param categoryStart(type=int) Filter tournaments with categories greater or equal than this value. @param categoryEnd(type=int) Filter tournaments with categories equal or less than this value. @param startTime(type=int) Filter tournaments that start after this time. @param endTime(type=int) Filter tournaments that end before this time. @param limit(type=int, default=10) Return only the required number of tournament denoted by this limit value. @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. @return tournamentList([]*api.TournamentList) A list of tournament results and possibly a cursor. If cursor is empty/nil there are no further results. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) TournamentRanksDisable

func (n *RuntimeGoLayerGModule) TournamentRanksDisable(ctx context.Context, id string) error

@group tournaments @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The tournament id. @return error(error) An optional error value if an error occurred. @summary Disable a tournament rank cache freeing its allocated resources. If already disabled is a NOOP.

func (*RuntimeGoLayerGModule) TournamentRecordDelete

func (n *RuntimeGoLayerGModule) TournamentRecordDelete(ctx context.Context, id, ownerID string) error

@group tournaments @summary Remove an owner's record from a tournament, if one exists. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The unique identifier for the tournament to delete from. @param owner(type=string) The owner of the score to delete. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) TournamentRecordWrite

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

@group tournaments @summary Submit a score and optional subscore to a tournament leaderboard. If the tournament has been configured with join required this will fail unless the owner has already joined the tournament. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The unique identifier for the tournament leaderboard to submit to. @param owner(type=string) The owner of this score submission. @param username(type=string) The owner username of this score submission, if it's a user. @param score(type=int64) The score to submit. @param subscore(type=int64, optional=true) A secondary subscore parameter for the submission. @param metadata(type=map[string]interface{}, optional=true) The metadata you want associated to this submission. Some good examples are weather conditions for a racing game. @return result(*api.LeaderboardRecord) The newly created leaderboard record. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) TournamentRecordsHaystack

func (n *RuntimeGoLayerGModule) TournamentRecordsHaystack(ctx context.Context, id, ownerID string, limit int, cursor string, expiry int64) (*api.TournamentRecordList, error)

@group tournaments @summary Fetch the list of tournament records around the owner. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The ID of the tournament to list records for. @param ownerId(type=string) The owner ID around which to show records. @param limit(type=int) Return only the required number of tournament records denoted by this limit value. Between 1-100. @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. @param expiry(type=int64) Time since epoch in seconds. Must be greater than 0. @return tournamentRecordsHaystack(*api.TournamentRecordList) A list of tournament records and possibly a cursor. If cursor is empty/nil there are no further results. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) TournamentRecordsList

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

@group tournaments @summary List records on the specified tournament, optionally filtering to only a subset of records by their owners. Records will be listed in the preconfigured tournament sort order. @param ctx(type=context.Context) The context object represents information about the server and requester. @param tournamentId(type=string) The ID of the tournament to list records for. @param ownerIds(type=[]string) Array of owner IDs to filter results by. @param limit(type=int) Return only the required number of tournament records denoted by this limit value. Max is 10000. @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. @param overrideExpiry(type=int64) Records with expiry in the past are not returned unless within this defined limit. Must be equal or greater than 0. @return records([]*api.LeaderboardRecord) A page of tournament records. @return ownerRecords([]*api.LeaderboardRecord) A list of owner tournament records (empty if the owners input parameter is not set). @return prevCursor(string) An optional previous page cursor that can be used to retrieve the previous page of records (if any). @return nextCursor(string) An optional next page cursor that can be used to retrieve the next page of records (if any). @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) TournamentsGetId

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

@group tournaments @summary Fetch one or more tournaments by ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param ids(type=[]string) The table array of tournament ids. @return result([]*api.Tournament) Array of tournament records. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UnlinkApple

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

@group authenticate @summary Unlink Apple authentication from a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be unlinked. @param token(type=string) Apple sign in token. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UnlinkCustom

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

@group authenticate @summary Unlink custom authentication from a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be unlinked. @param customId(type=string) Custom ID to be unlinked from the user. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UnlinkDevice

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

@group authenticate @summary Unlink device authentication from a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be unlinked. @param deviceId(type=string) Device ID to be unlinked from the user. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UnlinkEmail

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

@group authenticate @summary Unlink email authentication from a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be unlinked. @param email(type=string) Email to be unlinked from the user. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UnlinkFacebook

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

@group authenticate @summary Unlink Facebook authentication from a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be unlinked. @param token(type=string) Facebook OAuth or Limited Login (JWT) access token. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UnlinkFacebookInstantGame

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

@group authenticate @summary Unlink Facebook Instant Game authentication from a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be unlinked. @param playerInfo(type=string) Facebook player info. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UnlinkGameCenter

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

@group authenticate @summary Unlink Apple Game Center authentication from a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be unlinked. @param playerId(type=string) Player ID provided by Game Center. @param bundleId(type=string) Bundle ID of your app on iTunesConnect. @param timestamp(type=int64) Timestamp at which Game Center authenticated the client and issued a signature. @param salt(type=string) A random string returned by Game Center authentication on client. @param signature(type=string) A signature returned by Game Center authentication on client. @param publicKeyUrl(type=string) A URL to the public key returned by Game Center authentication on client. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UnlinkGoogle

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

@group authenticate @summary Unlink Google authentication from a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be unlinked. @param token(type=string) Google OAuth access token. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UnlinkSteam

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

@group authenticate @summary Unlink Steam authentication from a user ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The user ID to be unlinked. @param token(type=string) Steam access token. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UserGroupsList

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

@group groups @summary List all groups which a user belongs to and whether they've been accepted or if it's an invite. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The ID of the user to list groups for. @param limit(type=int) The maximum number of entries in the listing. @param state(type=int, optional=true) The state of the user within the group. If unspecified this returns users in all states. @param cursor(type=string) Pagination cursor from previous result. Don't set to start fetching from the beginning. @return userGroups([]*api.UserGroupList_UserGroup) A table of groups with their fields. @return cursor(string) An optional next page cursor that can be used to retrieve the next page of records (if any). Will be set to "" or nil when fetching last available page. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UsersBanId

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

@group users @summary Ban one or more users by ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userIds(type=[]string) An array of user IDs to ban. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UsersGetId

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

@group users @summary Fetch one or more users by ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userIds(type=[]string) An array of user IDs to fetch. @return users([]*api.User) A list of user record objects. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UsersGetRandom

func (n *RuntimeGoLayerGModule) UsersGetRandom(ctx context.Context, count int) ([]*api.User, error)

@group users @summary Fetch one or more users randomly. @param ctx(type=context.Context) The context object represents information about the server and requester. @param count(type=int) The number of users to fetch. @return users([]*api.User) A list of user record objects. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UsersGetUsername

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

@group users @summary Fetch one or more users by username. @param ctx(type=context.Context) The context object represents information about the server and requester. @param usernames(type=[]string) An array of usernames to fetch. @return users([]*api.User) A list of user record objects. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) UsersUnbanId

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

@group users @summary Unban one or more users by ID. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userIds(type=[]string) An array of user IDs to unban. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) WalletLedgerList

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

@group wallets @summary List all wallet updates for a particular user from oldest to newest. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The ID of the user to list wallet updates for. @param limit(type=int, optional=true, default=100) Limit number of results. @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. @return runtimeItems([]runtime.WalletLedgerItem) A Go slice containing wallet entries with Id, UserId, CreateTime, UpdateTime, Changeset, Metadata parameters. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) WalletLedgerUpdate

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

@group wallets @summary Update the metadata for a particular wallet update in a user's wallet ledger history. Useful when adding a note to a transaction for example. @param ctx(type=context.Context) The context object represents information about the server and requester. @param itemId(type=string) The ID of the wallet ledger item to update. @param metadata(type=map[string]interface{}) The new metadata to set on the wallet ledger item. @return updateWalletLedger(runtime.WalletLedgerItem) The updated wallet ledger item. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) WalletUpdate

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

@group wallets @summary Update a user's wallet with the given changeset. @param ctx(type=context.Context) The context object represents information about the server and requester. @param userId(type=string) The ID of the user whose wallet to update. @param changeset(type=map[string]int64) The set of wallet operations to apply. @param metadata(type=map[string]interface{}) Additional metadata to tag the wallet update with. @param updateLedger(type=bool, default=false) Whether to record this update in the ledger. @return updatedValue(map) The updated wallet value. @return previousValue(map) The previous wallet value. @return error(error) An optional error value if an error occurred.

func (*RuntimeGoLayerGModule) WalletsUpdate

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

@group wallets @summary Update one or more user wallets with individual changesets. This function will also insert a new wallet ledger item into each user's wallet history that tracks their update. @param ctx(type=context.Context) The context object represents information about the server and requester. @param updates(type=[]*runtime.WalletUpdate) The set of user wallet update operations to apply. @param updateLedger(type=bool, default=false) Whether to record this update in the ledger. @return updateWallets([]runtime.WalletUpdateResult) A list of wallet update results. @return error(error) An optional error value if an error occurred.

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

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

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

func (*RuntimeGoLogger) WithFields

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) Cleanup

func (r *RuntimeGoMatchCore) Cleanup()

func (*RuntimeGoMatchCore) CreateTime

func (r *RuntimeGoMatchCore) CreateTime() int64

func (*RuntimeGoMatchCore) GetState

func (r *RuntimeGoMatchCore) GetState(state interface{}) (string, error)

func (*RuntimeGoMatchCore) HandlerName

func (r *RuntimeGoMatchCore) HandlerName() string

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) MatchSignal

func (r *RuntimeGoMatchCore) MatchSignal(tick int64, state interface{}, data string) (interface{}, string, error)

func (*RuntimeGoMatchCore) MatchTerminate

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

func (*RuntimeGoMatchCore) TickRate

func (r *RuntimeGoMatchCore) TickRate() int

type RuntimeInfo

type RuntimeInfo struct {
	GoRpcFunctions         []string
	LuaRpcFunctions        []string
	JavaScriptRpcFunctions []string
	GoModules              []*moduleInfo
	// LuaModules             []*moduleInfo
	JavaScriptModules []*moduleInfo
}

type RuntimeJS

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

func (*RuntimeJS) GetCallback

func (r *RuntimeJS) GetCallback(e RuntimeExecutionMode, key string) string

func (*RuntimeJS) InvokeFunction

func (r *RuntimeJS) InvokeFunction(execMode RuntimeExecutionMode, id string, fn goja.Callable, logger goja.Value, httpHeaders, queryParams map[string][]string, uid, username string, vars map[string]string, sessionExpiry int64, sid, clientIP, clientPort, lang string, payloads ...interface{}) (interface{}, error, codes.Code)

func (*RuntimeJS) SetContext

func (r *RuntimeJS) SetContext(ctx context.Context)

type RuntimeJSModule

type RuntimeJSModule struct {
	Name    string
	Path    string
	Program *goja.Program
	Ast     *ast.Program
}

type RuntimeJSModuleCache

type RuntimeJSModuleCache struct {
	Names   []string
	Modules map[string]*RuntimeJSModule
}

func (*RuntimeJSModuleCache) Add

type RuntimeJavaScriptMatchCore

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

func (*RuntimeJavaScriptMatchCore) Cancel

func (rm *RuntimeJavaScriptMatchCore) Cancel()

func (*RuntimeJavaScriptMatchCore) Cleanup

func (rm *RuntimeJavaScriptMatchCore) Cleanup()

func (*RuntimeJavaScriptMatchCore) CreateTime

func (rm *RuntimeJavaScriptMatchCore) CreateTime() int64

func (*RuntimeJavaScriptMatchCore) GetState

func (rm *RuntimeJavaScriptMatchCore) GetState(state interface{}) (string, error)

func (*RuntimeJavaScriptMatchCore) HandlerName

func (rm *RuntimeJavaScriptMatchCore) HandlerName() string

func (*RuntimeJavaScriptMatchCore) Label

func (rm *RuntimeJavaScriptMatchCore) Label() string

func (*RuntimeJavaScriptMatchCore) MatchInit

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

func (*RuntimeJavaScriptMatchCore) MatchJoin

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

func (*RuntimeJavaScriptMatchCore) MatchJoinAttempt

func (rm *RuntimeJavaScriptMatchCore) 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 (*RuntimeJavaScriptMatchCore) MatchLeave

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

func (*RuntimeJavaScriptMatchCore) MatchLoop

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

func (*RuntimeJavaScriptMatchCore) MatchSignal

func (rm *RuntimeJavaScriptMatchCore) MatchSignal(tick int64, state interface{}, data string) (interface{}, string, error)

func (*RuntimeJavaScriptMatchCore) MatchTerminate

func (rm *RuntimeJavaScriptMatchCore) MatchTerminate(tick int64, state interface{}, graceSeconds int) (interface{}, error)

func (*RuntimeJavaScriptMatchCore) TickRate

func (rm *RuntimeJavaScriptMatchCore) TickRate() int

type RuntimeJavascriptCallbacks

type RuntimeJavascriptCallbacks struct {
	Rpc                            map[string]string
	Before                         map[string]string
	After                          map[string]string
	StorageIndexFilter             map[string]string
	Matchmaker                     string
	TournamentEnd                  string
	TournamentReset                string
	LeaderboardReset               string
	Shutdown                       string
	PurchaseNotificationApple      string
	SubscriptionNotificationApple  string
	PurchaseNotificationGoogle     string
	SubscriptionNotificationGoogle string
}

type RuntimeJavascriptInitModule

type RuntimeJavascriptInitModule struct {
	Logger         *zap.Logger
	Callbacks      *RuntimeJavascriptCallbacks
	MatchCallbacks *RuntimeJavascriptMatchHandlers
	// contains filtered or unexported fields
}

func NewRuntimeJavascriptInitModule

func NewRuntimeJavascriptInitModule(logger *zap.Logger, ast *ast.Program, storageIndex StorageIndex, callbacks *RuntimeJavascriptCallbacks, matchCallbacks *RuntimeJavascriptMatchHandlers, announceCallbackFn func(RuntimeExecutionMode, string)) *RuntimeJavascriptInitModule

func (*RuntimeJavascriptInitModule) Constructor

func (im *RuntimeJavascriptInitModule) Constructor(r *goja.Runtime) (*goja.Object, error)

type RuntimeJavascriptLocalCache

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

func NewRuntimeJavascriptLocalCache

func NewRuntimeJavascriptLocalCache(ctx context.Context) *RuntimeJavascriptLocalCache

func (*RuntimeJavascriptLocalCache) Clear

func (lc *RuntimeJavascriptLocalCache) Clear()

func (*RuntimeJavascriptLocalCache) Delete

func (lc *RuntimeJavascriptLocalCache) Delete(key string)

func (*RuntimeJavascriptLocalCache) Get

func (lc *RuntimeJavascriptLocalCache) Get(key string) (interface{}, bool)

func (*RuntimeJavascriptLocalCache) Put

func (lc *RuntimeJavascriptLocalCache) Put(key string, value interface{}, ttl int64)

type RuntimeJavascriptMatchHandlers

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

func (*RuntimeJavascriptMatchHandlers) Add

func (rmh *RuntimeJavascriptMatchHandlers) Add(name string, handlers *jsMatchHandlers)

func (*RuntimeJavascriptMatchHandlers) Get

func (rmh *RuntimeJavascriptMatchHandlers) Get(name string) *jsMatchHandlers

type RuntimeLeaderboardResetFunction

type RuntimeLeaderboardResetFunction func(ctx context.Context, leaderboard *api.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, headers, queryParams map[string][]string, uid string, username string, vars map[string]string, sessionExpiry int64, sid string, clientIP, clientPort, lang string, payloads ...interface{}) (interface{}, error, codes.Code, bool)

func (*RuntimeLua) Stop

func (r *RuntimeLua) Stop()

type RuntimeLuaCallbacks

type RuntimeLuaCallbacks struct {
	RPC                            *MapOf[string, *lua.LFunction]
	Before                         *MapOf[string, *lua.LFunction]
	After                          *MapOf[string, *lua.LFunction]
	Matchmaker                     *lua.LFunction
	TournamentEnd                  *lua.LFunction
	TournamentReset                *lua.LFunction
	LeaderboardReset               *lua.LFunction
	Shutdown                       *lua.LFunction
	PurchaseNotificationApple      *lua.LFunction
	SubscriptionNotificationApple  *lua.LFunction
	PurchaseNotificationGoogle     *lua.LFunction
	SubscriptionNotificationGoogle *lua.LFunction
	StorageIndexFilter             *MapOf[string, *lua.LFunction]
}

type RuntimeLuaLayerGModule

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

func NewRuntimeLuaLayerGModule

func NewRuntimeLuaLayerGModule(logger *zap.Logger, db *sql.DB, protojsonMarshaler *protojson.MarshalOptions, protojsonUnmarshaler *protojson.UnmarshalOptions, config Config, version string, socialClient *social.Client, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, leaderboardScheduler LeaderboardScheduler, sessionRegistry SessionRegistry, sessionCache SessionCache, statusRegistry StatusRegistry, matchRegistry MatchRegistry, tracker Tracker, metrics Metrics, streamManager StreamManager, router MessageRouter, once *sync.Once, localCache *RuntimeLuaLocalCache, storageIndex StorageIndex, matchCreateFn RuntimeMatchCreateFunction, eventFn RuntimeEventCustomFunction, registerCallbackFn func(RuntimeExecutionMode, string, *lua.LFunction), announceCallbackFn func(RuntimeExecutionMode, string)) *RuntimeLuaLayerGModule

func (*RuntimeLuaLayerGModule) Loader

func (n *RuntimeLuaLayerGModule) Loader(l *lua.LState) int

type RuntimeLuaLocalCache

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

func NewRuntimeLuaLocalCache

func NewRuntimeLuaLocalCache(ctx context.Context) *RuntimeLuaLocalCache

func (*RuntimeLuaLocalCache) Clear

func (lc *RuntimeLuaLocalCache) Clear()

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, ttl int64)

type RuntimeLuaMatchCore

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

func (*RuntimeLuaMatchCore) Cancel

func (r *RuntimeLuaMatchCore) Cancel()

func (*RuntimeLuaMatchCore) Cleanup

func (r *RuntimeLuaMatchCore) Cleanup()

func (*RuntimeLuaMatchCore) CreateTime

func (r *RuntimeLuaMatchCore) CreateTime() int64

func (*RuntimeLuaMatchCore) GetState

func (r *RuntimeLuaMatchCore) GetState(state interface{}) (string, error)

func (*RuntimeLuaMatchCore) HandlerName

func (r *RuntimeLuaMatchCore) HandlerName() string

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) MatchSignal

func (r *RuntimeLuaMatchCore) MatchSignal(tick int64, state interface{}, data string) (interface{}, string, error)

func (*RuntimeLuaMatchCore) MatchTerminate

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

func (*RuntimeLuaMatchCore) TickRate

func (r *RuntimeLuaMatchCore) TickRate() int

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 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)
	MatchSignal(tick int64, state interface{}, data string) (interface{}, string, error)
	GetState(state interface{}) (string, error)
	Label() string
	TickRate() int
	HandlerName() string
	CreateTime() int64
	Cancel()
	Cleanup()
}

func NewRuntimeGoMatchCore

func NewRuntimeGoMatchCore(logger *zap.Logger, module string, matchRegistry MatchRegistry, router MessageRouter, id uuid.UUID, node, version string, stopped *atomic.Bool, db *sql.DB, env map[string]string, nk runtime.LayerGModule, match runtime.Match) (RuntimeMatchCore, error)

func NewRuntimeJavascriptMatchCore

func NewRuntimeJavascriptMatchCore(logger *zap.Logger, module string, db *sql.DB, protojsonMarshaler *protojson.MarshalOptions, protojsonUnmarshaler *protojson.UnmarshalOptions, config Config, socialClient *social.Client, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, localCache *RuntimeJavascriptLocalCache, leaderboardScheduler LeaderboardScheduler, sessionRegistry SessionRegistry, sessionCache SessionCache, statusRegistry StatusRegistry, matchRegistry MatchRegistry, tracker Tracker, metrics Metrics, streamManager StreamManager, router MessageRouter, matchCreateFn RuntimeMatchCreateFunction, eventFn RuntimeEventCustomFunction, id uuid.UUID, node, version string, stopped *atomic.Bool, matchHandlers *jsMatchHandlers, modCache *RuntimeJSModuleCache, storageIndex StorageIndex, activeCache ActiveTokenCache) (RuntimeMatchCore, error)

func NewRuntimeLuaMatchCore

func NewRuntimeLuaMatchCore(logger *zap.Logger, module string, db *sql.DB, protojsonMarshaler *protojson.MarshalOptions, protojsonUnmarshaler *protojson.UnmarshalOptions, config Config, version string, socialClient *social.Client, leaderboardCache LeaderboardCache, rankCache LeaderboardRankCache, leaderboardScheduler LeaderboardScheduler, sessionRegistry SessionRegistry, sessionCache SessionCache, statusRegistry StatusRegistry, matchRegistry MatchRegistry, tracker Tracker, metrics Metrics, streamManager StreamManager, router MessageRouter, stdLibs map[string]lua.LGFunction, once *sync.Once, localCache *RuntimeLuaLocalCache, eventFn RuntimeEventCustomFunction, sharedReg, sharedGlobals *lua.LTable, id uuid.UUID, node string, stopped *atomic.Bool, name string, matchProvider *MatchProvider, storageIndex StorageIndex) (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 RuntimeMatchmakerOverrideFunction

type RuntimeMatchmakerOverrideFunction func(ctx context.Context, candidateMatches [][]*MatchmakerEntry) (matches [][]*MatchmakerEntry)

type RuntimeProviderJS

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

func (*RuntimeProviderJS) AfterReq

func (rp *RuntimeProviderJS) 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 (*RuntimeProviderJS) AfterRt

func (rp *RuntimeProviderJS) AfterRt(ctx context.Context, id string, logger *zap.Logger, userID, username string, vars map[string]string, expiry int64, sessionID, clientIP, clientPort, lang string, out, in *rtapi.Envelope) error

func (*RuntimeProviderJS) BeforeReq

func (rp *RuntimeProviderJS) 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 (*RuntimeProviderJS) BeforeRt

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

func (*RuntimeProviderJS) Get

func (rp *RuntimeProviderJS) Get(ctx context.Context) (*RuntimeJS, error)

func (*RuntimeProviderJS) LeaderboardReset

func (rp *RuntimeProviderJS) LeaderboardReset(ctx context.Context, leaderboard *api.Leaderboard, reset int64) error

func (*RuntimeProviderJS) MatchmakerMatched

func (rp *RuntimeProviderJS) MatchmakerMatched(ctx context.Context, entries []*MatchmakerEntry) (string, bool, error)

func (*RuntimeProviderJS) PurchaseNotificationApple

func (rp *RuntimeProviderJS) PurchaseNotificationApple(ctx context.Context, purchase *api.ValidatedPurchase, providerPayload string) error

func (*RuntimeProviderJS) PurchaseNotificationGoogle

func (rp *RuntimeProviderJS) PurchaseNotificationGoogle(ctx context.Context, purchase *api.ValidatedPurchase, providerPayload string) error

func (*RuntimeProviderJS) Put

func (rp *RuntimeProviderJS) Put(r *RuntimeJS)

func (*RuntimeProviderJS) Rpc

func (rp *RuntimeProviderJS) Rpc(ctx context.Context, id string, headers, queryParams map[string][]string, userID, username string, vars map[string]string, expiry int64, sessionID, clientIP, clientPort, lang, payload string) (string, error, codes.Code)

func (*RuntimeProviderJS) Shutdown

func (rp *RuntimeProviderJS) Shutdown(ctx context.Context)

func (*RuntimeProviderJS) StorageIndexFilter

func (rp *RuntimeProviderJS) StorageIndexFilter(ctx context.Context, indexName string, storageWrite *StorageOpWrite) (bool, error)

func (*RuntimeProviderJS) SubscriptionNotificationApple

func (rp *RuntimeProviderJS) SubscriptionNotificationApple(ctx context.Context, subscription *api.ValidatedSubscription, providerPayload string) error

func (*RuntimeProviderJS) SubscriptionNotificationGoogle

func (rp *RuntimeProviderJS) SubscriptionNotificationGoogle(ctx context.Context, subscription *api.ValidatedSubscription, providerPayload string) error

func (*RuntimeProviderJS) TournamentEnd

func (rp *RuntimeProviderJS) TournamentEnd(ctx context.Context, tournament *api.Tournament, end, reset int64) error

func (*RuntimeProviderJS) TournamentReset

func (rp *RuntimeProviderJS) TournamentReset(ctx context.Context, tournament *api.Tournament, end, reset int64) 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, lang string, out, in *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, lang string, envelope *rtapi.Envelope) (*rtapi.Envelope, error)

func (*RuntimeProviderLua) Get

func (*RuntimeProviderLua) LeaderboardReset

func (rp *RuntimeProviderLua) LeaderboardReset(ctx context.Context, leaderboard *api.Leaderboard, reset int64) error

func (*RuntimeProviderLua) MatchmakerMatched

func (rp *RuntimeProviderLua) MatchmakerMatched(ctx context.Context, entries []*MatchmakerEntry) (string, bool, error)

func (*RuntimeProviderLua) PurchaseNotificationApple

func (rp *RuntimeProviderLua) PurchaseNotificationApple(ctx context.Context, purchase *api.ValidatedPurchase, providerPayload string) error

func (*RuntimeProviderLua) PurchaseNotificationGoogle

func (rp *RuntimeProviderLua) PurchaseNotificationGoogle(ctx context.Context, purchase *api.ValidatedPurchase, providerPayload string) error

func (*RuntimeProviderLua) Put

func (rp *RuntimeProviderLua) Put(r *RuntimeLua)

func (*RuntimeProviderLua) Rpc

func (rp *RuntimeProviderLua) Rpc(ctx context.Context, id string, headers, queryParams map[string][]string, userID, username string, vars map[string]string, expiry int64, sessionID, clientIP, clientPort, lang, payload string) (string, error, codes.Code)

func (*RuntimeProviderLua) Shutdown

func (rp *RuntimeProviderLua) Shutdown(ctx context.Context)

func (*RuntimeProviderLua) StorageIndexFilter

func (rp *RuntimeProviderLua) StorageIndexFilter(ctx context.Context, indexName string, write *StorageOpWrite) (bool, error)

func (*RuntimeProviderLua) SubscriptionNotificationApple

func (rp *RuntimeProviderLua) SubscriptionNotificationApple(ctx context.Context, subscription *api.ValidatedSubscription, providerPayload string) error

func (*RuntimeProviderLua) SubscriptionNotificationGoogle

func (rp *RuntimeProviderLua) SubscriptionNotificationGoogle(ctx context.Context, subscription *api.ValidatedSubscription, providerPayload string) error

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 RuntimePurchaseNotificationAppleFunction

type RuntimePurchaseNotificationAppleFunction func(ctx context.Context, purchase *api.ValidatedPurchase, providerPayload string) error

type RuntimePurchaseNotificationGoogleFunction

type RuntimePurchaseNotificationGoogleFunction func(ctx context.Context, purchase *api.ValidatedPurchase, providerPayload string) error

type RuntimeRpcFunction

type RuntimeRpcFunction func(ctx context.Context, headers, queryParams map[string][]string, userID, username string, vars map[string]string, expiry int64, sessionID, clientIP, clientPort, lang, payload string) (string, error, codes.Code)

type RuntimeShutdownFunction

type RuntimeShutdownFunction func(ctx context.Context)

type RuntimeStorageIndexFilterFunction

type RuntimeStorageIndexFilterFunction func(ctx context.Context, write *StorageOpWrite) (bool, error)

type RuntimeSubscriptionNotificationAppleFunction

type RuntimeSubscriptionNotificationAppleFunction func(ctx context.Context, subscription *api.ValidatedSubscription, providerPayload string) error

type RuntimeSubscriptionNotificationGoogleFunction

type RuntimeSubscriptionNotificationGoogleFunction func(ctx context.Context, subscription *api.ValidatedSubscription, providerPayload string) error

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 SatoriConfig

type SatoriConfig struct {
	Url        string `yaml:"url" json:"url" usage:"Satori URL."`
	ApiKeyName string `yaml:"api_key_name" json:"api_key_name" usage:"Satori Api key name."`
	ApiKey     string `yaml:"api_key" json:"api_key" usage:"Satori Api key."`
	SigningKey string `yaml:"signing_key" json:"signing_key" usage:"Key used to sign Satori session tokens."`
}

func NewSatoriConfig

func NewSatoriConfig() *SatoriConfig

func (*SatoriConfig) Validate

func (sc *SatoriConfig) Validate(logger *zap.Logger)

type Scannable

type Scannable interface {
	Scan(dest ...interface{}) error
}

Scannable 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
	Lang() 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(msg string, reason runtime.PresenceReason, envelopes ...*rtapi.Envelope)
	CloseLock()
	CloseUnlock()
}

func NewSessionWS

func NewSessionWS(logger *zap.Logger, config Config, format SessionFormat, sessionID, userID uuid.UUID, username string, vars map[string]string, expiry int64, clientIP, clientPort, lang string, protojsonMarshaler *protojson.MarshalOptions, protojsonUnmarshaler *protojson.UnmarshalOptions, conn *websocket.Conn, sessionRegistry SessionRegistry, statusRegistry StatusRegistry, matchmaker Matchmaker, tracker Tracker, metrics Metrics, pipeline *Pipeline, runtime *Runtime) Session

type SessionCache

type SessionCache interface {
	Stop()

	// Check if a given user, expiry, and session token combination is valid.
	IsValidSession(userID uuid.UUID, exp int64, tokenId string) bool
	// Check if a given user, expiry, and refresh token combination is valid.
	IsValidRefresh(userID uuid.UUID, exp int64, tokenId string) bool
	// Add a valid session and/or refresh token for a given user.
	Add(userID uuid.UUID, sessionExp int64, sessionTokenId string, refreshExp int64, refreshTokenId string)
	// Remove a session and/or refresh token for a given user.
	Remove(userID uuid.UUID, sessionExp int64, sessionTokenId string, refreshExp int64, refreshTokenId string)
	// Remove all of a user's session and refresh tokens.
	RemoveAll(userID uuid.UUID)
	// Mark a set of users as banned.
	Ban(userIDs []uuid.UUID)
	// Unban a set of users.
	Unban(userIDs []uuid.UUID)
}

func NewLocalSessionCache

func NewLocalSessionCache(tokenExpirySec, refreshTokenExpirySec int64) SessionCache

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."`
	RefreshEncryptionKey  string `` /* 128-byte string literal not displayed */
	RefreshTokenExpirySec int64  `yaml:"refresh_token_expiry_sec" json:"refresh_token_expiry_sec" usage:"Refresh token expiry in seconds."`
	SingleSocket          bool   `` /* 129-byte string literal not displayed */
	SingleMatch           bool   `` /* 158-byte string literal not displayed */
	SingleParty           bool   `` /* 158-byte string literal not displayed */
	SingleSession         bool   `` /* 164-byte string literal not displayed */
}

SessionConfig is configuration relevant to the session.

func NewSessionConfig

func NewSessionConfig() *SessionConfig

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, ban bool, reason ...runtime.PresenceReason) error
	SingleSession(ctx context.Context, tracker Tracker, userID, sessionID uuid.UUID)
	Range(fn func(session Session) bool)
	SetPeer(peer Peer)
}

func NewLocalSessionRegistry

func NewLocalSessionRegistry(metrics Metrics) SessionRegistry

type SessionTokenClaims

type SessionTokenClaims struct {
	TokenId   string            `json:"tid,omitempty"`
	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."`
	FacebookLimitedLogin *SocialConfigFacebookLimitedLogin `yaml:"facebook_limited_login" json:"facebook_limited_login" usage:"Facebook Limited Login 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

type SocialConfigApple

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

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 SocialConfigFacebookLimitedLogin

type SocialConfigFacebookLimitedLogin struct {
	AppId string `yaml:"app_id" json:"app_id" usage:"Facebook Limited Login App ID."`
}

SocialConfigFacebookLimitedLogin is configuration relevant to Facebook Limited Login.

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 */
	ResponseHeaders      []string          ``                  /* 219-byte string literal not displayed */
	Headers              map[string]string `yaml:"-" json:"-"` // Created by parsing ResponseHeaders above, not set from input args directly.
	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

type StatusHandler

type StatusHandler interface {
	GetStatus(ctx context.Context) ([]*console.StatusList_Status, error)
	GetServices(ctx context.Context) []*console.StatusList_ServiceStatus
	SetPeer(peer Peer)
}

func NewLocalStatusHandler

func NewLocalStatusHandler(logger *zap.Logger, sessionRegistry SessionRegistry, matchRegistry MatchRegistry, tracker Tracker, metrics Metrics, node string) StatusHandler

type StatusRegistry

type StatusRegistry interface {
	Stop()
	Follow(sessionID uuid.UUID, userIDs map[uuid.UUID]struct{})
	Unfollow(sessionID uuid.UUID, userIDs []uuid.UUID)
	UnfollowAll(sessionID uuid.UUID)
	IsOnline(userID uuid.UUID) bool
	FillOnlineUsers(users []*api.User)
	FillOnlineAccounts(accounts []*api.Account)
	FillOnlineFriends(friends []*api.Friend)
	FillOnlineGroupUsers(groupUsers []*api.GroupUserList_GroupUser)
	Queue(userID uuid.UUID, joins, leaves []*rtapi.UserPresence)
}

func NewLocalStatusRegistry

func NewLocalStatusRegistry(logger *zap.Logger, config Config, sessionRegistry SessionRegistry, protojsonMarshaler *protojson.MarshalOptions) StatusRegistry

type StorageConfig

type StorageConfig struct {
	DisableIndexOnly bool `` /* 159-byte string literal not displayed */
}

func NewStorageConfig

func NewStorageConfig() *StorageConfig

type StorageIndex

type StorageIndex interface {
	Write(ctx context.Context, objects []*api.StorageObject) (creates int, deletes int)
	Delete(ctx context.Context, objects StorageOpDeletes) (deletes int)
	List(ctx context.Context, callerID uuid.UUID, indexName, query string, limit int, order []string) (*api.StorageObjects, error)
	Load(ctx context.Context) error
	CreateIndex(ctx context.Context, name, collection, key string, fields []string, sortFields []string, maxEntries int, indexOnly bool) error
	RegisterFilters(runtime *Runtime)
}

func NewLocalStorageIndex

func NewLocalStorageIndex(logger *zap.Logger, db *sql.DB, config *StorageConfig, metrics Metrics) (StorageIndex, error)

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

type TournamentListCursor struct {
	Id string
}

type Tracker

type Tracker interface {
	SetMatchJoinListener(func(id uuid.UUID, joins []*MatchPresence))
	SetMatchLeaveListener(func(id uuid.UUID, leaves []*MatchPresence))
	SetPartyJoinListener(func(id uuid.UUID, joins []*Presence))
	SetPartyLeaveListener(func(id uuid.UUID, leaves []*Presence))
	Stop()

	// Track returns success true/false, and new presence true/false.
	Track(ctx context.Context, sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID, meta PresenceMeta) (bool, bool)
	TrackMulti(ctx context.Context, sessionID uuid.UUID, ops []*TrackerOp, userID uuid.UUID, otherNode ...string) bool
	Untrack(sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID, otherNode ...string)
	UntrackMulti(sessionID uuid.UUID, streams []*PresenceStream, userID uuid.UUID)
	UntrackAll(sessionID uuid.UUID, reason runtime.PresenceReason, otherNode ...string)
	// Update returns success true/false - will only fail if the user has no presence, otherwise is an upsert.
	Update(ctx context.Context, sessionID uuid.UUID, stream PresenceStream, userID uuid.UUID, meta PresenceMeta, otherNode ...string) 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)
	// Remove the given session from any streams matching the given mode, except the specified stream.
	UntrackLocalByModes(sessionID uuid.UUID, modes map[uint8]struct{}, skipStream 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
	// 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
	// Fast lookup of presences for a set of user IDs + stream mode.
	ListPresenceIDByStreams(fill map[PresenceStream][]*PresenceID)

	// Loop stream
	Range(fn func(sessionID uuid.UUID, presences []*Presence) bool)
	MergeRemoteState(node string, presences []*pb.Presence, join bool)
	ClearTrackByNode(node string)
	ClearRemoteTrack()
	SetPeer(peer Peer)
	UntrackByModes(sessionID uuid.UUID, modes map[uint8]struct{}, skipStream PresenceStream)
	// Fast lookup of local node + session IDs to use for message delivery.
	ListLocalPresenceIDByStream(stream PresenceStream) []*PresenceID
}

func StartLocalTracker

func StartLocalTracker(logger *zap.Logger, config Config, sessionRegistry SessionRegistry, statusRegistry StatusRegistry, metrics Metrics, protojsonMarshaler *protojson.MarshalOptions) 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

type TrackerOp

type TrackerOp struct {
	Stream PresenceStream
	Meta   PresenceMeta
}

type TransferNFTRequest

type TransferNFTRequest struct {
	From string `json:"from"`
	To   string `json:"to"`
	NFTTransactionDetails
}

Struct for the Transfer NFT request

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.

type UADetail

type UADetail struct {
	ID         string `json:"id"`
	Wallet     string `json:"wallet"`
	Username   string `json:"user_name"`
	Firstname  string `json:"first_name"`
	Lastname   string `json:"last_name"`
	TelegramID string `json:"telegram_id"`
	CreatedAt  string `json:"created_at"`
	UpdatedAt  string `json:"updated_at"`
}

type ValidatableQuery

type ValidatableQuery interface {
	Validate() error
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL