playlist

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Library

type Library interface {
	GetAllPlaylists(ctx context.Context) ([]model.Playlist, error)
	GetPlaylistFull(ctx context.Context, id uuid.UUID) (model.PlaylistFull, error)
	AddPlaylist(ctx context.Context, title, description string) error
	AddStreamingTrackToPlaylist(ctx context.Context, playlistID uuid.UUID, track *streaming.Track) error
	AddTrackToPlaylist(ctx context.Context, playlistID, trackID uuid.UUID) error
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func Init

func Init(lib Library, streaming streaming.StreamingClient, logger *slog.Logger) Service

func (*Service) AddPlaylist

func (s *Service) AddPlaylist(ctx context.Context, opt client.AddPlaylistOpt) error

func (*Service) AddTrackToPlaylist

func (s *Service) AddTrackToPlaylist(ctx context.Context, playlistID uuid.UUID, opt client.AddTrackOpt) error

func (*Service) GetAll

func (s *Service) GetAll(ctx context.Context) ([]client.Playlist, error)

func (*Service) Lookup

Jump to

Keyboard shortcuts

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