rediskey

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 10 Imported by: 14

Documentation

Index

Constants

View Source
const ActiveGamesZSet = "automuteus:games"
View Source
const CachedUserDataExpiration = time.Hour * 12
View Source
const Commit = "automuteus:commit"
View Source
const EventsNamespace = "automuteus:capture:events"
View Source
const JobNamespace = "automuteus:jobs:"
View Source
const NotFound = -1
View Source
const TotalGameExpiration = time.Minute * 5
View Source
const TotalGames = "automuteus:games:total"
View Source
const TotalGuildsSet = "automuteus:count:guilds"
View Source
const TotalUsers = "automuteus:users:total"
View Source
const TotalUsersExpiration = time.Minute * 5
View Source
const Version = "automuteus:version"

Variables

This section is empty.

Functions

func ActiveGamesForGuild

func ActiveGamesForGuild(guildID string) string

func BotTokenIdentifyLock

func BotTokenIdentifyLock(token string) string

func CachedUserInfoOnGuild added in v0.0.5

func CachedUserInfoOnGuild(userID, guildID string) string

func CompleteTask

func CompleteTask(taskID string) string

func ConnectCodeData

func ConnectCodeData(guildID, connCode string) string

func ConnectCodePtr

func ConnectCodePtr(guildID, code string) string

func GetActiveGames added in v0.0.2

func GetActiveGames(ctx context.Context, client *redis.Client, secs int64) int64

func GetCachedUserInfo added in v0.0.5

func GetCachedUserInfo(ctx context.Context, client *redis.Client, userID, guildID string) string

func GetGuildCounter added in v0.0.2

func GetGuildCounter(ctx context.Context, client *redis.Client) int64

func GetTotalGames added in v0.0.4

func GetTotalGames(ctx context.Context, client *redis.Client) int64

func GetTotalUsers added in v0.0.4

func GetTotalUsers(ctx context.Context, client *redis.Client) int64

func GetVersionAndCommit added in v0.0.2

func GetVersionAndCommit(ctx context.Context, client *redis.Client) (string, string)

func GuildCacheHash

func GuildCacheHash(guildID string) string

func GuildSettings

func GuildSettings(id HashedID) string

func GuildTokenLock

func GuildTokenLock(guildID, hToken string) string

func IsGameInTextChannel added in v0.0.6

func IsGameInTextChannel(ctx context.Context, client *redis.Client, guildID, textChannelID string) (bool, error)

func IsGameInVoiceChannel added in v0.0.6

func IsGameInVoiceChannel(ctx context.Context, client *redis.Client, guildID, voiceChannelID string) (bool, error)

func RefreshTotalGames added in v0.0.4

func RefreshTotalGames(ctx context.Context, client *redis.Client, pool *pgxpool.Pool) int64

func RefreshTotalUsers added in v0.0.4

func RefreshTotalUsers(ctx context.Context, client *redis.Client, pool *pgxpool.Pool) int64

func RequestsByType

func RequestsByType(typeStr string) string

func RoomCodesForConnCode

func RoomCodesForConnCode(connCode string) string

func SetCachedUserInfo added in v0.0.5

func SetCachedUserInfo(ctx context.Context, client *redis.Client, userID, guildID, userData string) error

func SetVersionAndCommit added in v0.0.4

func SetVersionAndCommit(ctx context.Context, client *redis.Client, version, commit string)

func SnowflakeLockID

func SnowflakeLockID(snowflake string) string

func TasksList added in v0.0.11

func TasksList(connectCode string) string

func TextChannelPtr

func TextChannelPtr(guildID, channelID string) string

func UserRateLimitGeneral added in v0.0.11

func UserRateLimitGeneral(userID string) string

func UserRateLimitSpecific added in v0.0.11

func UserRateLimitSpecific(userID, cmdType string) string

func UserSoftban added in v0.0.6

func UserSoftban(userID string) string

func UserSoftbanCount added in v0.0.11

func UserSoftbanCount(userID string) string

func VoiceChangesForGameCodeLock

func VoiceChangesForGameCodeLock(connectCode string) string

func VoiceChannelPtr

func VoiceChannelPtr(guildID, channelID string) string

Types

type HashedID added in v0.1.0

type HashedID string

func HashGuildID added in v0.0.11

func HashGuildID(guildID string) HashedID

Jump to

Keyboard shortcuts

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