Documentation ¶
Index ¶
- func NewCatalogForType(catalogType catalog.CatalogType) (any, error)
- func ReadFromStaging(catalogType catalog.CatalogType) (any, error)
- func StagingPathForType(catalogType catalog.CatalogType) string
- func WriteToStaging(catalog StagingCatalog) error
- 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 PlaylistCatalog
- type PlaylistEntity
- type Popularity
- type PopularityOverride
- type StagingCatalog
- type StaticMetaData
- func (s *StaticMetaData) Album() string
- func (s *StaticMetaData) AlbumID() string
- func (s *StaticMetaData) Artist() string
- func (s *StaticMetaData) ArtistID() string
- func (s *StaticMetaData) Deleted() bool
- func (s *StaticMetaData) Playlist() string
- func (s *StaticMetaData) PlaylistID() string
- func (s *StaticMetaData) Track() string
- func (s *StaticMetaData) TrackID() string
- type TrackAlbum
- type TrackArtist
- type TrackCatalog
- type TrackEntity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCatalogForType ¶ added in v0.2.1
func NewCatalogForType(catalogType catalog.CatalogType) (any, error)
func ReadFromStaging ¶ added in v0.2.1
func ReadFromStaging(catalogType catalog.CatalogType) (any, error)
func StagingPathForType ¶ added in v0.2.1
func StagingPathForType(catalogType catalog.CatalogType) string
func WriteToStaging ¶ added in v0.2.1
func WriteToStaging(catalog StagingCatalog) error
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"` }
AlbumCatalog https://developer.amazon.com/en-US/docs/alexa/music-skills/catalog-reference.html#album
func CreateAlbumCatalog ¶
func CreateAlbumCatalog() *AlbumCatalog
func (*AlbumCatalog) AddMetaData ¶
func (ac *AlbumCatalog) AddMetaData(md MetaData, lastUpdate time.Time)
func (*AlbumCatalog) CatalogType ¶ added in v0.2.1
func (ac *AlbumCatalog) CatalogType() catalog_.CatalogType
func (*AlbumCatalog) Validate ¶ added in v0.2.1
func (ac *AlbumCatalog) Validate() error
type AlbumEntity ¶
type AlbumEntity struct { Id string `json:"id"` Names []Name `json:"names,omitempty"` Popularity *Popularity `json:"popularity,omitempty"` 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,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 AlternateName ¶
type ArtistCatalog ¶
type ArtistCatalog struct { Header Entities []*ArtistEntity `json:"entities"` }
ArtistCatalog https://developer.amazon.com/en-US/docs/alexa/music-skills/catalog-reference.html#artist
func CreateArtistCatalog ¶
func CreateArtistCatalog() *ArtistCatalog
func (*ArtistCatalog) AddMetaData ¶
func (ac *ArtistCatalog) AddMetaData(md MetaData, lastUpdate time.Time)
func (*ArtistCatalog) CatalogType ¶ added in v0.2.1
func (ac *ArtistCatalog) CatalogType() catalog_.CatalogType
func (*ArtistCatalog) Validate ¶ added in v0.2.1
func (ac *ArtistCatalog) Validate() error
type ArtistEntity ¶
type ArtistEntity struct { Id string `json:"id"` Names []Name `json:"names,omitempty"` Popularity *Popularity `json:"popularity,omitempty"` 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 PlaylistCatalog *PlaylistCatalog }
func (*Builder) AddMetaData ¶ added in v0.2.1
func (*Builder) ScanUserMusicFolder ¶ added in v0.2.1
type Header ¶
type Header struct { Type HeaderType `json:"type"` Version float64 `json:"version"` Locales []Locale `json:"locales"` }
func (Header) TypeMatches ¶ added in v0.2.1
type HeaderType ¶
type HeaderType string
const MusicAlbum HeaderType = "AMAZON.MusicAlbum"
const MusicGroup HeaderType = "AMAZON.MusicGroup"
const MusicPlaylist HeaderType = "AMAZON.MusicPlaylist"
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 // Playlist is the playlist name Playlist() string // PlaylistID is the playlist id PlaylistID() string // Deleted indicates the entity has been removed from the catalog Deleted() bool }
MetaData represents the musicbrainz data extracted from VORBIS_COMMENT
func DeletedMetaData ¶ added in v0.2.1
func PlaylistMetadata ¶ added in v0.2.1
type MetaDataReceiver ¶
type PlaylistCatalog ¶ added in v0.2.1
type PlaylistCatalog struct { Header Entities []*PlaylistEntity `json:"entities"` }
PlaylistCatalog https://developer.amazon.com/en-US/docs/alexa/music-skills/catalog-reference.html#playlist
func CreatePlaylistCatalog ¶ added in v0.2.1
func CreatePlaylistCatalog() *PlaylistCatalog
func (*PlaylistCatalog) AddMetaData ¶ added in v0.2.1
func (pc *PlaylistCatalog) AddMetaData(md MetaData, lastUpdate time.Time)
func (*PlaylistCatalog) CatalogType ¶ added in v0.2.1
func (pc *PlaylistCatalog) CatalogType() catalog_.CatalogType
func (*PlaylistCatalog) Validate ¶ added in v0.2.1
func (pc *PlaylistCatalog) Validate() error
type PlaylistEntity ¶ added in v0.2.1
type PlaylistEntity 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"` // 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 Popularity ¶
type Popularity struct { Default float64 `json:"default"` Overrides []PopularityOverride `json:"overrides,omitempty"` }
type PopularityOverride ¶
type StagingCatalog ¶ added in v0.2.1
type StagingCatalog interface { CatalogType() catalog.CatalogType Validate() error }
type StaticMetaData ¶ added in v0.2.1
type StaticMetaData struct { ArtistValue string ArtistIDValue string AlbumValue string AlbumIDValue string TrackValue string TrackIDValue string PlaylistValue string PlaylistIDValue string DeletedValue bool }
func (*StaticMetaData) Album ¶ added in v0.2.1
func (s *StaticMetaData) Album() string
func (*StaticMetaData) AlbumID ¶ added in v0.2.1
func (s *StaticMetaData) AlbumID() string
func (*StaticMetaData) Artist ¶ added in v0.2.1
func (s *StaticMetaData) Artist() string
func (*StaticMetaData) ArtistID ¶ added in v0.2.1
func (s *StaticMetaData) ArtistID() string
func (*StaticMetaData) Deleted ¶ added in v0.2.1
func (s *StaticMetaData) Deleted() bool
func (*StaticMetaData) Playlist ¶ added in v0.2.1
func (s *StaticMetaData) Playlist() string
func (*StaticMetaData) PlaylistID ¶ added in v0.2.1
func (s *StaticMetaData) PlaylistID() string
func (*StaticMetaData) Track ¶ added in v0.2.1
func (s *StaticMetaData) Track() string
func (*StaticMetaData) TrackID ¶ added in v0.2.1
func (s *StaticMetaData) TrackID() string
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"` }
TrackCatalog https://developer.amazon.com/en-US/docs/alexa/music-skills/catalog-reference.html#track
func CreateTrackCatalog ¶
func CreateTrackCatalog() *TrackCatalog
func (*TrackCatalog) AddMetaData ¶
func (tc *TrackCatalog) AddMetaData(md MetaData, lastUpdate time.Time)
func (*TrackCatalog) CatalogType ¶ added in v0.2.1
func (tc *TrackCatalog) CatalogType() catalog_.CatalogType
func (*TrackCatalog) Validate ¶ added in v0.2.1
func (tc *TrackCatalog) Validate() error
type TrackEntity ¶
type TrackEntity struct { Id string `json:"id"` Names []Name `json:"names,omitempty"` Popularity *Popularity `json:"popularity,omitempty"` LastUpdatedTime JSONTime `json:"lastUpdatedTime"` Locales []Locale `json:"locales,omitempty"` AlternateNames []AlternateName `json:"alternateNames,omitempty"` LanguageOfContent []string `json:"languageOfContent,omitempty"` Artists []TrackArtist `json:"artists,omitempty"` Albums []TrackAlbum `json:"albums,omitempty"` // 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"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.