brainz

package
v0.0.0-...-ed7e1dd Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillRecording

func FillRecording(rec *Recording) error

Types

type Artist

type Artist struct {
	Id       uuid.UUID
	Name     string
	TypeId   string `json:"type-id"`
	Type     string
	SortName string `json:"sort-name"`
	Genres   []Genre
}

type ArtistCredit

type ArtistCredit struct {
	Name       string
	Artist     Artist
	JoinPhrase string
}

type Genre

type Genre struct {
	Id   uuid.UUID
	Name string
}

type Label

type Label struct {
	Id             uuid.UUID
	Name           string
	SortName       string `json:"sort-name"`
	Disambiguation string
	TypeId         string `json:"type-id"`
	Type           string
	LabelCode      int `json:"label-code"`
}

type LabelInfo

type LabelInfo struct {
	CatalogNumber string `json:"catalog-number"`
	Label         Label
}

type Media

type Media struct {
	FormatId    uuid.UUID `json:"format-id"`
	Position    int
	Title       string
	TrackOffset int `json:"track-offset"`
	Format      string
	TrackCount  int `json:"track-count"`
	Tracks      []Track
}

type Recording

type Recording struct {
	Id               uuid.UUID
	AcousticId       uuid.UUID
	Isrcs            []string
	FirstReleaseDate string `json:"first-release-date"`
	Length           int
	Title            string
	Video            bool
	Releases         []Release
	Genres           []Genre
	ArtistCredit     []ArtistCredit `json:"artist-credit"`
}

func GetRecording

func GetRecording(id string) (Recording, error)

func (Recording) FirstArtist

func (r Recording) FirstArtist() Artist

func (Recording) FirstGenre

func (r Recording) FirstGenre() Genre

type Release

type Release struct {
	Id             uuid.UUID
	Asin           string
	Barcode        string
	Country        string
	Date           string
	Disambiguation string
	Media          []Media
	Packaging      string
	PackagingId    uuid.UUID `json:"packaging-id"`
	Quality        string
	Status         string
	StatusId       uuid.UUID      `json:"status-id"`
	ArtistCredit   []ArtistCredit `json:"artist-credit"`
	Title          string
	Genres         []Genre
	ReleaseGroup   ReleaseGroup `json:"release-group"`
	LabelInfo      []LabelInfo  `json:"label-info"`
}

func GetReleaseWithMedia

func GetReleaseWithMedia(id uuid.UUID) (Release, error)

type ReleaseGroup

type ReleaseGroup struct {
	Id               uuid.UUID
	Title            string
	ArtistCredit     []ArtistCredit `json:"artist-credit"`
	Disambiguation   string
	FirstReleaseDate string      `json:"first-release-date"`
	PrimaryType      string      `json:"primary-type"`
	PrimaryTypeId    uuid.UUID   `json:"primary-type-id"`
	SecondaryTypes   []string    `json:"secondary-types"`
	SecondaryTypeIds []uuid.UUID `json:"secondary-type-ids"`
}

type Track

type Track struct {
	Id       uuid.UUID
	Number   string
	Title    string
	Position int
	Length   int
}

Jump to

Keyboard shortcuts

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