creator

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: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.7.0

type Config struct {
	IngestBucket string
	ServeBucket  string
}

type NewVideoOutput added in v0.7.0

type NewVideoOutput struct {
	VideoID int `json:"id"`
}

type Repos

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

Repos represents all our data repositories

func NewRepos

func NewRepos(db *sqlx.DB, cdn *s3.S3, enc *encoder.Encoder, access *utils.Accesser, conf *Config) *Repos

NewRepos creates our data repositories

func (*Repos) DeleteChannel added in v0.7.0

func (r *Repos) DeleteChannel(c echo.Context) error

DeleteChannel handles deleting channels @Summary Delete channel @Description deletes a channel by the short URL. @ID delete-creator-playout-channel @Tags creator-playout-channels @Param channelid path string true "Channel URL Name" @Success 200 @Router /v1/internal/creator/playout/channels/{channelid} [delete]

func (*Repos) DeleteEncodeFormat added in v0.7.0

func (r *Repos) DeleteEncodeFormat(c echo.Context) error

DeleteEncodeFormat handles deleting quotes @Summary Delete a encode format @Description Delete a video encode format @ID delete-creator-encode-format @Tags creator-encodes @Param formatid path int true "Format ID" @Success 200 @Router /v1/internal/creator/encode/format/{formatid} [delete]

func (*Repos) DeleteEncodePreset added in v0.7.0

func (r *Repos) DeleteEncodePreset(c echo.Context) error

DeleteEncodePreset handles deleting presets @Summary Delete a encode preset @Description Delete a video encode preset @ID delete-creator-encode-preset @Tags creator-encodes @Param presetid path int true "Preset ID" @Success 200 @Router /v1/internal/creator/encode/preset/{presetid} [delete]

func (*Repos) DeleteVideo added in v0.7.0

func (r *Repos) DeleteVideo(c echo.Context) error

func (*Repos) GetPlaylist

func (r *Repos) GetPlaylist(c echo.Context) error

GetPlaylist handles getting a single playlist and it's following videometa's @Summary Get playlist by ID @Description Get a playlist including it's children videos. @ID get-creator-playlist @Tags creator-playlists @Produce json @Param playlistid path int true "Playlist ID" @Success 200 {object} playlist.Playlist @Router /v1/internal/creator/playlist/{playlistid} [get]

func (*Repos) GetSeries

func (r *Repos) GetSeries(c echo.Context) error

GetSeries finds a video by ID @Summary Get series by ID @Description Get a series including it's children videos. @ID get-creator-series @Tags creator-series @Produce json @Param seriesid path int true "Series ID" @Success 200 {object} series.Series @Router /v1/internal/creator/series/{seriesid} [get]

func (*Repos) GetVideo

func (r *Repos) GetVideo(c echo.Context) error

GetVideo finds a video by ID

@Summary Get video by ID @Description Get a playlist including it's children files. @ID get-creator-video @Tags creator-videos @Produce json @Param videoid path int true "Video ID" @Success 200 {object} video.Item @Router /v1/internal/creator/videos/{videoid} [get]

func (*Repos) ListChannels added in v0.7.0

func (r *Repos) ListChannels(c echo.Context) error

ListChannels handles listing channels @Summary List all channels @Description Lists all channels, these are a rough implementation of what is too come (linear channels) @ID get-creator-playout-channels @Tags creator-playout-channels @Produce json @Success 200 {array} playout.Channel @Router /v1/internal/creator/playout/channels [get]

func (*Repos) ListEncodeFormat added in v0.7.0

func (r *Repos) ListEncodeFormat(c echo.Context) error

ListEncodeFormat handles listing encode formats @Summary List all encode formats @Description Lists all encode formats, these are instructions for the encoder to create the video @ID get-creator-encode-format @Tags creator-encodes @Produce json @Success 200 {array} encode.Format @Router /v1/internal/creator/encode/format [get]

func (*Repos) ListEncodePreset added in v0.7.0

func (r *Repos) ListEncodePreset(c echo.Context) error

ListEncodePreset handles listing presets @Summary List all encode presets @Description Lists all encode presets, these are groups of instructions (formats) for the encoder to create the video @ID get-creator-encode-preset @Tags creator-encodes @Produce json @Success 200 {array} encode.Preset @Router /v1/internal/creator/encode/preset [get]

func (*Repos) ListPlaylist

func (r *Repos) ListPlaylist(c echo.Context) error

ListPlaylist handles listing all playlist metadata's @Summary List all playlists @Description Lists all playlists, doesn't include videos inside. @ID get-creator-playlists-all @Tags creator-playlists @Produce json @Success 200 {array} playlist.Playlist @Router /v1/internal/creator/playlist [get]

func (*Repos) ListSeries

func (r *Repos) ListSeries(c echo.Context) error

ListSeries handles listing every series and their depth @Summary List all series @Description Lists all series, doesn't include videos inside. @ID get-creator-series-all @Tags creator-series @Produce json @Success 200 {array} series.Meta @Router /v1/internal/creator/series [get]

func (*Repos) ListVideosByMonth

func (r *Repos) ListVideosByMonth(c echo.Context) error

ListVideosByMonth Handles listing all videos from a calendar year/month

@Summary List videos by month @Description Lists videos by month. @ID get-creator-videos-calendar @Tags creator-videos @Produce json @Param year path int true "year" @Param month path int true "month" @Success 200 {array} video.MetaCal @Router /v1/internal/creator/calendar/{year}/{month} [get]

func (*Repos) ListVideosByUser

func (r *Repos) ListVideosByUser(c echo.Context) error

