creator

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) *Repos

NewRepos creates our data repositories

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/playlists/{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) ListEncodeProfile

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

ListEncodeProfile 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-encodes-formats @Tags creator, encodes @Produce json @Success 200 {array} encode.Format @Router /v1/internal/creator/encodes/profiles [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/playlists [get]

func (*Repos) ListPreset

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

ListPreset 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-encodes-presets @Tags creator, encodes @Produce json @Success 200 {array} encode.Preset @Router /v1/internal/creator/encodes/presets [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/videos/my [get]

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/playlists [post]

func (*Repos) NewPreset

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

NewPreset handles creating a new preset @Summary New preset @Description creates a new preset. @ID new-creator-encodes-preset @Tags creator, encodes @Accept json @Param event body encode.Preset true "Preset object" @Success 201 body int "Preset ID" @Router /v1/internal/creator/encodes/presets [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) 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, stats @Produce json @Success 200 {object} stats.VideoGlobalStats @Router /v1/internal/creator/stats [get]

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/playlists [put]

func (*Repos) UpdatePreset

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

UpdatePreset handles updating a preset @Summary Update a preset @Description updates an preset @ID update-creator-encodes-preset @Tags creator, encodes @Accept json @Param quote body encode.Preset true "Preset object" @Success 200 @Router /v1/internal/creator/encodes/presets [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/videos [get]

Jump to

Keyboard shortcuts

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