Documentation
¶
Index ¶
- Variables
- func AddActAsLink(mainUserID, altUserID string) error
- func AddGuildMembership(userID, guildID string) bool
- func AddRecentCoopID(userID string, coopID string)
- func AddTimer(id, userID, channelID, msgID string, reminder time.Time, message string, ...)
- func AddWatch(userID, watchType, targetID string)
- func ClearActAsSwitch(mainUserID, channelID string) error
- func ClearAllActAsSwitches(mainUserID string) error
- func ClearEphemeralMessageSwitch(messageID string)
- func ClearPendingActAsRegistration(mainUserID string)
- func ClearUltra(userID string)
- func DeleteAllActAsLinks(userID string) error
- func DeleteAllLeaderboardExclusionsForUserInGuild(guildID, userID string) error
- func DeleteAllLeaderboardOptInsForUserInGuild(guildID, userID string) error
- func DeleteAllLeaderboardStatsForPlayer(player string) error
- func DeleteAllLeaderboardStatsForPlayerInGuild(player, guildID string) error
- func DeleteFarmer(userID string)
- func DeleteInactiveTimers()
- func DeleteLeaderboardExclusion(guildID, userID, lbType string) error
- func DeleteLeaderboardOptIn(guildID, userID, lbType string) error
- func DeleteLeaderboardStatsForPlayer(player, lbType string) error
- func DeleteTimer(id string)
- func DeleteUserWatches(userID string)
- func DeleteWatch(userID, watchType, targetID string)
- func FarmerExists(userID string) bool
- func FindAltDiscordID(altID string, callerIDs ...string) string
- func FlushPendingSaves()
- func GetActAsLinks(mainUserID string) []string
- func GetActAsMains(altUserID string) []string
- func GetActAsSwitch(mainUserID, channelID string) (altUserID string, expiresAt time.Time, active bool)
- func GetAllActAsLinkedUsers(userID string) []string
- func GetAltControllerByMiscString(key, value string) []string
- func GetDiscordUserIDFromEggIncName(eggIncName string) (string, error)
- func GetDiscordUserIDFromEiIgn(eiIgn string) (string, error)
- func GetDiscordUserIDFromEiIgnExact(eiIgn string) (string, error)
- func GetEffectiveUserID(userID string, contextIDs ...string) string
- func GetEffectiveUserIDAndExpiry(userID string, contextIDs ...string) (effectiveID string, expiresAt time.Time, isActingAs bool)
- func GetEggIncName(userID string) string
- func GetEiIgnsByGuild(guildID string) []string
- func GetEiIgnsByMiscString(key, value string) []string
- func GetEphemeralMessageSwitch(messageID string) (string, bool)
- func GetGuildMembers(guildID string) []string
- func GetLastSeen(userID string) time.Time
- func GetLatestLeaderboardSnapDate(lbType string) (string, error)
- func GetLaunchHistory(userID string) bool
- func GetLeaderboardOptInGuilds() ([]string, error)
- func GetLeaderboardOptInUsers() ([]string, error)
- func GetLeaderboardSnapDates(lbType string) ([]string, error)
- func GetLinkedAltIDs(callerID string) []string
- func GetLinks(userID string) []string
- func GetMiscSettingFlag(userID string, key string) bool
- func GetMiscSettingString(userID string, key string) string
- func GetMissionShipPrimary(userID string) int
- func GetMissionShipSecondary(userID string) int
- func GetPendingActAsRegistration(mainUserID string) (pendingActAsRegistration, bool)
- func GetPermitLevel(userID string) uint32
- func GetPing(userID string) bool
- func GetRecentCoopIDs(userID string) []string
- func GetSlashActAsCommand(cmd string) *dc.Command
- func GetSlashPrivacyCommand(cmd string) *dc.Command
- func GetTokens(userID string) int
- func GetUserEggIncID(userID string) string
- func GetUserGuilds(userID string) []string
- func HandleActAsAutocomplete(e *dc.AutocompleteEvent)
- func HandleActAsCommand(client dc.Client, e *dc.CommandEvent)
- func HandleActAsRegisterModalSubmit(client dc.Client, e *dc.ModalEvent)
- func HandlePrivacy(e *dc.CommandEvent)
- func HandlePrivacyAutocomplete(e *dc.AutocompleteEvent)
- func HandlePrivacyButton(e *dc.ComponentEvent)
- func HandleSetEggIncName(client dc.Client, e *dc.CommandEvent, ...)
- func HasProPermit(userID string) bool
- func InsertSuspectMission(arg InsertSuspectMissionParams) error
- func IsActAsForever(exp time.Time) bool
- func IsActAsLinked(mainUserID, altUserID string) bool
- func IsActAsLinkedEither(u1, u2 string) bool
- func IsDiscordSnowflake(s string) bool
- func IsUltra(userID string) bool
- func MoveActAsSwitch(mainUserID, fromChannelID, toChannelID string) error
- func MoveActAsSwitchWithExpiry(mainUserID, fromChannelID, toChannelID string, newExpiry time.Time) error
- func PruneOlderLeaderboardStatsForPlayer(lbType, player, keepSnapDate string) error
- func PurgeAltLinks(mainUserID, altUserID string)
- func ReencryptFarmerEIDs(oldKeyB64, newKeyB64 string) (int, int, error)
- func RegisterEphemeralMessageSwitch(messageID, mainUserID, altUserID string)
- func RemoveActAsLink(mainUserID, altUserID string) error
- func RemoveCustomBanner(userID string, guildID string) error
- func RemoveGuildMembership(userID, guildID string)
- func ResolveAltSelection(userID string, altParam string, cmdName string) (targetID string, eggIncID string, notice string)
- func SetActAsSwitch(mainUserID, channelID, altUserID string, expiresAt time.Time) error
- func SetCustomBanner(userID string, guildID string, imageData []byte) error
- func SetEggIncName(userID string, eggIncName string)
- func SetFarmerBackupDetails(userID string, backup *ei.Backup) (newIGN string, ignChanged bool, newTE uint32, teChanged bool)
- func SetLastSeen(userID string)
- func SetLaunchHistory(userID string, setting bool)
- func SetLink(userID string, description string, guildID string, channelID string, ...)
- func SetMiscSettingFlag(userID string, key string, value bool)
- func SetMiscSettingString(userID string, key string, value string)
- func SetMissionShipPrimary(userID string, setting int)
- func SetMissionShipSecondary(userID string, setting int)
- func SetPermitLevel(userID string, level uint32)
- func SetPing(userID string, ping bool)
- func SetTokens(userID string, tokens int)
- func SetUltra(userID string, isUltra ...bool)
- func SlashSetEggIncNameCommand(cmd string) *dc.Command
- func StorePendingActAsRegistration(mainUserID, altUserID, code string, ttl time.Duration)
- func SyncCustomBanner(userID string, guildID string, destPath string) bool
- func UpdateTimerMsg(id, channelID, msgID string)
- func UpdateTimerState(id string, active bool)
- func UpsertLeaderboardExclusion(guildID, userID, lbType string) error
- func UpsertLeaderboardOptIn(guildID, userID, lbType string) error
- func UpsertLeaderboardStat(lbType, player, gameName, snapDate string, value float64, ...) error
- type ActAsLink
- type ActAsSwitch
- type AddGuildMembershipParams
- type AltAccount
- type CustomBanner
- type DBTX
- type DeleteActAsLinkParams
- type DeleteActAsSwitchForPairParams
- type DeleteActAsSwitchParams
- type DeleteAllActAsLinksForUserParams
- type DeleteAllActAsSwitchesForUserParams
- type DeleteAllLeaderboardExclusionsForUserInGuildParams
- type DeleteAllLeaderboardOptInsForUserInGuildParams
- type DeleteCustomBannerParams
- type DeleteLeaderboardExclusionParams
- type DeleteLeaderboardOptInParams
- type DeleteLeaderboardStatsForPlayerParams
- type DeleteWatchParams
- type Farmer
- type FarmerGuildMembership
- type FarmerState
- type GetActAsSwitchParams
- type GetActAsSwitchRow
- type GetCustomBannerParams
- type GetCustomBannerRow
- type GetEiIgnsByMiscStringParams
- type GetIdsByMiscStringParams
- type GetLeaderboardExclusionsForUserRow
- type GetLeaderboardForSnapDateParams
- type GetLeaderboardForSnapDateRow
- type GetLeaderboardOptInsForGuildRow
- type GetLeaderboardOptInsForUserRow
- type GetLeaderboardSnapDatesForGuildParams
- type GetLeaderboardSnapDatesForGuildRow
- type GetLeaderboardStatForPlayerAndSnapDateParams
- type GetLeaderboardStatForPlayerAndSnapDateRow
- type GetLeaderboardStatForPlayerParams
- type GetLeaderboardStatForPlayerRow
- type GetStatsForPlayerInGuildParams
- type InsertActAsLinkParams
- type InsertLegacyFarmerstateParams
- type InsertSuspectMissionParams
- type InsertTimerParams
- type InsertWatchParams
- type IsActAsLinkedEitherParams
- type IsActAsLinkedParams
- type LeaderboardExclusion
- type LeaderboardOptin
- type LeaderboardStat
- type Link
- type PruneOlderLeaderboardStatsForPlayerParams
- type Queries
- func (q *Queries) AddGuildMembership(ctx context.Context, arg AddGuildMembershipParams) (int64, error)
- func (q *Queries) ClearExtraLegacyRecords(ctx context.Context) error
- func (q *Queries) DeleteActAsLink(ctx context.Context, arg DeleteActAsLinkParams) (int64, error)
- func (q *Queries) DeleteActAsSwitch(ctx context.Context, arg DeleteActAsSwitchParams) (int64, error)
- func (q *Queries) DeleteActAsSwitchForPair(ctx context.Context, arg DeleteActAsSwitchForPairParams) (int64, error)
- func (q *Queries) DeleteAllActAsLinksForUser(ctx context.Context, arg DeleteAllActAsLinksForUserParams) (int64, error)
- func (q *Queries) DeleteAllActAsSwitchesForUser(ctx context.Context, arg DeleteAllActAsSwitchesForUserParams) (int64, error)
- func (q *Queries) DeleteAllLeaderboardExclusionsForUserInGuild(ctx context.Context, arg DeleteAllLeaderboardExclusionsForUserInGuildParams) error
- func (q *Queries) DeleteAllLeaderboardOptInsForUserInGuild(ctx context.Context, arg DeleteAllLeaderboardOptInsForUserInGuildParams) error
- func (q *Queries) DeleteAllLeaderboardStatsForPlayerInGuild(ctx context.Context) error
- func (q *Queries) DeleteCustomBanner(ctx context.Context, arg DeleteCustomBannerParams) error
- func (q *Queries) DeleteExpiredActAsSwitches(ctx context.Context, expiresAt time.Time) error
- func (q *Queries) DeleteFarmerLegacyRecords(ctx context.Context, id string) error
- func (q *Queries) DeleteFarmerRecord(ctx context.Context, id string) error
- func (q *Queries) DeleteInactiveTimers(ctx context.Context) error
- func (q *Queries) DeleteLeaderboardExclusion(ctx context.Context, arg DeleteLeaderboardExclusionParams) error
- func (q *Queries) DeleteLeaderboardOptIn(ctx context.Context, arg DeleteLeaderboardOptInParams) error
- func (q *Queries) DeleteLeaderboardStatsForPlayer(ctx context.Context, arg DeleteLeaderboardStatsForPlayerParams) error
- func (q *Queries) DeleteLegacyFarmerstate(ctx context.Context, id string) error
- func (q *Queries) DeleteTimer(ctx context.Context, id string) error
- func (q *Queries) DeleteUserCustomBanners(ctx context.Context, userID string) error
- func (q *Queries) DeleteUserGuildMemberships(ctx context.Context, userID string) error
- func (q *Queries) DeleteUserLeaderboardExclusions(ctx context.Context, userID string) error
- func (q *Queries) DeleteUserLeaderboardOptIns(ctx context.Context, userID string) error
- func (q *Queries) DeleteUserLeaderboardStats(ctx context.Context, player string) error
- func (q *Queries) DeleteUserSuspectMissions(ctx context.Context, userID string) error
- func (q *Queries) DeleteUserTimers(ctx context.Context, userID string) error
- func (q *Queries) DeleteUserWatches(ctx context.Context, userID string) error
- func (q *Queries) DeleteWatch(ctx context.Context, arg DeleteWatchParams) error
- func (q *Queries) GetActAsLinksForMain(ctx context.Context, mainUserID string) ([]string, error)
- func (q *Queries) GetActAsMainsForAlt(ctx context.Context, altUserID string) ([]string, error)
- func (q *Queries) GetActAsSwitch(ctx context.Context, arg GetActAsSwitchParams) (GetActAsSwitchRow, error)
- func (q *Queries) GetAllLegacyFarmerstate(ctx context.Context) ([]FarmerState, error)
- func (q *Queries) GetAllWatches(ctx context.Context) ([]Watch, error)
- func (q *Queries) GetCustomBanner(ctx context.Context, arg GetCustomBannerParams) (GetCustomBannerRow, error)
- func (q *Queries) GetCustomBannersForUser(ctx context.Context, userID string) ([]CustomBanner, error)
- func (q *Queries) GetEiIgnsByGuild(ctx context.Context, guildID string) ([]interface{}, error)
- func (q *Queries) GetEiIgnsByMiscString(ctx context.Context, arg GetEiIgnsByMiscStringParams) ([]interface{}, error)
- func (q *Queries) GetGuildMembers(ctx context.Context, guildID string) ([]string, error)
- func (q *Queries) GetIdsByMiscString(ctx context.Context, arg GetIdsByMiscStringParams) ([]string, error)
- func (q *Queries) GetLatestLeaderboardSnapDate(ctx context.Context, lbType string) (string, error)
- func (q *Queries) GetLeaderboardExclusionsForUser(ctx context.Context, userID string) ([]GetLeaderboardExclusionsForUserRow, error)
- func (q *Queries) GetLeaderboardForSnapDate(ctx context.Context, arg GetLeaderboardForSnapDateParams) ([]GetLeaderboardForSnapDateRow, error)
- func (q *Queries) GetLeaderboardOptInGuilds(ctx context.Context) ([]string, error)
- func (q *Queries) GetLeaderboardOptInUsers(ctx context.Context) ([]string, error)
- func (q *Queries) GetLeaderboardOptInsForGuild(ctx context.Context, guildID string) ([]GetLeaderboardOptInsForGuildRow, error)
- func (q *Queries) GetLeaderboardOptInsForUser(ctx context.Context, userID string) ([]GetLeaderboardOptInsForUserRow, error)
- func (q *Queries) GetLeaderboardSnapDates(ctx context.Context, lbType string) ([]string, error)
- func (q *Queries) GetLeaderboardSnapDatesForGuild(ctx context.Context, arg GetLeaderboardSnapDatesForGuildParams) ([]GetLeaderboardSnapDatesForGuildRow, error)
- func (q *Queries) GetLeaderboardStatForPlayer(ctx context.Context, arg GetLeaderboardStatForPlayerParams) (GetLeaderboardStatForPlayerRow, error)
- func (q *Queries) GetLeaderboardStatForPlayerAndSnapDate(ctx context.Context, arg GetLeaderboardStatForPlayerAndSnapDateParams) (GetLeaderboardStatForPlayerAndSnapDateRow, error)
- func (q *Queries) GetLegacyFarmerstate(ctx context.Context, id string) (FarmerState, error)
- func (q *Queries) GetStatsForPlayer(ctx context.Context, player string) ([]LeaderboardStat, error)
- func (q *Queries) GetStatsForPlayerInGuild(ctx context.Context, arg GetStatsForPlayerInGuildParams) ([]LeaderboardStat, error)
- func (q *Queries) GetSuspectMissions(ctx context.Context, userID string) ([]SuspectMission, error)
- func (q *Queries) GetTimers(ctx context.Context) ([]Timer, error)
- func (q *Queries) GetTimersForUser(ctx context.Context, userID string) ([]Timer, error)
- func (q *Queries) GetUserGuilds(ctx context.Context, userID string) ([]string, error)
- func (q *Queries) GetUserIdFromEiIgn(ctx context.Context, value sql.NullString) (string, error)
- func (q *Queries) GetUserIdsFromEiIgn(ctx context.Context, value sql.NullString) ([]string, error)
- func (q *Queries) GetWatchesForUser(ctx context.Context, userID string) ([]Watch, error)
- func (q *Queries) InsertActAsLink(ctx context.Context, arg InsertActAsLinkParams) error
- func (q *Queries) InsertLegacyFarmerstate(ctx context.Context, arg InsertLegacyFarmerstateParams) (FarmerState, error)
- func (q *Queries) InsertSuspectMission(ctx context.Context, arg InsertSuspectMissionParams) error
- func (q *Queries) InsertTimer(ctx context.Context, arg InsertTimerParams) error
- func (q *Queries) InsertWatch(ctx context.Context, arg InsertWatchParams) error
- func (q *Queries) IsActAsLinked(ctx context.Context, arg IsActAsLinkedParams) (int64, error)
- func (q *Queries) IsActAsLinkedEither(ctx context.Context, arg IsActAsLinkedEitherParams) (int64, error)
- func (q *Queries) PruneOlderLeaderboardStatsForPlayer(ctx context.Context, arg PruneOlderLeaderboardStatsForPlayerParams) error
- func (q *Queries) RemoveGuildMembership(ctx context.Context, arg RemoveGuildMembershipParams) error
- func (q *Queries) UpdateLegacyFarmerstate(ctx context.Context, arg UpdateLegacyFarmerstateParams) (int64, error)
- func (q *Queries) UpdateTimerMsg(ctx context.Context, arg UpdateTimerMsgParams) error
- func (q *Queries) UpdateTimerState(ctx context.Context, arg UpdateTimerStateParams) error
- func (q *Queries) UpsertActAsSwitch(ctx context.Context, arg UpsertActAsSwitchParams) error
- func (q *Queries) UpsertCustomBanner(ctx context.Context, arg UpsertCustomBannerParams) error
- func (q *Queries) UpsertLeaderboardExclusion(ctx context.Context, arg UpsertLeaderboardExclusionParams) error
- func (q *Queries) UpsertLeaderboardOptIn(ctx context.Context, arg UpsertLeaderboardOptInParams) error
- func (q *Queries) UpsertLeaderboardStat(ctx context.Context, arg UpsertLeaderboardStatParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type RemoveGuildMembershipParams
- type SuspectMission
- type Timer
- type UpdateLegacyFarmerstateParams
- type UpdateTimerMsgParams
- type UpdateTimerStateParams
- type UpsertActAsSwitchParams
- type UpsertCustomBannerParams
- type UpsertLeaderboardExclusionParams
- type UpsertLeaderboardOptInParams
- type UpsertLeaderboardStatParams
- type UserPrivacyData
- type Watch
Constants ¶
This section is empty.
Variables ¶
var ActAsForeverExpiry = time.Date(9999, 12, 31, 23, 59, 59, 0, time.UTC)
ActAsForeverExpiry represents an indefinite/forever expiration time for an act-as switch.
Functions ¶
func AddActAsLink ¶
AddActAsLink links altUserID as an alternate account for mainUserID.
func AddGuildMembership ¶
AddGuildMembership adds a user to a guild. Returns true if added, false if already a member.
func AddRecentCoopID ¶
AddRecentCoopID adds a coop ID to the recent list (max 5)
func AddTimer ¶
func AddTimer(id, userID, channelID, msgID string, reminder time.Time, message string, duration int64, origChannelID, origMsgID string, active bool)
AddTimer inserts a new timer into the database.
func AddWatch ¶
func AddWatch(userID, watchType, targetID string)
AddWatch inserts a new watch into the database.
func ClearActAsSwitch ¶
ClearActAsSwitch removes the active act-as switch for mainUserID in channelID.
func ClearAllActAsSwitches ¶
ClearAllActAsSwitches removes all active act-as switches for mainUserID across all channels.
func ClearEphemeralMessageSwitch ¶
func ClearEphemeralMessageSwitch(messageID string)
ClearEphemeralMessageSwitch removes the ephemeral message switch mapping.
func ClearPendingActAsRegistration ¶
func ClearPendingActAsRegistration(mainUserID string)
ClearPendingActAsRegistration removes a pending registration entry.
func DeleteAllActAsLinks ¶
DeleteAllActAsLinks removes all links involving userID.
func DeleteAllLeaderboardExclusionsForUserInGuild ¶
DeleteAllLeaderboardExclusionsForUserInGuild removes all exclusions for a user in a specific guild.
func DeleteAllLeaderboardOptInsForUserInGuild ¶
DeleteAllLeaderboardOptInsForUserInGuild removes all opt-ins for a user in a specific guild.
func DeleteAllLeaderboardStatsForPlayer ¶
DeleteAllLeaderboardStatsForPlayer removes every leaderboard stat for a player globally.
func DeleteAllLeaderboardStatsForPlayerInGuild ¶
DeleteAllLeaderboardStatsForPlayerInGuild is a no-op since leaderboard_stats is now global.
func DeleteFarmer ¶
func DeleteFarmer(userID string)
DeleteFarmer deletes a Farmer from the map and SQLite database tables
func DeleteInactiveTimers ¶
func DeleteInactiveTimers()
DeleteInactiveTimers removes all inactive timers from the database.
func DeleteLeaderboardExclusion ¶
DeleteLeaderboardExclusion removes a specific leaderboard exclusion record.
func DeleteLeaderboardOptIn ¶
DeleteLeaderboardOptIn removes a specific leaderboard opt-in record.
func DeleteLeaderboardStatsForPlayer ¶
DeleteLeaderboardStatsForPlayer removes snapshots for a specific player and type.
func DeleteTimer ¶
func DeleteTimer(id string)
DeleteTimer removes a timer from the database by its ID.
func DeleteUserWatches ¶
func DeleteUserWatches(userID string)
DeleteUserWatches deletes all watches for a given user.
func DeleteWatch ¶
func DeleteWatch(userID, watchType, targetID string)
DeleteWatch deletes a specific watch.
func FarmerExists ¶
FarmerExists returns true if a record for the given userID exists in farmer_state.
func FindAltDiscordID ¶
FindAltDiscordID returns the registered Discord user ID for an alt, if any. It checks direct Discord snowflake IDs, discord_id settings, exact in-game name matches in farmer state, and /act-as account links for the alt or its controller.
func FlushPendingSaves ¶
func FlushPendingSaves()
FlushPendingSaves forces an immediate write of all pending database updates.
func GetActAsLinks ¶
GetActAsLinks returns all alternate account user IDs linked to mainUserID.
func GetActAsMains ¶
GetActAsMains returns all main user IDs that have linked altUserID as an alternate.
func GetActAsSwitch ¶
func GetActAsSwitch(mainUserID, channelID string) (altUserID string, expiresAt time.Time, active bool)
GetActAsSwitch returns the active switch if unexpired and valid for channelID.
func GetAllActAsLinkedUsers ¶
GetAllActAsLinkedUsers returns all user IDs linked with userID in either direction.
func GetAltControllerByMiscString ¶
GetAltControllerByMiscString returns all IDs for farmers where MiscSettingsString[key] == value.
func GetDiscordUserIDFromEggIncName ¶
GetDiscordUserIDFromEggIncName retrieves the Discord user ID based on the provided eggincname. It also checks if the account is an alternate and returns the parent's Discord ID if so.
func GetDiscordUserIDFromEiIgn ¶
GetDiscordUserIDFromEiIgn retrieves the Discord user ID based on the provided ei_ign. It also checks if the account is an alternate and returns the parent's Discord ID if so.
func GetDiscordUserIDFromEiIgnExact ¶
GetDiscordUserIDFromEiIgnExact retrieves the Discord user ID based on the provided ei_ign without collapsing alternate accounts back to their controller.
func GetEffectiveUserID ¶
GetEffectiveUserID returns altUserID if mainUserID has an active, unexpired switch in any of contextIDs; otherwise mainUserID. Checks ephemeral message switch registrations first, then channel/thread switches.
func GetEffectiveUserIDAndExpiry ¶
func GetEffectiveUserIDAndExpiry(userID string, contextIDs ...string) (effectiveID string, expiresAt time.Time, isActingAs bool)
GetEffectiveUserIDAndExpiry returns the effective user ID, switch expiry, and whether an active switch is in place. Checks ephemeral message switch registrations first, then channel/thread switches.
func GetEggIncName ¶
GetEggIncName returns a Farmer Egg Inc name
func GetEiIgnsByGuild ¶
GetEiIgnsByGuild returns all ei_ign values for farmers who are members of the given guild.
func GetEiIgnsByMiscString ¶
GetEiIgnsByMiscString returns all ei_ign values for farmers where MiscSettingsString[key] == value.
func GetEphemeralMessageSwitch ¶
GetEphemeralMessageSwitch returns the altUserID if the message was launched under an act-as switch.
func GetGuildMembers ¶
GetGuildMembers returns all user IDs that are members of the given guild.
func GetLastSeen ¶
GetLastSeen returns the last time a farmer was added to a contract
func GetLatestLeaderboardSnapDate ¶
GetLatestLeaderboardSnapDate returns the most recent snap_date for a lb_type.
func GetLaunchHistory ¶
GetLaunchHistory returns a Farmer Launch History
func GetLeaderboardOptInGuilds ¶
GetLeaderboardOptInGuilds returns all distinct guild IDs that have at least one opt-in.
func GetLeaderboardOptInUsers ¶
GetLeaderboardOptInUsers returns all Discord user IDs who have at least one opt-in in any guild.
func GetLeaderboardSnapDates ¶
GetLeaderboardSnapDates returns all distinct snap_dates for a lb_type, newest first.
func GetLinkedAltIDs ¶
GetLinkedAltIDs returns all unique alternate account IDs linked to callerID.
func GetMiscSettingFlag ¶
GetMiscSettingFlag returns a Farmer sticky setting
func GetMiscSettingString ¶
GetMiscSettingString returns a Farmer sticky setting
func GetMissionShipPrimary ¶
GetMissionShipPrimary returns a Farmer Mission Ship Primary
func GetMissionShipSecondary ¶
GetMissionShipSecondary returns a Farmer Mission Ship Secondary
func GetPendingActAsRegistration ¶
GetPendingActAsRegistration retrieves a pending registration if not expired.
func GetPermitLevel ¶
GetPermitLevel returns a player's permit level (0 for standard, 1 for pro; defaults to 1 / Pro if unset).
func GetRecentCoopIDs ¶
GetRecentCoopIDs returns the list of recently used coop IDs
func GetSlashActAsCommand ¶
GetSlashActAsCommand returns the slash command definition for /act-as.
func GetSlashPrivacyCommand ¶
GetSlashPrivacyCommand creates a new slash command for setting Egg, Inc name
func GetUserEggIncID ¶
GetUserEggIncID returns the decrypted Egg Inc ID for a user or alt.
func GetUserGuilds ¶
GetUserGuilds returns all guild IDs the user belongs to.
func HandleActAsAutocomplete ¶
func HandleActAsAutocomplete(e *dc.AutocompleteEvent)
HandleActAsAutocomplete provides autocomplete suggestions for /act-as subcommands.
func HandleActAsCommand ¶
func HandleActAsCommand(client dc.Client, e *dc.CommandEvent)
HandleActAsCommand routes subcommands for /act-as. Note: /act-as always resolves e.UserID() as the real user and never applies act-as mapping.
func HandleActAsRegisterModalSubmit ¶
func HandleActAsRegisterModalSubmit(client dc.Client, e *dc.ModalEvent)
HandleActAsRegisterModalSubmit processes the submitted verification code modal.
func HandlePrivacy ¶
func HandlePrivacy(e *dc.CommandEvent)
HandlePrivacy will handle the /privacy command through the dc facade.
func HandlePrivacyAutocomplete ¶
func HandlePrivacyAutocomplete(e *dc.AutocompleteEvent)
HandlePrivacyAutocomplete provides autocomplete suggestions for the alt option on /privacy.
func HandlePrivacyButton ¶
func HandlePrivacyButton(e *dc.ComponentEvent)
HandlePrivacyButton handles DELETE and KEEP confirmation button clicks for /privacy data removal.
func HandleSetEggIncName ¶
func HandleSetEggIncName(client dc.Client, e *dc.CommandEvent, isCoordinator func(dc.Client, string) bool)
HandleSetEggIncName handles the /seteggincname command
func HasProPermit ¶
HasProPermit returns true if the player has the Pro Permit (permit level == 1).
func InsertSuspectMission ¶
func InsertSuspectMission(arg InsertSuspectMissionParams) error
InsertSuspectMission records a suspect mission anomaly to the database.
func IsActAsForever ¶
IsActAsForever reports whether exp indicates a switch that does not expire.
func IsActAsLinked ¶
IsActAsLinked reports whether altUserID is currently linked to mainUserID.
func IsActAsLinkedEither ¶
IsActAsLinkedEither reports whether u1 and u2 are linked in either direction.
func IsDiscordSnowflake ¶
IsDiscordSnowflake reports whether s looks like a Discord snowflake ID (17-20 digits).
func IsUltra ¶
IsUltra will return if a player has joined an ultra contract in last 60 days, or has an active Ultra subscription.
func MoveActAsSwitch ¶
MoveActAsSwitch transfers an active act-as switch for mainUserID from fromChannelID to toChannelID, preserving expiry.
func MoveActAsSwitchWithExpiry ¶
func MoveActAsSwitchWithExpiry(mainUserID, fromChannelID, toChannelID string, newExpiry time.Time) error
MoveActAsSwitchWithExpiry transfers an active act-as switch for mainUserID from fromChannelID to toChannelID with a new expiry.
func PruneOlderLeaderboardStatsForPlayer ¶
PruneOlderLeaderboardStatsForPlayer removes older leaderboard stats for a specific player and type.
func PurgeAltLinks ¶
func PurgeAltLinks(mainUserID, altUserID string)
PurgeAltLinks removes all act-as links, switches, and alt-controller associations for altUserID.
func ReencryptFarmerEIDs ¶
ReencryptFarmerEIDs safely migrates all encrypted Egg Inc IDs in farmer_state from oldKeyB64 to newKeyB64. It returns the number of successfully migrated records and the total number of records that contained an encrypted EID.
func RegisterEphemeralMessageSwitch ¶
func RegisterEphemeralMessageSwitch(messageID, mainUserID, altUserID string)
RegisterEphemeralMessageSwitch records that an ephemeral response message was created while acting as altUserID.
func RemoveActAsLink ¶
RemoveActAsLink removes the link between mainUserID and altUserID.
func RemoveCustomBanner ¶
RemoveCustomBanner deletes a user's custom banner from the database.
func RemoveGuildMembership ¶
func RemoveGuildMembership(userID, guildID string)
RemoveGuildMembership removes a user from a guild.
func ResolveAltSelection ¶
func ResolveAltSelection(userID string, altParam string, cmdName string) (targetID string, eggIncID string, notice string)
ResolveAltSelection determines which user ID and Egg Inc ID to display, along with any informational message.
func SetActAsSwitch ¶
SetActAsSwitch sets an active act-as switch for mainUserID in channelID until expiresAt.
func SetCustomBanner ¶
SetCustomBanner saves a user's custom banner PNG bytes into the database.
func SetEggIncName ¶
SetEggIncName sets a Farmer Egg Inc name
func SetFarmerBackupDetails ¶
func SetFarmerBackupDetails(userID string, backup *ei.Backup) (newIGN string, ignChanged bool, newTE uint32, teChanged bool)
SetFarmerBackupDetails updates the player's saved game name ("ei_ign"), Truth Eggs ("TE"), Ultra status, and Permit Level from their Egg Inc backup. It returns the updated game name, whether the name changed, the updated Truth Egg count, and whether the Truth Egg count changed.
func SetLastSeen ¶
func SetLastSeen(userID string)
SetLastSeen updates the timestamp of the last time a farmer was added to a contract
func SetLaunchHistory ¶
SetLaunchHistory sets a Farmer Launch History
func SetMiscSettingFlag ¶
SetMiscSettingFlag sets a key-value sticky setting
func SetMiscSettingString ¶
SetMiscSettingString sets a key-value sticky setting
func SetMissionShipPrimary ¶
SetMissionShipPrimary sets a Farmer Mission Ship Primary
func SetMissionShipSecondary ¶
SetMissionShipSecondary sets a Farmer Mission Ship Secondary
func SetPermitLevel ¶
SetPermitLevel sets a player's permit level (0 for standard, 1 for pro).
func SetUltra ¶
SetUltra sets whether a player is an ultra player. An optional boolean parameter specifies the ultra status (defaults to true).
func SlashSetEggIncNameCommand ¶
SlashSetEggIncNameCommand creates a new slash command for setting Egg, Inc name
func StorePendingActAsRegistration ¶
StorePendingActAsRegistration saves a pending verification code for account linking.
func SyncCustomBanner ¶
SyncCustomBanner checks if a custom banner exists in the database and is newer than the file on disk. If it is, it writes the image data from the database to the specified path.
func UpdateTimerMsg ¶
func UpdateTimerMsg(id, channelID, msgID string)
UpdateTimerMsg updates the channel and message ID of a timer in the database.
func UpdateTimerState ¶
UpdateTimerState updates the active state of a timer in the database.
func UpsertLeaderboardExclusion ¶
UpsertLeaderboardExclusion adds a leaderboard exclusion record for a user in a guild.
func UpsertLeaderboardOptIn ¶
UpsertLeaderboardOptIn adds a leaderboard opt-in record for a user in a guild.
func UpsertLeaderboardStat ¶
func UpsertLeaderboardStat(lbType, player, gameName, snapDate string, value float64, details sql.NullString) error
UpsertLeaderboardStat saves one leaderboard snapshot row (upsert on primary key).
Types ¶
type ActAsSwitch ¶
type AltAccount ¶
AltAccount holds identification and display info for an alternate account.
func GetUserAltsWithSavedEID ¶
func GetUserAltsWithSavedEID(userID string) []AltAccount
GetUserAltsWithSavedEID returns all registered alternate accounts for userID that have a saved Egg Inc ID.
type CustomBanner ¶
type DeleteActAsLinkParams ¶
type DeleteActAsSwitchParams ¶
type DeleteWatchParams ¶
type Farmer ¶
type Farmer struct {
UserID string // Discord User ID
EggIncName string // User's Egg Inc name
Ping bool // True/False
Tokens int // Number of tokens this user wants
LaunchChain bool // Launch History chain option
MissionShipPrimary int // Launch Helper Ship Selection - Primary
MissionShipSecondary int // Launch Helper Ship Selection - Secondary
UltraContract time.Time // Date last Ultra contract was detected
MiscSettingsFlag map[string]bool
MiscSettingsString map[string]string
Links []Link // Array of Links
LastUpdated time.Time
LastSeen time.Time // Last time farmer was added to a contract
DataPrivacy bool // User data privacy setting
}
Farmer struct to store user data
type FarmerGuildMembership ¶
type FarmerState ¶
type FarmerState struct {
ID string
Key string
Value sql.NullString
}
type GetActAsSwitchParams ¶
type GetActAsSwitchRow ¶
type GetCustomBannerParams ¶
type GetCustomBannerRow ¶
type GetEiIgnsByMiscStringParams ¶
type GetEiIgnsByMiscStringParams struct {
Column1 sql.NullString
Value sql.NullString
}
type GetIdsByMiscStringParams ¶
type GetIdsByMiscStringParams struct {
Column1 sql.NullString
Value sql.NullString
}
type GetLeaderboardExclusionsForUserRow ¶
func GetLeaderboardExclusionsForUser ¶
func GetLeaderboardExclusionsForUser(userID string) ([]GetLeaderboardExclusionsForUserRow, error)
GetLeaderboardExclusionsForUser returns all (guild_id, lb_type) exclusion pairs for a given user.
type GetLeaderboardForSnapDateRow ¶
type GetLeaderboardForSnapDateRow struct {
Player string
GameName string
Value float64
Details sql.NullString
}
func GetLeaderboardForSnapDate ¶
func GetLeaderboardForSnapDate(lbType, guildID, snapDate string) ([]GetLeaderboardForSnapDateRow, error)
GetLeaderboardForSnapDate returns all rows for a lb_type, guild_id and snap_date, ordered by value DESC.
type GetLeaderboardOptInsForGuildRow ¶
func GetLeaderboardOptInsForGuild ¶
func GetLeaderboardOptInsForGuild(guildID string) ([]GetLeaderboardOptInsForGuildRow, error)
GetLeaderboardOptInsForGuild returns all (user_id, lb_type) pairs for a given guild.
type GetLeaderboardOptInsForUserRow ¶
func GetLeaderboardOptInsForUser ¶
func GetLeaderboardOptInsForUser(userID string) ([]GetLeaderboardOptInsForUserRow, error)
GetLeaderboardOptInsForUser returns all (guild_id, lb_type) pairs for a given user.
type GetLeaderboardSnapDatesForGuildRow ¶
func GetLeaderboardSnapDatesForGuild ¶
func GetLeaderboardSnapDatesForGuild(guildID, lbType string) ([]GetLeaderboardSnapDatesForGuildRow, error)
GetLeaderboardSnapDatesForGuild returns all distinct snap_dates and player counts for a given lb_type and guild_id, newest first.
type GetLeaderboardStatForPlayerRow ¶
type GetLeaderboardStatForPlayerRow struct {
Player string
GameName string
SnapDate string
Value float64
Details sql.NullString
}
func GetLeaderboardStatForPlayer ¶
func GetLeaderboardStatForPlayer(lbType, player string) (GetLeaderboardStatForPlayerRow, error)
GetLeaderboardStatForPlayer returns the most recent stat for a player + lb_type.
func GetLeaderboardStatForPlayerAndSnapDate ¶
func GetLeaderboardStatForPlayerAndSnapDate(lbType, player, snapDate string) (GetLeaderboardStatForPlayerRow, error)
GetLeaderboardStatForPlayerAndSnapDate returns the stat for a player + lb_type + snap_date.
type InsertActAsLinkParams ¶
type InsertLegacyFarmerstateParams ¶
type InsertLegacyFarmerstateParams struct {
ID string
Value sql.NullString
}
type InsertTimerParams ¶
type InsertWatchParams ¶
type IsActAsLinkedParams ¶
type LeaderboardExclusion ¶
type LeaderboardOptin ¶
type LeaderboardStat ¶
type LeaderboardStat struct {
LbType string
Player string
GameName string
SnapDate string
Value float64
Details sql.NullString
}
func GetStatsForPlayer ¶
func GetStatsForPlayer(player string) ([]LeaderboardStat, error)
GetStatsForPlayer returns all leaderboard stats for a specific player across all types.
func GetStatsForPlayerInGuild ¶
func GetStatsForPlayerInGuild(player, guildID string) ([]LeaderboardStat, error)
GetStatsForPlayerInGuild returns all leaderboard stats for a player in a specific guild.
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddGuildMembership ¶
func (*Queries) ClearExtraLegacyRecords ¶
func (*Queries) DeleteActAsLink ¶
func (*Queries) DeleteActAsSwitch ¶
func (*Queries) DeleteActAsSwitchForPair ¶
func (*Queries) DeleteAllActAsLinksForUser ¶
func (*Queries) DeleteAllActAsSwitchesForUser ¶
func (*Queries) DeleteAllLeaderboardExclusionsForUserInGuild ¶
func (q *Queries) DeleteAllLeaderboardExclusionsForUserInGuild(ctx context.Context, arg DeleteAllLeaderboardExclusionsForUserInGuildParams) error
func (*Queries) DeleteAllLeaderboardOptInsForUserInGuild ¶
func (q *Queries) DeleteAllLeaderboardOptInsForUserInGuild(ctx context.Context, arg DeleteAllLeaderboardOptInsForUserInGuildParams) error
func (*Queries) DeleteAllLeaderboardStatsForPlayerInGuild ¶
No-op since leaderboard_stats is now global.
func (*Queries) DeleteCustomBanner ¶
func (q *Queries) DeleteCustomBanner(ctx context.Context, arg DeleteCustomBannerParams) error
func (*Queries) DeleteExpiredActAsSwitches ¶
func (*Queries) DeleteFarmerLegacyRecords ¶
func (*Queries) DeleteFarmerRecord ¶
func (*Queries) DeleteInactiveTimers ¶
func (*Queries) DeleteLeaderboardExclusion ¶
func (q *Queries) DeleteLeaderboardExclusion(ctx context.Context, arg DeleteLeaderboardExclusionParams) error
func (*Queries) DeleteLeaderboardOptIn ¶
func (q *Queries) DeleteLeaderboardOptIn(ctx context.Context, arg DeleteLeaderboardOptInParams) error
func (*Queries) DeleteLeaderboardStatsForPlayer ¶
func (q *Queries) DeleteLeaderboardStatsForPlayer(ctx context.Context, arg DeleteLeaderboardStatsForPlayerParams) error
func (*Queries) DeleteLegacyFarmerstate ¶
func (*Queries) DeleteUserCustomBanners ¶
func (*Queries) DeleteUserGuildMemberships ¶
func (*Queries) DeleteUserLeaderboardExclusions ¶
func (*Queries) DeleteUserLeaderboardOptIns ¶
func (*Queries) DeleteUserLeaderboardStats ¶
func (*Queries) DeleteUserSuspectMissions ¶
func (*Queries) DeleteUserTimers ¶
func (*Queries) DeleteUserWatches ¶
func (*Queries) DeleteWatch ¶
func (q *Queries) DeleteWatch(ctx context.Context, arg DeleteWatchParams) error
func (*Queries) GetActAsLinksForMain ¶
func (*Queries) GetActAsMainsForAlt ¶
func (*Queries) GetActAsSwitch ¶
func (q *Queries) GetActAsSwitch(ctx context.Context, arg GetActAsSwitchParams) (GetActAsSwitchRow, error)
func (*Queries) GetAllLegacyFarmerstate ¶
func (q *Queries) GetAllLegacyFarmerstate(ctx context.Context) ([]FarmerState, error)
func (*Queries) GetAllWatches ¶
func (*Queries) GetCustomBanner ¶
func (q *Queries) GetCustomBanner(ctx context.Context, arg GetCustomBannerParams) (GetCustomBannerRow, error)
func (*Queries) GetCustomBannersForUser ¶
func (*Queries) GetEiIgnsByGuild ¶
func (*Queries) GetEiIgnsByMiscString ¶
func (q *Queries) GetEiIgnsByMiscString(ctx context.Context, arg GetEiIgnsByMiscStringParams) ([]interface{}, error)
func (*Queries) GetGuildMembers ¶
func (*Queries) GetIdsByMiscString ¶
func (*Queries) GetLatestLeaderboardSnapDate ¶
Returns the most recent snap_date recorded for a given lb_type.
func (*Queries) GetLeaderboardExclusionsForUser ¶
func (q *Queries) GetLeaderboardExclusionsForUser(ctx context.Context, userID string) ([]GetLeaderboardExclusionsForUserRow, error)
Returns all (guild_id, lb_type) exclusion pairs for a given user.
func (*Queries) GetLeaderboardForSnapDate ¶
func (q *Queries) GetLeaderboardForSnapDate(ctx context.Context, arg GetLeaderboardForSnapDateParams) ([]GetLeaderboardForSnapDateRow, error)
Returns all rows for a given lb_type, guild_id, and snap_date, ordered by value descending.
func (*Queries) GetLeaderboardOptInGuilds ¶
Returns all distinct guild IDs that have at least one opt-in.
func (*Queries) GetLeaderboardOptInUsers ¶
Returns all Discord user IDs who have at least one opt-in in any guild.
func (*Queries) GetLeaderboardOptInsForGuild ¶
func (q *Queries) GetLeaderboardOptInsForGuild(ctx context.Context, guildID string) ([]GetLeaderboardOptInsForGuildRow, error)
Returns all (user_id, lb_type) pairs for a given guild.
func (*Queries) GetLeaderboardOptInsForUser ¶
func (q *Queries) GetLeaderboardOptInsForUser(ctx context.Context, userID string) ([]GetLeaderboardOptInsForUserRow, error)
Returns all (guild_id, lb_type) pairs for a given user.
func (*Queries) GetLeaderboardSnapDates ¶
Returns all distinct snap_dates for a given lb_type, newest first.
func (*Queries) GetLeaderboardSnapDatesForGuild ¶
func (q *Queries) GetLeaderboardSnapDatesForGuild(ctx context.Context, arg GetLeaderboardSnapDatesForGuildParams) ([]GetLeaderboardSnapDatesForGuildRow, error)
Returns distinct snap_dates and player counts for a given lb_type and guild_id, newest first.
func (*Queries) GetLeaderboardStatForPlayer ¶
func (q *Queries) GetLeaderboardStatForPlayer(ctx context.Context, arg GetLeaderboardStatForPlayerParams) (GetLeaderboardStatForPlayerRow, error)
Returns the most recent stat row for a player + lb_type.
func (*Queries) GetLeaderboardStatForPlayerAndSnapDate ¶
func (q *Queries) GetLeaderboardStatForPlayerAndSnapDate(ctx context.Context, arg GetLeaderboardStatForPlayerAndSnapDateParams) (GetLeaderboardStatForPlayerAndSnapDateRow, error)
Returns the stat row for a player + lb_type + snap_date.
func (*Queries) GetLegacyFarmerstate ¶
func (*Queries) GetStatsForPlayer ¶
Returns all leaderboard stats for a specific player across all types, newest first.
func (*Queries) GetStatsForPlayerInGuild ¶
func (q *Queries) GetStatsForPlayerInGuild(ctx context.Context, arg GetStatsForPlayerInGuildParams) ([]LeaderboardStat, error)
Returns all leaderboard stats for a specific player in a specific guild.
func (*Queries) GetSuspectMissions ¶
func (*Queries) GetTimersForUser ¶
func (*Queries) GetUserGuilds ¶
func (*Queries) GetUserIdFromEiIgn ¶
func (*Queries) GetUserIdsFromEiIgn ¶
func (*Queries) GetWatchesForUser ¶
func (*Queries) InsertActAsLink ¶
func (q *Queries) InsertActAsLink(ctx context.Context, arg InsertActAsLinkParams) error
func (*Queries) InsertLegacyFarmerstate ¶
func (q *Queries) InsertLegacyFarmerstate(ctx context.Context, arg InsertLegacyFarmerstateParams) (FarmerState, error)
func (*Queries) InsertSuspectMission ¶
func (q *Queries) InsertSuspectMission(ctx context.Context, arg InsertSuspectMissionParams) error
func (*Queries) InsertTimer ¶
func (q *Queries) InsertTimer(ctx context.Context, arg InsertTimerParams) error
func (*Queries) InsertWatch ¶
func (q *Queries) InsertWatch(ctx context.Context, arg InsertWatchParams) error
func (*Queries) IsActAsLinked ¶
func (*Queries) IsActAsLinkedEither ¶
func (*Queries) PruneOlderLeaderboardStatsForPlayer ¶
func (q *Queries) PruneOlderLeaderboardStatsForPlayer(ctx context.Context, arg PruneOlderLeaderboardStatsForPlayerParams) error
Deletes older leaderboard stats for a player if RetainRecentOnly is true.
func (*Queries) RemoveGuildMembership ¶
func (q *Queries) RemoveGuildMembership(ctx context.Context, arg RemoveGuildMembershipParams) error
func (*Queries) UpdateLegacyFarmerstate ¶
func (*Queries) UpdateTimerMsg ¶
func (q *Queries) UpdateTimerMsg(ctx context.Context, arg UpdateTimerMsgParams) error
func (*Queries) UpdateTimerState ¶
func (q *Queries) UpdateTimerState(ctx context.Context, arg UpdateTimerStateParams) error
func (*Queries) UpsertActAsSwitch ¶
func (q *Queries) UpsertActAsSwitch(ctx context.Context, arg UpsertActAsSwitchParams) error
func (*Queries) UpsertCustomBanner ¶
func (q *Queries) UpsertCustomBanner(ctx context.Context, arg UpsertCustomBannerParams) error
func (*Queries) UpsertLeaderboardExclusion ¶
func (q *Queries) UpsertLeaderboardExclusion(ctx context.Context, arg UpsertLeaderboardExclusionParams) error
func (*Queries) UpsertLeaderboardOptIn ¶
func (q *Queries) UpsertLeaderboardOptIn(ctx context.Context, arg UpsertLeaderboardOptInParams) error
func (*Queries) UpsertLeaderboardStat ¶
func (q *Queries) UpsertLeaderboardStat(ctx context.Context, arg UpsertLeaderboardStatParams) error
Inserts or replaces a leaderboard snapshot for (lb_type, player, snap_date).
type SuspectMission ¶
type Timer ¶
type UpdateLegacyFarmerstateParams ¶
type UpdateLegacyFarmerstateParams struct {
Value sql.NullString
ID string
}
type UpdateTimerMsgParams ¶
type UpdateTimerStateParams ¶
type UpsertActAsSwitchParams ¶
type UserPrivacyData ¶
type UserPrivacyData struct {
FarmerState *Farmer `json:"farmer_state,omitempty"`
GuildMemberships []string `json:"guild_memberships,omitempty"`
CustomBanners []CustomBanner `json:"custom_banners,omitempty"`
Timers []Timer `json:"timers,omitempty"`
SuspectMissions []SuspectMission `json:"suspect_missions,omitempty"`
LeaderboardStats []LeaderboardStat `json:"leaderboard_stats,omitempty"`
LeaderboardOptins []GetLeaderboardOptInsForUserRow `json:"leaderboard_optins,omitempty"`
LeaderboardExclusions []GetLeaderboardExclusionsForUserRow `json:"leaderboard_exclusions,omitempty"`
Watches []Watch `json:"watches,omitempty"`
ActAsLinks []string `json:"act_as_links,omitempty"`
ActAsMains []string `json:"act_as_mains,omitempty"`
}
UserPrivacyData contains all information we store about a user
func GetFullUserData ¶
func GetFullUserData(userID string) *UserPrivacyData
type Watch ¶
func GetAllWatches ¶
func GetAllWatches() []Watch
GetAllWatches returns all watches in the database.
func GetWatchesForUser ¶
GetWatchesForUser returns all watches for a given user.