Documentation ¶
Index ¶
- func Initialize(dbName string, dsn string) *sqlx.DB
- 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) GetTokenByID(id string) string
- func (s *SqliteStore) Insert(item models.MediaItem) error
- func (s *SqliteStore) UpsertToken(id, value string) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
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)
func (*SqliteStore) GetTokenByID ¶
func (s *SqliteStore) GetTokenByID(id string) string
func (*SqliteStore) UpsertToken ¶
func (s *SqliteStore) UpsertToken(id, value string) 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 GetTokenByID(id string) string UpsertToken(id, value string) error }
func NewSqliteStore ¶
Click to show internal directories.
Click to hide internal directories.