creator

package
v0.9.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BreadcrumbRepo interface {
	Series(ctx context.Context, seriesID int) ([]breadcrumb.Breadcrumb, error)
	Video(ctx context.Context, videoID int) ([]breadcrumb.Breadcrumb, error)
	Find(ctx context.Context, path string) (breadcrumb.Item, error)
}

BreadcrumbRepo defines all creator breadcrumb interactions

type ChannelRepo added in v0.7.0

type ChannelRepo interface {
	ListChannels(ctx context.Context) ([]playout.Channel, error)
	GetChannel(ctx context.Context, urlName string) (playout.Channel, error)
	NewChannel(ctx context.Context, ch playout.Channel) error
	UpdateChannel(ctx context.Context, ch playout.Channel) error
	DeleteChannel(ctx context.Context, urlName string) error
}

ChannelRepo defines all channel interactions

type Config added in v0.7.0

type Config struct {
	IngestBucket string
	ServeBucket  string
	Endpoint     string
}

Config configures where creator will use as its bucket sources

type EncodeRepo

type EncodeRepo interface {
	ListFormat(ctx context.Context) ([]encode.Format, error)
	NewFormat(ctx context.Context, format encode.Format) (int, error)
	UpdateFormat(ctx context.Context, format encode.Format) error
	DeleteFormat(ctx context.Context, formatID int) error
	GetPreset(ctx context.Context, presetID int) (encode.Preset, error)
	ListPreset(ctx context.Context) ([]encode.Preset, error)
	NewPreset(ctx context.Context, p encode.Preset) (int, error)
	UpdatePreset(ctx context.Context, p encode.Preset) error
	DeletePreset(ctx context.Context, presetID int) error
}

EncodeRepo defines all encode interactions

type PlaylistRepo

type PlaylistRepo interface {
	ListPlaylists(ctx context.Context) ([]playlist.PlaylistDB, error)
	GetPlaylist(ctx context.Context, playlistID int) (playlist.PlaylistDB, error)
	NewPlaylist(ctx context.Context, p playlist.New) (int, error)
	UpdatePlaylist(ctx context.Context, p playlist.Meta, videoIDs []int) error
	DeletePlaylist(ctx context.Context, playlistID int) error
	AddVideo(ctx context.Context, playlistID, videoID int) error
	DeleteVideo(ctx context.Context, playlistID, videoID int) error
	AddVideos(ctx context.Context, playlistID int, videoIDs []int) error
}

PlaylistRepo defines all playlist interactions

type Repo added in v0.9.6

type Repo interface {
	StatRepo
}

func NewStore

func NewStore(db *sqlx.DB) Repo

NewStore creates a new store

type SeriesRepo

type SeriesRepo interface {
	GetSeries(ctx context.Context, seriesID int) (series.SeriesDB, error)
	GetMeta(ctx context.Context, seriesID int) (series.Meta, error)
	ImmediateChildrenSeries(ctx context.Context, seriesID int) ([]series.Meta, error)
	List(ctx context.Context) ([]series.Meta, error)
	FromPath(ctx context.Context, path string) (series.SeriesDB, error)
}

SeriesRepo defines all creator series interactions

type StatRepo

type StatRepo interface {
	GlobalVideoStats(ctx context.Context) (stats.VideoGlobalStats, error)
}

StatRepo defines all statistical interactions

type Store

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

Store contains our dependency

func (*Store) GlobalVideoStats added in v0.9.6

func (m *Store) GlobalVideoStats(ctx context.Context) (stats.VideoGlobalStats, error)

GlobalVideoStats returns general information about a video library

type VideoRepo

type VideoRepo interface {
	// GetItem gets the individual video item
	GetItem(ctx context.Context, id int) (video.ItemDB, error)
	ListMeta(ctx context.Context) ([]video.MetaDB, error)
	ListMetaByUser(ctx context.Context, userID int) ([]video.MetaDB, error)
	ListByCalendarMonth(ctx context.Context, year, month int) ([]video.MetaCal, error)
	OfSeries(ctx context.Context, seriesID int) ([]video.MetaDB, error)
	Search(ctx context.Context, query string) ([]video.MetaDB, error)
	// NewItem inserts a new video
	NewItem(ctx context.Context, v video.New) (int, error)
	// UpdateMeta updates the video metadata
	UpdateMeta(ctx context.Context, meta video.Meta) error
	// DeleteItem removes a video
	DeleteItem(ctx context.Context, videoID, userID int) error
	DeleteItemPermanently(ctx context.Context, videoID int) error
}

VideoRepo defines all creator video interactions

Directories

Path Synopsis
types

Jump to

Keyboard shortcuts

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