video

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: 15 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, enc *encoder.Encoder, conf *creator.Config) *Store

NewStore returns a new store

func (*Store) DeleteItem added in v0.7.0

func (s *Store) DeleteItem(ctx context.Context, videoID, userID int) error

DeleteItem Removes a video. The video will still be present in the database, files and visible to users with high enough access

func (*Store) DeleteItemPermanently added in v0.7.0

func (s *Store) DeleteItemPermanently(ctx context.Context, videoID int) error

DeleteItemPermanently removes a video entirely, including the associated video files

func (*Store) GetItem

func (s *Store) GetItem(ctx context.Context, videoID 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) (int, error)

NewItem creates a new video item

func (*Store) OfSeries

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

OfSeries returns all the videos belonging to a series

func (*Store) Search added in v0.7.0

func (m *Store) Search(ctx context.Context, query string) ([]video.Meta, error)

Search performs a full-text search on video library

Uses postgres' full-text search, video and series tables to try to make some sense

func (*Store) UpdateMeta added in v0.7.0

func (s *Store) UpdateMeta(ctx context.Context, m video.Meta) error

UpdateMeta updates a video's metadata

This wont update: * duration * views

Jump to

Keyboard shortcuts

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