Documentation ¶
Index ¶
- type Config
- type SQLite
- func (s *SQLite) AddLogEntry(sle *database.SoundLogEntry) error
- func (s *SQLite) AddSoundStatsCount(guildID, sound string) error
- func (s *SQLite) Close()
- func (s *SQLite) Connect(params ...interface{}) error
- func (s *SQLite) GetAuthToken(userID string) (*database.AuthTokenEntry, error)
- func (s *SQLite) GetConfigStructure() interface{}
- func (s *SQLite) GetFastTrigger(userID string) (string, error)
- func (s *SQLite) GetFavorites(userID string) ([]string, error)
- func (s *SQLite) GetGuildPrefix(guildID string) (string, error)
- func (s *SQLite) GetGuildVolume(guildID string) (int, error)
- func (s *SQLite) GetLogEntries(guildID string, from, limit int) ([]*database.SoundLogEntry, error)
- func (s *SQLite) GetLogLen(guildID string) (int, error)
- func (s *SQLite) GetSoundStats(guildID string, limit int) ([]*database.SoundStatsEntry, error)
- func (s *SQLite) GetUserPermissionLevel(userID string, roles []string) (int, error)
- func (s *SQLite) SetAuthToken(userID, tokenHash string, expires ...time.Time) error
- func (s *SQLite) SetFastTrigger(userID, val string) error
- func (s *SQLite) SetFavorite(userID, sound string) error
- func (s *SQLite) SetGuildPrefix(guildID, prefix string) error
- func (s *SQLite) SetGuildVolume(guildID string, volume int) error
- func (s *SQLite) UnsetFavorite(userID, sound string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DSN string `json:"dsn"`
}
Config contains the configuration values for the SQLite database connection.
type SQLite ¶
type SQLite struct {
// contains filtered or unexported fields
}
SQLite maintains the connection to the sqlite database file.
func (*SQLite) AddLogEntry ¶
func (s *SQLite) AddLogEntry(sle *database.SoundLogEntry) error
func (*SQLite) AddSoundStatsCount ¶
func (*SQLite) GetAuthToken ¶
func (s *SQLite) GetAuthToken(userID string) (*database.AuthTokenEntry, error)
func (*SQLite) GetConfigStructure ¶
func (s *SQLite) GetConfigStructure() interface{}
GetConfigStructure returns an example object of the configuration structure for setting up the SQLite connection
func (*SQLite) GetGuildPrefix ¶
GetGuildPrefix returns the individual prefix for a guild by its ID.
func (*SQLite) GetLogEntries ¶
func (*SQLite) GetSoundStats ¶
func (*SQLite) GetUserPermissionLevel ¶
GetUserPermissionLevel returns the individual permission level by the users ID and/or the users role IDs.
func (*SQLite) SetAuthToken ¶
func (*SQLite) SetFastTrigger ¶
func (*SQLite) SetFavorite ¶
func (*SQLite) SetGuildPrefix ¶
SetGuildPrefix sets a prefix for a specific guild.
func (*SQLite) UnsetFavorite ¶
Click to show internal directories.
Click to hide internal directories.