db

package
v0.0.0-...-8c4404e Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: AGPL-3.0 Imports: 6 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 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 FetchUsernameFromToken

func FetchUsernameFromToken(token []byte) (string, error)

func Init

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

func IsActiveSession

func IsActiveSession(token []byte) (bool, error)

func RemoveSessionFromToken

func RemoveSessionFromToken(token []byte) error

func TryAddDailyRun

func TryAddDailyRun(seed string) error

func TryAddDailyRunCompletion

func TryAddDailyRunCompletion(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, token []byte) 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