ListVideosByUser Handles retrieving a user's videos using their userid in their token.

@Summary List all videos created by user ID @Description Lists all videos, doesn't include files inside. Uses the createdBy user ID. @ID get-creator-videos-user @Tags creator-videos @Produce json @Success 200 {array} video.Meta @Router /v1/internal/creator/video/my [get]

func (*Repos) NewChannel added in v0.7.0

func (r *Repos) NewChannel(c echo.Context) error

NewChannel handles creating a new channel @Summary New channel @Description creates a new channel. @ID new-creator-playout-channel @Tags creator-playout-channels @Accept json @Param channel body playout.Channel true "Channel object" @Success 201 body int "Channel ID" @Router /v1/internal/creator/playout/channels [post]

func (*Repos) NewEncodeFormat added in v0.7.0

func (r *Repos) NewEncodeFormat(c echo.Context) error

NewEncodeFormat handles creating a new encode format @Summary New encode format @Description creates a new encode format. @ID new-creator-encode-format @Tags creator-encodes @Accept json @Param format body encode.Format true "Encode format object" @Success 201 body int "Format ID" @Router /v1/internal/creator/encode/format [post]

func (*Repos) NewEncodePreset added in v0.7.0

func (r *Repos) NewEncodePreset(c echo.Context) error

NewPreset handles creating a new preset @Summary New preset @Description creates a new preset. @ID new-creator-encode-preset @Tags creator-encodes @Accept json @Param event body encode.Preset true "Preset object" @Success 201 body int "Preset ID" @Router /v1/internal/creator/encode/preset [post]

func (*Repos) NewPlaylist

func (r *Repos) NewPlaylist(c echo.Context) error

NewPlaylist handles creating a new playlist item @Summary New playlist @Description creates a new playlist with optional video ID's. @ID new-creator-playlist @Tags creator-playlists @Accept json @Param event body playlist.Playlist true "Playlist object" @Success 201 body int "Playlist ID" @Router /v1/internal/creator/playlist [post]

func (*Repos) NewVideo

func (r *Repos) NewVideo(c echo.Context) error

NewVideo Handles creation of a video

@Summary New video @Description creates a new video, requires the file ID/name to find it in CDN. @ID new-creator-video @Tags creator-videos @Accept json @Param event body video.New true "NewVideo object" @Success 201 body int "Video ID" @Router /v1/internal/creator/videos [post]

func (*Repos) SearchVideo added in v0.7.0

func (r *Repos) SearchVideo(c echo.Context) error

SearchVideo Handles listing appropriate videos from a relevant search

@Summary Search videos @Description Search videos. @ID search-creator-videos @Tags creator-videos @Produce json @Param searchInput body searchInput true "Search Input object" @Success 200 {array} video.Meta @Router /v1/internal/creator/video/search [post]

func (*Repos) Stats

func (r *Repos) Stats(c echo.Context) error

Stats handles sending general stats about the video library @Summary Get global video library information @Description Gets the statistics about the global video library. @ID get-creator-glob-stats @Tags creator @Produce json @Success 200 {object} stats.VideoGlobalStats @Router /v1/internal/creator/stats [get]

func (*Repos) UpdateChannel added in v0.7.0

func (r *Repos) UpdateChannel(c echo.Context) error

UpdateChannel handles updating a Channel @Summary Update a channel @Description updates an channel @ID update-creator-playout-channel @Tags creator-playout-channels @Accept json @Param channel body playout.Channel true "Channel object" @Success 200 @Router /v1/internal/creator/playout/channels [put]

func (*Repos) UpdateEncodeFormat added in v0.7.0

func (r *Repos) UpdateEncodeFormat(c echo.Context) error

UpdateEncodeFormat handles updating a format @Summary Update a format @Description updates an format @ID update-creator-encode-format @Tags creator-encodes @Accept json @Param format body encode.Format true "Format object" @Success 200 @Router /v1/internal/creator/encode/format [put]

func (*Repos) UpdateEncodePreset added in v0.7.0

func (r *Repos) UpdateEncodePreset(c echo.Context) error

UpdatePreset handles updating a preset @Summary Update a preset @Description updates an preset @ID update-creator-encode-preset @Tags creator-encodes @Accept json @Param quote body encode.Preset true "Preset object" @Success 200 @Router /v1/internal/creator/encode/preset [put]

func (*Repos) UpdatePlaylist

func (r *Repos) UpdatePlaylist(c echo.Context) error

UpdatePlaylist handles updating a playlist @Summary Update playlist @Description Update a playlist, video ID's required otherwise it will remove all videos. @ID update-creator-playlist @Tags creator-playlists @Accept json @Param quote body playlist.New true "Playlist object" @Success 200 @Router /v1/internal/creator/playlist [put]

func (*Repos) UpdateVideoMeta added in v0.7.0

func (r *Repos) UpdateVideoMeta(c echo.Context) error

UpdateVideo updates a video's metadata not files

@Summary Update video meta @Description Updates a video metadata @ID update-creator-video-meta @Tags creator-videos @Accept json @Param event body video.Item true "VideoItem object" @Success 200 body int "Video ID" @Router /v1/internal/creator/video/meta [put]

func (*Repos) VideoList

func (r *Repos) VideoList(c echo.Context) error

VideoList Handles listing all creations

@Summary List all videos @Description Lists all videos, doesn't include files inside. @ID get-creator-videos-all @Tags creator-videos @Produce json @Success 200 {array} video.Meta @Router /v1/internal/creator/video [get]

Jump to

Keyboard shortcuts

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