model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const StreamingSource = "streaming"

Variables

View Source
var ErrNotFound = errors.New("entry not found in library")

Functions

This section is empty.

Types

type Album

type Album struct {
	InLibrary   bool
	ID          uuid.UUID
	StreamingID *string
	Title       string
	Duration    *int16
	Tracknum    *int16
	Release     *time.Time
	ImageURL    *string
	Added       time.Time
}

type AlbumFull

type AlbumFull struct {
	Album  AlbumWithArtists
	Tracks []TrackFull
}

func (*AlbumFull) ToClient

func (a *AlbumFull) ToClient() client.AlbumFull

type AlbumWithArtists

type AlbumWithArtists struct {
	Album
	Artists []Artist
}

func (*AlbumWithArtists) ToClient

func (a *AlbumWithArtists) ToClient() client.Album

type Artist

type Artist struct {
	InLibrary   bool
	ID          uuid.UUID
	StreamingID *string
	Title       string
	ImageURL    *string
	Added       time.Time
}

func (*Artist) ToClient

func (a *Artist) ToClient() client.Artist

type ArtistFull

type ArtistFull struct {
	Artist Artist
	Albums []AlbumWithArtists
}

func (*ArtistFull) ToClient

func (a *ArtistFull) ToClient() (res client.ArtistFull)

type PlayedAlbum

type PlayedAlbum struct {
	ID          uuid.UUID
	Title       string
	StreamingID *string
	AlbumID     *uuid.UUID
	ImageURL    *string
	Played      time.Time
	Release     *time.Time
	Artists     []string
}

func (*PlayedAlbum) ToClient

func (a *PlayedAlbum) ToClient() client.Album

type Playlist

type Playlist struct {
	ID          uuid.UUID
	Title       string
	Added       time.Time
	Description *string
}

func (*Playlist) ToClient

func (p *Playlist) ToClient() client.Playlist

type PlaylistFull

type PlaylistFull struct {
	Playlist Playlist
	Tracks   []TrackFull
}

func (*PlaylistFull) ToClient

func (p *PlaylistFull) ToClient() client.PlaylistFull

type SearchRes

type SearchRes struct {
	Artists []Artist
	Albums  []AlbumWithArtists
	Tracks  []TrackFull
}

func (*SearchRes) ToClient

func (s *SearchRes) ToClient() (res client.SourceRes)

func (*SearchRes) ToClientSlim

func (s *SearchRes) ToClientSlim() (res client.SlimSearchRes)

type Track

type Track struct {
	ID          uuid.UUID
	StreamingID *string
	Path        *string
	Title       string
	Duration    int16
	Num         int16
	AlbumID     uuid.UUID
	Disc        int16
	Version     *string
	LastSync    *time.Time
}

type TrackFull

type TrackFull struct {
	Track
	Artists []Artist
	Album   AlbumWithArtists
}

func (*TrackFull) ToClient

func (t *TrackFull) ToClient() client.Track

Jump to

Keyboard shortcuts

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