Documentation ¶
Index ¶
- func Initialize(dbName string, dsn string) *sqlx.DB
- type PostgresStore
- func (s *PostgresStore) ApplyMigrations(migrations embed.FS) error
- func (s *PostgresStore) ExecCustom(query string, args ...interface{}) error
- func (s *PostgresStore) GetByCategory(category string) (models.ComboDBMediaItem, error)
- func (s *PostgresStore) GetCustom(query string, args ...interface{}) (models.ComboDBMediaItem, error)
- func (s *PostgresStore) GetNewest() (models.ComboDBMediaItem, error)
- func (s *PostgresStore) GetRecent() ([]models.ComboDBMediaItem, error)
- func (s *PostgresStore) Insert(item models.MediaItem) error
- type SqliteStore
- func (s *SqliteStore) ApplyMigrations(migrations embed.FS) error
- func (s *SqliteStore) ExecCustom(query string, args ...interface{}) error
- func (s *SqliteStore) GetByCategory(category string) (models.ComboDBMediaItem, error)
- func (s *SqliteStore) GetCustom(query string, args ...interface{}) (models.ComboDBMediaItem, error)
- func (s *SqliteStore) GetNewest() (models.ComboDBMediaItem, error)
- func (s *SqliteStore) GetRecent() ([]models.ComboDBMediaItem, error)
- func (s *SqliteStore) Insert(item models.MediaItem) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PostgresStore ¶
func (*PostgresStore) ApplyMigrations ¶
func (s *PostgresStore) ApplyMigrations(migrations embed.FS) error
func (*PostgresStore) ExecCustom ¶
func (s *PostgresStore) ExecCustom(query string, args ...interface{}) error
func (*PostgresStore) GetByCategory ¶
func (s *PostgresStore) GetByCategory(category string) (models.ComboDBMediaItem, error)
func (*PostgresStore) GetCustom ¶
func (s *PostgresStore) GetCustom(query string, args ...interface{}) (models.ComboDBMediaItem, error)
func (*PostgresStore) GetNewest ¶
func (s *PostgresStore) GetNewest() (models.ComboDBMediaItem, error)
func (*PostgresStore) GetRecent ¶
func (s *PostgresStore) GetRecent() ([]models.ComboDBMediaItem, error)
type SqliteStore ¶
func (*SqliteStore) ApplyMigrations ¶
func (s *SqliteStore) ApplyMigrations(migrations embed.FS) error
func (*SqliteStore) ExecCustom ¶
func (s *SqliteStore) ExecCustom(query string, args ...interface{}) error
func (*SqliteStore) GetByCategory ¶
func (s *SqliteStore) GetByCategory(category string) (models.ComboDBMediaItem, error)
func (*SqliteStore) GetCustom ¶
func (s *SqliteStore) GetCustom(query string, args ...interface{}) (models.ComboDBMediaItem, error)
func (*SqliteStore) GetNewest ¶
func (s *SqliteStore) GetNewest() (models.ComboDBMediaItem, error)
func (*SqliteStore) GetRecent ¶
func (s *SqliteStore) GetRecent() ([]models.ComboDBMediaItem, error)
type Store ¶
type Store interface { ApplyMigrations(migrations embed.FS) error GetRecent() ([]models.ComboDBMediaItem, error) GetNewest() (models.ComboDBMediaItem, error) GetByCategory(category string) (models.ComboDBMediaItem, error) Insert(item models.MediaItem) error GetCustom(query string, args ...interface{}) (models.ComboDBMediaItem, error) ExecCustom(query string, args ...interface{}) error }
func NewPostgresStore ¶
func NewSqliteStore ¶
Click to show internal directories.
Click to hide internal directories.