playlist

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: GPL-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 Store

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

Store contains our dependency

func NewStore

func NewStore(db *sqlx.DB) *Store

NewStore creates a new store

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) All

func (m *Store) All(ctx context.Context) ([]playlist.Playlist, error)

All lists all playlists metadata

func (*Store) DeleteVideo

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

DeleteVideo deletes a single video from a playlist

func (*Store) Get

func (m *Store) Get(ctx context.Context, playlistID int) (playlist.Playlist, error)

Get returns a playlist and it's video's

func (*Store) New

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

New makes a playlist item

func (*Store) Update

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

Update 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