Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { GuildSettings() GuildSettingsDB LikedTracks() LikedTracksDB PlayHistory() PlayHistoriesDB Tags() TagsDB Voters() VotersDB Reports() ReportsDB Close() error }
func SetupDatabase ¶
func SetupDatabase(config DatabaseConfig) (DB, error)
type DatabaseConfig ¶
type GuildSettingsDB ¶
type LikedTracksDB ¶ added in v0.5.0
type PlayHistoriesDB ¶
type ReportsDB ¶
type ReportsDB interface { Get(id int32) (Reports, error) GetCount(userID snowflake.ID, guildID snowflake.ID) (int, error) GetAll(userID snowflake.ID, guildID snowflake.ID) ([]Reports, error) Create(userID snowflake.ID, guildID snowflake.ID, description string, createdAt time.Time, messageID snowflake.ID, channelID snowflake.ID) (int32, error) Confirm(id int32) error Delete(id int32) error DeleteAll(userID snowflake.ID, guildID snowflake.ID) error }
type TagsDB ¶
type TagsDB interface { Get(guildID snowflake.ID, name string) (Tags, error) GetAll(guildID snowflake.ID) ([]Tags, error) Create(guildID snowflake.ID, ownerID snowflake.ID, name string, content string) error Edit(guildID snowflake.ID, name string, content string) error IncrementUses(guildID snowflake.ID, name string) error Delete(guildID snowflake.ID, name string) error }
Click to show internal directories.
Click to hide internal directories.