postgres

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}

func NewPostgres

func NewPostgres(c PostgresConfig) (*Postgres, error)

func (*Postgres) AddAdmin

func (t *Postgres) AddAdmin(userID string) error

func (*Postgres) AddFavorite

func (t *Postgres) AddFavorite(userID, ident string) error

func (*Postgres) Close

func (t *Postgres) Close() error

func (*Postgres) GetAdmins

func (t *Postgres) GetAdmins() ([]string, error)

func (*Postgres) GetApiKey

func (t *Postgres) GetApiKey(userID string) (string, error)

func (*Postgres) GetFavorites

func (t *Postgres) GetFavorites(userID string) ([]string, error)

func (*Postgres) GetGuildFilters

func (t *Postgres) GetGuildFilters(guildID string) (GuildFilters, error)

func (*Postgres) GetGuildVolume

func (t *Postgres) GetGuildVolume(guildID string) (int, error)

func (*Postgres) GetPlaybackLog

func (t *Postgres) GetPlaybackLog(guildID, ident, userID string, limit, offset int) ([]PlaybackLogEntry, error)

func (*Postgres) GetPlaybackLogSize

func (t *Postgres) GetPlaybackLogSize() (int, error)

func (*Postgres) GetPlaybackStats

func (t *Postgres) GetPlaybackStats(guildID, userID string) ([]PlaybackStats, error)

func (*Postgres) GetSound

func (t *Postgres) GetSound(uid string) (Sound, error)

func (*Postgres) GetSounds

func (t *Postgres) GetSounds() ([]Sound, error)

func (*Postgres) GetTwitchSettings added in v1.5.0

func (t *Postgres) GetTwitchSettings(twitchname string) (TwitchSettings, error)

func (*Postgres) GetUserByApiKey

func (t *Postgres) GetUserByApiKey(token string) (string, error)

func (*Postgres) GetUserFastTrigger

func (t *Postgres) GetUserFastTrigger(userID string) (string, error)

func (*Postgres) IsAdmin

func (t *Postgres) IsAdmin(userID string) (bool, error)

func (*Postgres) Migrate

func (t *Postgres) Migrate() error

func (*Postgres) PutPlaybackLog

func (t *Postgres) PutPlaybackLog(e PlaybackLogEntry) error

func (*Postgres) PutSound

func (t *Postgres) PutSound(sound Sound) error

func (*Postgres) RemoveAdmin

func (t *Postgres) RemoveAdmin(userID string) error

func (*Postgres) RemoveApiKey

func (t *Postgres) RemoveApiKey(userID string) error

func (*Postgres) RemoveFavorite

func (t *Postgres) RemoveFavorite(userID, ident string) error

func (*Postgres) RemoveSound

func (t *Postgres) RemoveSound(uid string) error

func (*Postgres) SetApiKey

func (t *Postgres) SetApiKey(userID, token string) error

func (*Postgres) SetGuildFilters

func (t *Postgres) SetGuildFilters(guildID string, f GuildFilters) error

func (*Postgres) SetGuildVolume

func (t *Postgres) SetGuildVolume(guildID string, volume int) error

func (*Postgres) SetTwitchSettings added in v1.5.0

func (t *Postgres) SetTwitchSettings(s TwitchSettings) error

func (*Postgres) SetUserFastTrigger

func (t *Postgres) SetUserFastTrigger(userID, ident string) error

type PostgresConfig

type PostgresConfig struct {
	Host     string
	Port     int
	Database string
	Username string
	Password string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL