Documentation ¶
Index ¶
- Variables
- type Database
- type Entity
- type PostgresDriver
- type Remyx
- type RemyxPlaylist
- type RemyxWithCount
- type SQLDriver
- func (t *SQLDriver) AddRemyx(rmx Remyx) error
- func (t *SQLDriver) AddSession(session Session) error
- func (t *SQLDriver) AddSourcePlaylist(pl RemyxPlaylist) error
- func (t *SQLDriver) AddTargetPlaylist(pl RemyxPlaylist) error
- func (t *SQLDriver) BeginTx() (Transaction, error)
- func (t *SQLDriver) Close() error
- func (t *SQLDriver) DeleteRemyx(uid string) error
- func (t *SQLDriver) DeleteSession(uid string) error
- func (t *SQLDriver) DeleteSourcePlaylist(remyxUid, userUid, playlistUid string) error
- func (t *SQLDriver) DeleteTargetPlaylist(remyxUid, userUid string) error
- func (t *SQLDriver) GetRemyx(uid string) (Remyx, error)
- func (t *SQLDriver) GetSessionByUserId(userId string) (Session, error)
- func (t *SQLDriver) GetSourcePlaylists(remyxUid string) ([]RemyxPlaylist, error)
- func (t *SQLDriver) GetTargetPlaylists(remyxUid string) ([]RemyxPlaylist, error)
- func (t *SQLDriver) ListRemyxes(userId string) ([]RemyxWithCount, error)
- func (t *SQLDriver) UpdateRemyx(rmx Remyx) error
- type Session
- type TX
- type Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrConflict = errors.New("conflict") )
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { BeginTx() (Transaction, error) Close() error AddSession(session Session) error DeleteSession(uid string) error GetSessionByUserId(userId string) (Session, error) AddRemyx(rmx Remyx) error UpdateRemyx(rmx Remyx) error DeleteRemyx(uid string) error GetRemyx(uid string) (Remyx, error) ListRemyxes(userId string) ([]RemyxWithCount, error) AddSourcePlaylist(pl RemyxPlaylist) error DeleteSourcePlaylist(remyxUid, userUid, playlistUid string) error GetSourcePlaylists(remyxUid string) ([]RemyxPlaylist, error) AddTargetPlaylist(pl RemyxPlaylist) error DeleteTargetPlaylist(remyxUid, userUid string) error GetTargetPlaylists(remyxUid string) ([]RemyxPlaylist, error) }
type PostgresDriver ¶
type PostgresDriver struct { *SQLDriver // contains filtered or unexported fields }
func NewPostgresDriver ¶
func NewPostgresDriver(dsn string) (*PostgresDriver, error)
func (*PostgresDriver) BeginTx ¶
func (t *PostgresDriver) BeginTx() (Transaction, error)
func (*PostgresDriver) Close ¶
func (t *PostgresDriver) Close() error
type RemyxPlaylist ¶
type RemyxWithCount ¶
type SQLDriver ¶
type SQLDriver struct {
// contains filtered or unexported fields
}
func (*SQLDriver) AddSession ¶
func (*SQLDriver) AddSourcePlaylist ¶
func (t *SQLDriver) AddSourcePlaylist(pl RemyxPlaylist) error
func (*SQLDriver) AddTargetPlaylist ¶
func (t *SQLDriver) AddTargetPlaylist(pl RemyxPlaylist) error
func (*SQLDriver) BeginTx ¶
func (t *SQLDriver) BeginTx() (Transaction, error)
func (*SQLDriver) DeleteRemyx ¶
func (*SQLDriver) DeleteSession ¶
func (*SQLDriver) DeleteSourcePlaylist ¶
func (*SQLDriver) DeleteTargetPlaylist ¶
func (*SQLDriver) GetSessionByUserId ¶
func (*SQLDriver) GetSourcePlaylists ¶
func (t *SQLDriver) GetSourcePlaylists(remyxUid string) ([]RemyxPlaylist, error)
func (*SQLDriver) GetTargetPlaylists ¶
func (t *SQLDriver) GetTargetPlaylists(remyxUid string) ([]RemyxPlaylist, error)
func (*SQLDriver) ListRemyxes ¶
func (t *SQLDriver) ListRemyxes(userId string) ([]RemyxWithCount, error)
func (*SQLDriver) UpdateRemyx ¶
type Transaction ¶
Click to show internal directories.
Click to hide internal directories.