video

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: GPL-3.0 Imports: 9 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 encapsulates our dependencies

func NewStore

func NewStore(db *sqlx.DB, cdn *s3.S3) *Store

NewStore returns a new store

func (*Store) GetItem

func (s *Store) GetItem(ctx context.Context, id int) (*video.Item, error)

GetItem returns a VideoItem by it's ID.

func (*Store) ListByCalendarMonth

func (s *Store) ListByCalendarMonth(ctx context.Context, year, month int) (*[]video.MetaCal, error)

ListByCalendarMonth returns a list of VideoMeta's for a given month/year

func (*Store) ListMeta

func (s *Store) ListMeta(ctx context.Context) (*[]video.Meta, error)

ListMeta returns a list of VideoMeta's

func (*Store) ListMetaByUser

func (s *Store) ListMetaByUser(ctx context.Context, userID int) (*[]video.Meta, error)

ListMetaByUser returns a list of VideoMeta's for a given user

func (*Store) NewItem

func (s *Store) NewItem(ctx context.Context, v *video.New) error

NewItem creates a new video item TODO I think this needs to be redesigned more like a transaction so we can safely fail anywhere. TODO return new video ID

func (*Store) OfSeries

func (s *Store) OfSeries(ctx context.Context, seriesID int) (*[]video.Meta, error)

OfSeries returns all the videos belonging to a series

Jump to

Keyboard shortcuts

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