Documentation ¶
Index ¶
- Constants
- Variables
- func ActiveServers(ctx context.Context, q *sqlc.Queries) (servers map[model.MessageTarget]model.ServerStatus, err error)
- func AddChannel(ctx context.Context, q *sqlc.Queries, channel model.Channel) (err error)
- func AddFlagMapping(ctx context.Context, q *sqlc.Queries, mapping model.FlagMapping) (err error)
- func AddGuild(ctx context.Context, q *sqlc.Queries, guild model.Guild) (err error)
- func AddTracking(ctx context.Context, q *sqlc.Queries, tracking model.Tracking) (err error)
- func ChangedMessageMentions(ctx context.Context, tx *sql.Tx, currentMentions model.MessageMentions) (messageMentions model.MessageMentions, err error)
- func ChangedServers(ctx context.Context, q *sqlc.Queries) (_ map[model.MessageTarget]model.ChangedServerStatus, err error)
- func ExistsServer(ctx context.Context, q *sqlc.Queries, address string) (found bool, err error)
- func GetChannel(ctx context.Context, q *sqlc.Queries, guildId discord.GuildID, ...) (_ model.Channel, err error)
- func GetFlag(ctx context.Context, q *sqlc.Queries, flagId int16) (_ model.Flag, err error)
- func GetFlagByAbbr(ctx context.Context, q *sqlc.Queries, abbr string) (_ model.Flag, err error)
- func GetFlagMapping(ctx context.Context, q *sqlc.Queries, guildId discord.GuildID, ...) (_ model.FlagMapping, err error)
- func GetGuild(ctx context.Context, q *sqlc.Queries, guildID discord.GuildID) (guild model.Guild, err error)
- func GetPlayerCountNotification(ctx context.Context, q *sqlc.Queries, t model.MessageUserTarget) (notification model.PlayerCountNotification, err error)
- func GetTargetListNotifications(ctx context.Context, q *sqlc.Queries, ...) (_ map[model.MessageTarget]model.ChangedServerStatus, err error)
- func IsUniqueConstraintErr(err error) bool
- func ListAllPlayerCountNotifications(ctx context.Context, q *sqlc.Queries) (notifications []model.PlayerCountNotification, err error)
- func ListAllTrackings(ctx context.Context, q *sqlc.Queries) (trackings model.Trackings, err error)
- func ListChannels(ctx context.Context, q *sqlc.Queries, guildID discord.GuildID) (model.Channels, error)
- func ListFlagMappings(ctx context.Context, q *sqlc.Queries, guildId discord.GuildID, ...) (_ model.FlagMappings, err error)
- func ListFlags(ctx context.Context, q *sqlc.Queries) (_ []model.Flag, err error)
- func ListGuilds(ctx context.Context, q *sqlc.Queries) (guilds model.Guilds, err error)
- func ListPrevMessageMentions(ctx context.Context, q *sqlc.Queries) (messageMentions model.MessageMentions, err error)
- func ListTrackingsByChannelID(ctx context.Context, q *sqlc.Queries, guildID discord.GuildID, ...) (trackings model.Trackings, err error)
- func PrevActiveServers(ctx context.Context, q *sqlc.Queries) (servers map[model.MessageTarget]model.ServerStatus, err error)
- func RemoveChannel(ctx context.Context, q *sqlc.Queries, guildID discord.GuildID, ...) (err error)
- func RemoveFlagMapping(ctx context.Context, q *sqlc.Queries, guildId discord.GuildID, ...) (err error)
- func RemoveGuild(ctx context.Context, q *sqlc.Queries, guildID discord.GuildID) (guild model.Guild, err error)
- func RemoveMessageMentions(ctx context.Context, q *sqlc.Queries, mts []model.MessageTarget) (err error)
- func RemovePlayerCountNotification(ctx context.Context, q *sqlc.Queries, n model.PlayerCountNotification) (err error)
- func RemovePlayerCountNotifications(ctx context.Context, q *sqlc.Queries) (err error)
- func RemoveTrackingByMessageID(ctx context.Context, q *sqlc.Queries, guildID discord.GuildID, ...) (err error)
- func SetPlayerCountNotification(ctx context.Context, q *sqlc.Queries, n model.PlayerCountNotification) (err error)
- func SetPlayerCountNotifications(ctx context.Context, q *sqlc.Queries, ...) (err error)
- func SetServers(ctx context.Context, q *sqlc.Queries, servers []model.Server) error
- func StartChannel(ctx context.Context, q *sqlc.Queries, guildID discord.GuildID, ...) (c model.Channel, err error)
- func StopChannel(ctx context.Context, q *sqlc.Queries, guildID discord.GuildID, ...) (c model.Channel, err error)
Constants ¶
View Source
const (
UniqueConstraintViolation = "23505"
)
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrAlreadyExists = errors.New("already exists") )
Functions ¶
func ActiveServers ¶
func ActiveServers(ctx context.Context, q *sqlc.Queries) (servers map[model.MessageTarget]model.ServerStatus, err error)
func AddChannel ¶
func AddFlagMapping ¶
func AddTracking ¶
func ChangedMessageMentions ¶
func ChangedMessageMentions( ctx context.Context, tx *sql.Tx, currentMentions model.MessageMentions, ) ( messageMentions model.MessageMentions, err error, )
TODO: continue here
func ChangedServers ¶
func ChangedServers(ctx context.Context, q *sqlc.Queries) (_ map[model.MessageTarget]model.ChangedServerStatus, err error)
func ExistsServer ¶
func GetChannel ¶
func GetFlagByAbbr ¶
func GetFlagMapping ¶
func GetPlayerCountNotification ¶
func GetPlayerCountNotification( ctx context.Context, q *sqlc.Queries, t model.MessageUserTarget, ) ( notification model.PlayerCountNotification, err error, )
func GetTargetListNotifications ¶
func GetTargetListNotifications( ctx context.Context, q *sqlc.Queries, servers map[model.MessageTarget]model.ChangedServerStatus) ( _ map[model.MessageTarget]model.ChangedServerStatus, err error, )
func IsUniqueConstraintErr ¶
func ListAllTrackings ¶
func ListChannels ¶
func ListFlagMappings ¶
func ListGuilds ¶
func ListPrevMessageMentions ¶
func PrevActiveServers ¶
func PrevActiveServers(ctx context.Context, q *sqlc.Queries) (servers map[model.MessageTarget]model.ServerStatus, err error)
func RemoveChannel ¶
func RemoveFlagMapping ¶
func RemoveGuild ¶
func RemoveMessageMentions ¶
func SetServers ¶
func StartChannel ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.