db

package
v0.0.0-...-0526c7a Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAccountRecord

func AddAccountRecord(uuid []byte, username string, key, salt []byte) error

func AddAccountSession

func AddAccountSession(username string, token []byte) error

func AddOrUpdateAccountDailyRun

func AddOrUpdateAccountDailyRun(uuid []byte, score int, wave int) error

func DeleteClaimedAccountCompensations

func DeleteClaimedAccountCompensations(uuid []byte) error

func DeleteSessionSaveData

func DeleteSessionSaveData(uuid []byte, slot int) error

func DeleteSystemSaveData

func DeleteSystemSaveData(uuid []byte) error

func FetchAccountKeySaltFromUsername

func FetchAccountKeySaltFromUsername(username string) ([]byte, []byte, error)

func FetchAndClaimAccountCompensations

func FetchAndClaimAccountCompensations(uuid []byte) (map[int]int, error)

func FetchBattleCount

func FetchBattleCount() (int, error)

func FetchClassicSessionCount

func FetchClassicSessionCount() (int, error)

func FetchPlayerCount

func FetchPlayerCount() (int, error)

func FetchRankingPageCount

func FetchRankingPageCount(category int) (int, error)

func FetchRankings

func FetchRankings(category int, page int) ([]defs.DailyRanking, error)

func FetchTrainerIds

func FetchTrainerIds(uuid []byte) (trainerId, secretId int, err error)

func FetchUUIDFromToken

func FetchUUIDFromToken(token []byte) ([]byte, error)

func FetchUsernameFromUUID

func FetchUsernameFromUUID(uuid []byte) (string, error)

func GetDailyRunSeed

func GetDailyRunSeed() (string, error)

func GetLatestSessionSaveDataSlot

func GetLatestSessionSaveDataSlot(uuid []byte) (int, error)

func Init

func Init(username, password, protocol, address, database string) error

func IsActiveSession

func IsActiveSession(uuid []byte, sessionId string) (bool, error)

func ReadSeedCompleted

func ReadSeedCompleted(uuid []byte, seed string) (bool, error)

func ReadSessionSaveData

func ReadSessionSaveData(uuid []byte, slot int) (defs.SessionSaveData, error)

func ReadSystemSaveData

func ReadSystemSaveData(uuid []byte) (defs.SystemSaveData, error)

func RemoveSessionFromToken

func RemoveSessionFromToken(token []byte) error

func SetAccountBanned

func SetAccountBanned(uuid []byte, banned bool) error

func StoreSessionSaveData

func StoreSessionSaveData(uuid []byte, data defs.SessionSaveData, slot int) error

func StoreSystemSaveData

func StoreSystemSaveData(uuid []byte, data defs.SystemSaveData) error

func TryAddDailyRun

func TryAddDailyRun(seed string) (string, error)

func TryAddSeedCompletion

func TryAddSeedCompletion(uuid []byte, seed string, mode int) (bool, error)

func UpdateAccountLastActivity

func UpdateAccountLastActivity(uuid []byte) error

func UpdateAccountPassword

func UpdateAccountPassword(uuid, key, salt []byte) error

func UpdateAccountStats

func UpdateAccountStats(uuid []byte, stats defs.GameStats, voucherCounts map[string]int) error

func UpdateActiveSession

func UpdateActiveSession(uuid []byte, clientSessionId string) error

func UpdateTrainerIds

func UpdateTrainerIds(trainerId, secretId int, uuid []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL