tolistenlist

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

README

To-Listen List

A small record list for the music enthusiast.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDB

func CloseDB() error

CloseDB closes the inner database. Returns an error if resources couldn't be properly cleaned up

func InitDB

func InitDB(name string) error

InitDB takes care of initiating the inner database with the given name. Returns an error if it couldn't be properly started.

func Sort

func Sort(albums []Album)

Sort the albums

Types

type Album

type Album struct {
	ID int `storm:"increment,unique"`

	Artist string  `json:"artist"`
	Title  string  `json:"title"`
	Score  float64 `json:"score"`
}

Album represents a recording, with artists' name along with a rating

func GetAlbums

func GetAlbums() ([]Album, error)

GetAlbums returns a slice of every single record in the db

func (Album) Save

func (al Album) Save() error

Save the album's data to the db.

func (Album) Update

func (al Album) Update() error

Update a record

Directories

Path Synopsis
cmd
tll

Jump to

Keyboard shortcuts

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