playlist

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStore

func NewStore(db *sqlx.DB) creator.PlaylistRepo

NewStore creates a new store

Types

type Store

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

Store contains our dependency

func (*Store) AddVideo

func (m *Store) AddVideo(ctx context.Context, playlistID, videoID int) error

AddVideo adds a single video to a playlist

func (*Store) AddVideos

func (m *Store) AddVideos(ctx context.Context, playlistID int, videoIDs []int) error

AddVideos adds multiple videos to a playlist

func (*Store) DeletePlaylist added in v0.9.5

func (m *Store) DeletePlaylist(_ context.Context, _ int) error

func (*Store) DeleteVideo

func (m *Store) DeleteVideo(ctx context.Context, playlistID, videoID int) error

DeleteVideo deletes a single video from a playlist

func (*Store) GetPlaylist added in v0.9.5

func (m *Store) GetPlaylist(ctx context.Context, playlistID int) (playlist.PlaylistDB, error)

GetPlaylist returns a playlist and it's video's

func (*Store) ListPlaylists added in v0.9.5

func (m *Store) ListPlaylists(ctx context.Context) ([]playlist.PlaylistDB, error)

ListPlaylists lists all playlists metadata

func (*Store) NewPlaylist added in v0.9.5

func (m *Store) NewPlaylist(ctx context.Context, p playlist.New) (int, error)

NewPlaylist makes a playlist item

func (*Store) UpdatePlaylist added in v0.9.5

func (m *Store) UpdatePlaylist(ctx context.Context, p playlist.Meta, videoIDs []int) error

UpdatePlaylist will update a playlist Accepts playlist metadata, video ID's that will be part of the playlist

Jump to

Keyboard shortcuts

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