rddb

package
v0.0.0-...-a1d808b Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: GPL-3.0, GPL-3.0-or-later Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_VERSION = 250
)

Variables

This section is empty.

Functions

func NewDB

func NewDB(configfile string) (*db, error)

func NewDBReadOnly

func NewDBReadOnly(configfile string) (*db, error)

Types

type CartListEntry

type CartListEntry struct {
	Number      uint
	Exists      bool
	Artist      string
	Title       string
	Album       string
	UserDefined string
	Cuts        []CutListEntry
}

type CutListEntry

type CutListEntry struct {
	Number      uint
	Evergreen   bool
	Description string
	Duration    time.Duration
	Imported    NullTime
	NumPlayed   uint
	LastPlayed  NullTime
}

type DB

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

func (*DB) CheckMusicGroup

func (d *DB) CheckMusicGroup(groupname string) (bool, error)

func (*DB) CheckPassword

func (d *DB) CheckPassword(username, password string) (bool, error)

func (*DB) GetGroupOfCart

func (d *DB) GetGroupOfCart(cart uint) (string, error)

func (*DB) GetJingleCutList

func (d *DB) GetJingleCutList(jingle JingleListEntry) (CartListEntry, error)

func (*DB) GetJingleList

func (d *DB) GetJingleList(username string) (JingleList, error)

func (*DB) GetMusicInfo

func (d *DB) GetMusicInfo(groupname string) (int, int, error)

func (*DB) GetPassword

func (d *DB) GetPassword(username string, cached bool) (string, error)

func (*DB) GetPoolCartList

func (d *DB) GetPoolCartList(pool PoolListEntry) (map[uint]CartListEntry, error)

func (*DB) GetPoolList

func (d *DB) GetPoolList(username string) (PoolList, error)

func (*DB) GetShowCartList

func (d *DB) GetShowCartList(show ShowListEntry) ([]CartListEntry, error)

func (*DB) GetShowInfo

func (d *DB) GetShowInfo(showid uint) (string, int, int, []uint, error)

func (*DB) GetShowList

func (d *DB) GetShowList(username string) (ShowList, error)

func (*DB) UpdateCartUserDefined

func (d *DB) UpdateCartUserDefined(cart uint, value string) error

func (*DB) UpdateCutCartTitle

func (d *DB) UpdateCutCartTitle(cart, cut uint, groupName, sourceFile string) error

type JingleList

type JingleList []JingleListEntry

func (JingleList) Len

func (jl JingleList) Len() int

func (JingleList) Less

func (jl JingleList) Less(i, j int) bool

func (JingleList) Swap

func (jl JingleList) Swap(i, j int)

type JingleListEntry

type JingleListEntry struct {
	Group string
	Title string
	Cart  int
}

type NullTime

type NullTime struct {
	Time  time.Time
	Valid bool // Valid is true if Time is not NULL
}

This NullTime implementation is not driver-specific

func (*NullTime) Scan

func (nt *NullTime) Scan(value interface{}) (err error)

Scan implements the Scanner interface. The value type must be time.Time or string / []byte (formatted time-string), otherwise Scan fails.

func (NullTime) Value

func (nt NullTime) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type PoolList

type PoolList []PoolListEntry

func (PoolList) Len

func (p PoolList) Len() int

func (PoolList) Less

func (p PoolList) Less(i, j int) bool

func (PoolList) Swap

func (p PoolList) Swap(i, j int)

type PoolListEntry

type PoolListEntry struct {
	Group     string
	ShortName string
	Title     string
}

type ShowList

type ShowList []ShowListEntry

func (ShowList) Len

func (s ShowList) Len() int

func (ShowList) Less

func (s ShowList) Less(i, j int) bool

func (ShowList) Swap

func (s ShowList) Swap(i, j int)

type ShowListEntry

type ShowListEntry struct {
	ID        uint
	Title     string
	TitleFull string

	Rhythm    string
	StartTime string
	Dow       Weekday
	Length    uint
	Type      ShowType
	// contains filtered or unexported fields
}

type ShowType

type ShowType string
const (
	ShowTypeRegular ShowType = "n"
	ShowTypeRerun   ShowType = "r"
	ShowTypeSpecial ShowType = "s"
)

func (ShowType) String

func (s ShowType) String() string

type Weekday

type Weekday int

func (Weekday) String

func (w Weekday) String() string

Jump to

Keyboard shortcuts

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