db

package
v0.0.0-...-074fcce Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DatabaseURI string
}

func InitConfig

func InitConfig() (*Config, error)

type Database

type Database struct {
	*gorm.DB
}

func New

func New(config *Config) (*Database, error)

func (*Database) CreateUserPlayhead

func (db *Database) CreateUserPlayhead(userPlayhead *model.UserPlayhead) error

func (*Database) DeleteUserPlayhead

func (db *Database) DeleteUserPlayhead(userPlayhead *model.UserPlayhead) error

func (*Database) GetPlayheadByUserUUIDAndSeriesUUID

func (db *Database) GetPlayheadByUserUUIDAndSeriesUUID(userUUID string, seriesUUID string) (*model.UserPlayhead, error)

func (*Database) GetUserPlayheads

func (db *Database) GetUserPlayheads(userUUID string) (userPlayheads []*model.UserPlayhead, err error)

func (*Database) UpdateUserPlayhead

func (db *Database) UpdateUserPlayhead(userPlayhead *model.UserPlayhead) error

Jump to

Keyboard shortcuts

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