model

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchNameToIDMapByName

func FetchNameToIDMapByName(db *sql.DB, name string) (map[string]string, error)

FetchNameToIDMapByName ... tbd

Types

type Song

type Song struct {
	ID     uuid.NullUUID `sql:",pk,type:uuid default uuid_generate_v4()" json:"-"`
	Title  string        `json:"title,omitempty"`
	Link   string        `json:"link,omitempty"`
	Author string        `json:"author,omitempty"`
	Album  string        `json:"album,omitempty"`
	Verses []Verse       `json:"verses,omitempty"`
}

Song ... tbd

func FindSongByID

func FindSongByID(db *sql.DB, id string) (Song, error)

FindSongByID ... tbd

func (*Song) SaveSong

func (s *Song) SaveSong(db *sql.DB) error

SaveSong ... tbd

type Verse

type Verse struct {
	ID      uuid.NullUUID `sql:",pk,type:uuid default uuid_generate_v4()" json:"-"`
	Ordinal int           `json:"order"`
	Verse   string        `json:"verse,omitempty"`
	SongID  uuid.NullUUID `sql:",type:uuid" json:"-"`
}

Verse ... tbd

Jump to

Keyboard shortcuts

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