model

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const AlbumCollectionName = "albums"
View Source
const ArtistCollectionName = "artists"
View Source
const TrackCollectionName = "tracks"

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	AlbumId     string
	Name        string
	ArtistNames []string
	ArtworkLink string

	Source StreamingServiceType
	Market Market
	Link   string
}

func NewAlbum

func NewAlbum(name string, artistNames []string, artworkLink string, source StreamingServiceType, market Market, link string) *Album

func (*Album) GetSource

func (a *Album) GetSource() StreamingServiceType

type Artist

type Artist struct {
	ArtistId    string
	Name        string
	ArtworkLink string

	Source StreamingServiceType
	Market Market
	Link   string
}

func NewArtist

func NewArtist(name string, artworkLink string, source StreamingServiceType, market Market, link string) *Artist

func (*Artist) GetSource

func (a *Artist) GetSource() StreamingServiceType

type Market

type Market string
const DefaultMarket Market = "AU"

func (*Market) String

func (m *Market) String() string

type StreamingService

type StreamingService struct {
	Key     StreamingServiceType
	Name    string
	Enabled bool
}

type StreamingServiceType added in v0.3.0

type StreamingServiceType string
const (
	AppleMusicStreamingService StreamingServiceType = "apple_music"
	SpotifyStreamingService    StreamingServiceType = "spotify"
	DeezerStreamingService     StreamingServiceType = "deezer"
)

func (StreamingServiceType) String added in v0.3.0

func (s StreamingServiceType) String() string

type Thing

type Thing interface {
	GetSource() StreamingServiceType
}

type Track

type Track struct {
	Isrc        string
	Name        string
	ArtistNames []string
	AlbumName   string
	ArtworkLink string

	Source StreamingServiceType
	Market Market
	Link   string
}

func NewTrack

func NewTrack(isrc string, name string, artistNames []string, albumName string, artworkLink string, source StreamingServiceType, market Market, link string) *Track

func (*Track) GetSource

func (t *Track) GetSource() StreamingServiceType

type Type added in v0.2.0

type Type string
const (
	UnknownType Type = "unknown"
	ArtistType  Type = "artist"
	AlbumType   Type = "album"
	TrackType   Type = "track"
)

Jump to

Keyboard shortcuts

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