Documentation
¶
Index ¶
- type AlbumArtist
- type AlbumCatalog
- type AlbumEntity
- type AlternateName
- type ArtistCatalog
- type ArtistEntity
- type Builder
- type Header
- type HeaderType
- type JSONTime
- type Locale
- type MetaData
- type MetaDataReceiver
- type Name
- type Popularity
- type PopularityOverride
- type TrackAlbum
- type TrackArtist
- type TrackCatalog
- type TrackEntity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlbumArtist ¶
type AlbumArtist struct {
Id string `json:"id"`
Names []Name `json:"names"`
AlternateNames []AlternateName `json:"alternateNames,omitempty"`
}
type AlbumCatalog ¶
type AlbumCatalog struct {
Header
Entities []*AlbumEntity `json:"entities"`
}
func CreateAlbumCatalog ¶
func CreateAlbumCatalog() *AlbumCatalog
func (*AlbumCatalog) AddMetaData ¶
func (ac *AlbumCatalog) AddMetaData(md MetaData, lastUpdate time.Time)
type AlbumEntity ¶
type AlbumEntity struct {
Id string `json:"id"`
Names []Name `json:"names"`
Popularity Popularity `json:"popularity"`
LastUpdatedTime JSONTime `json:"lastUpdatedTime"`
Locales []Locale `json:"locales,omitempty"`
AlternateNames []AlternateName `json:"alternateNames,omitempty"`
LanguageOfContent []string `json:"languageOfContent,omitempty"`
ReleaseType string `json:"releaseType,omitempty"`
Artists []*AlbumArtist `json:"artists"`
}
type AlternateName ¶
type ArtistCatalog ¶
type ArtistCatalog struct {
Header
Entities []ArtistEntity `json:"entities"`
}
func CreateArtistCatalog ¶
func CreateArtistCatalog() *ArtistCatalog
func (*ArtistCatalog) AddMetaData ¶
func (ac *ArtistCatalog) AddMetaData(md MetaData, lastUpdate time.Time)
type ArtistEntity ¶
type ArtistEntity struct {
Id string `json:"id"`
Names []Name `json:"names"`
Popularity Popularity `json:"popularity"`
LastUpdatedTime JSONTime `json:"lastUpdatedTime"`
Locales []Locale `json:"locales,omitempty"`
AlternateNames []AlternateName `json:"alternateNames,omitempty"`
LanguageOfContent []string `json:"languageOfContent,omitempty"`
// Deleted must be nil ( not deleted ) or a pointer to true.
// deleted=false is not valid according to the catalog upload api
Deleted *bool `json:"deleted,omitempty"`
}
type Builder ¶
type Builder struct {
ArtistCatalog *ArtistCatalog
AlbumCatalog *AlbumCatalog
TrackCatalog *TrackCatalog
}
type HeaderType ¶
type HeaderType string
const MusicAlbum HeaderType = "AMAZON.MusicAlbum"
const MusicGroup HeaderType = "AMAZON.MusicGroup"
const MusicRecording HeaderType = "AMAZON.MusicRecording"
type Locale ¶
func DefaultLocales ¶
func DefaultLocales() []Locale
type MetaData ¶
type MetaData interface {
// Artist is the tag data ARTIST
Artist() string
// ArtistID is the tag data MUSICBRAINZ_ARTISTID
ArtistID() string
// Album is the tag data ALBUM
Album() string
// AlbumID is the tag data MUSICBRAINZ_ALBUMID
AlbumID() string
// Track is the tag data TITLE
Track() string
// TrackID is the tag data MUSICBRAINZ_TRACKID
TrackID() string
}
MetaData represents the musicbrainz data extracted from VORBIS_COMMENT
type MetaDataReceiver ¶
type Popularity ¶
type Popularity struct {
Default float64 `json:"default"`
Overrides []PopularityOverride `json:"overrides,omitempty"`
}
type PopularityOverride ¶
type TrackAlbum ¶
type TrackAlbum struct {
Id string `json:"id"`
Names []Name `json:"names"`
AlternateNames []AlternateName `json:"alternateNames,omitempty"`
ReleaseType string `json:"releaseType,omitempty"`
}
type TrackArtist ¶
type TrackArtist struct {
Id string `json:"id"`
Names []Name `json:"names"`
AlternateNames []AlternateName `json:"alternateNames,omitempty"`
}
type TrackCatalog ¶
type TrackCatalog struct {
Header
Entities []TrackEntity `json:"entities"`
}
func CreateTrackCatalog ¶
func CreateTrackCatalog() *TrackCatalog
func (*TrackCatalog) AddMetaData ¶
func (tc *TrackCatalog) AddMetaData(md MetaData, lastUpdate time.Time)
type TrackEntity ¶
type TrackEntity struct {
Id string `json:"id"`
Names []Name `json:"names"`
Popularity Popularity `json:"popularity"`
LastUpdatedTime JSONTime `json:"lastUpdatedTime"`
Locales []Locale `json:"locales,omitempty"`
AlternateNames []AlternateName `json:"alternateNames,omitempty"`
LanguageOfContent []string `json:"languageOfContent,omitempty"`
Artists []TrackArtist `json:"artists"`
Albums []TrackAlbum `json:"albums"`
// Deleted must be a pointer to a true boolean or nil, never a pointer to a true boolean
// This is a restriction of the api
Deleted *bool `json:"deleted,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.