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 LikedSongs() LikedSongsDB PlayHistory() PlayHistoriesDB Tags() TagsDB Voters() VotersDB Close() error }
func SetupDatabase ¶
func SetupDatabase(config DatabaseConfig) (DB, error)
type DatabaseConfig ¶
type GuildSettingsDB ¶
type LikedSongsDB ¶
type LikedSongsDB interface { Get(userID snowflake.Snowflake, title string) (LikedSong, error) GetAll(userID snowflake.Snowflake) ([]LikedSong, error) Add(userID snowflake.Snowflake, query string, title string) error Delete(userID snowflake.Snowflake, title string) error DeleteAll(userID snowflake.Snowflake) error }
type PlayHistoriesDB ¶
type TagsDB ¶
type TagsDB interface { Get(guildID snowflake.Snowflake, name string) (Tag, error) GetAll(guildID snowflake.Snowflake) ([]Tag, error) Create(guildID snowflake.Snowflake, ownerID snowflake.Snowflake, name string, content string) error Edit(guildID snowflake.Snowflake, name string, content string) error IncrementUses(guildID snowflake.Snowflake, name string) error Delete(guildID snowflake.Snowflake, name string) error }
Click to show internal directories.
Click to hide internal directories.