db

package
v0.0.0-...-04ac836 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScanFile

func ScanFile(fileName string) error

Types

type LiteDB

type LiteDB struct {
	DebugSQL     bool
	SqliteDBPath string
	// contains filtered or unexported fields
}

func (*LiteDB) CreateHistory

func (ld *LiteDB) CreateHistory(uri, title, description, duration string, durinsec int, tt string) error

func (*LiteDB) DeleteAllMusicFiles

func (ld *LiteDB) DeleteAllMusicFiles(tx *sql.Tx) error

func (*LiteDB) DeleteAllVideo

func (ld *LiteDB) DeleteAllVideo(tx *sql.Tx) error

func (*LiteDB) DeleteRadioItem

func (ld *LiteDB) DeleteRadioItem(tx *sql.Tx, item ResUriItem) error

func (*LiteDB) EditRadioItem

func (ld *LiteDB) EditRadioItem(tx *sql.Tx, item ResUriItem) error

func (*LiteDB) FetchHistory

func (ld *LiteDB) FetchHistory(pageIx int, pageSize int) ([]ResUriItem, error)

func (*LiteDB) FetchMusic

func (ld *LiteDB) FetchMusic(parent string) ([]ResMusicItem, error)

func (*LiteDB) FetchRadio

func (ld *LiteDB) FetchRadio(pageIx int, pageSize int) ([]ResUriItem, error)

func (*LiteDB) FetchRadioFromURI

func (ld *LiteDB) FetchRadioFromURI(uri string) (*ResUriItem, error)

func (*LiteDB) FetchVideo

func (ld *LiteDB) FetchVideo(pageIx int, pageSize int) ([]ResUriItem, error)

func (*LiteDB) GetNewTransaction

func (ld *LiteDB) GetNewTransaction() (*sql.Tx, error)

func (*LiteDB) InsertHistoryItem

func (ld *LiteDB) InsertHistoryItem(item *ResUriItem) error

func (*LiteDB) InsertMusicList

func (ld *LiteDB) InsertMusicList(tx *sql.Tx, list []*ResMusicItem) error

func (*LiteDB) InsertRadioList

func (ld *LiteDB) InsertRadioList(tx *sql.Tx, list []*ResUriItem) error

func (*LiteDB) InsertVideoList

func (ld *LiteDB) InsertVideoList(tx *sql.Tx, list []*ResUriItem) error

func (*LiteDB) OpenSqliteDatabase

func (ld *LiteDB) OpenSqliteDatabase() error

type ResMusicItem

type ResMusicItem struct {
	Timestamp     time.Time
	ID            int
	FileOrFolder  int
	Title         string
	URI           string
	Description   string
	DurationInSec int
	ParentFolder  string
	MetaAlbum     string
	MetaArtist    string
}

type ResUriItem

type ResUriItem struct {
	ID                                int
	URI, Title, Description, Duration string
	Timestamp                         time.Time
	PlayPosition                      int
	DurationInSec                     int
	Type                              string
	Genre                             string
}

Jump to

Keyboard shortcuts

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