public

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamFind

func StreamFind(c echo.Context) error

StreamFind finds a stream by ID

func StreamHome

func StreamHome(c echo.Context) error

StreamHome handles returning stream information for the homepage This could be absorbed by stream find but always selecting the first item?

func StreamList

func StreamList(c echo.Context) error

StreamList handles listing current and upcoming livestreams

Types

type Repos

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

Repos encapsulates the dependency

func NewRepos

func NewRepos(db *sqlx.DB) *Repos

NewRepos creates our data store

func (*Repos) Find

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

Find handles converting a url path to either a video or series

@Summary Converts a VOD url to either a series or video @Description Allows us to remain backwards compatible with the existing URLs @ID get-public-breadcrumb-find @Tags public, breadcrumb @Param url path string true "URL Path" @Produce json @Success 200 {object} public.BreadcrumbItem @Router /v1/public/find/{url} [get]

func (*Repos) ListTeams

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

ListTeams handles listing teams and their members and info

@Summary Provides the current teams @Description Returns a path of series to a series @ID get-public-teams @Tags public @Produce json @Success 200 {array} public.Team @Router /v1/public/teams [get]

func (*Repos) ListVideos

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

ListVideos handles listing videos using an offset and page

@Summary Provides a list of videos @Description List of video meta's in order of broadcast date. @ID get-public-videos @Tags public, video @Param offset path int true "Offset" @Param page path int true "Page" @Produce json @Success 200 {array} public.VideoMeta @Router /v1/public/videos/{offset}/{page} [get]

func (*Repos) SeriesBreadcrumb

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

SeriesBreadcrumb returns the breadcrumb of a given series

@Summary Provides a breadcrumb for a series @Description Returns a path of series to a series @ID get-public-breadcrumb-series @Tags public, breadcrumb @Param seriesid path int true "Series ID" @Produce json @Success 200 {object} public.Breadcrumb @Router /v1/public/series/{seriesid}/breadcrumb [get]

func (*Repos) SeriesByID

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

SeriesByID returns a series with it's immediate children with a SeriesID

@Summary Provides a series @Description Returns a series object, including the children videos and series. @ID get-public-series @Tags public, series @Param seriesid path int true "Series ID" @Produce json @Success 200 {object} public.Series @Router /v1/public/series/{seriesid} [get]

func (*Repos) Video

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

Video handles a video item, providing info vfiles

@Summary Provides a video item @Description Returns a video item. Including the video files. @ID get-public-video @Tags public, video @Param videoid path int true "Video ID" @Produce json @Success 200 {object} public.VideoItem @Router /v1/public/video/{videoid} [get]

func (*Repos) VideoBreadcrumb

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

VideoBreadcrumb handles generating the breadcrumb of a video

@Summary Provides a breadcrumb for a video @Description Returns a path of series to a video @ID get-public-breadcrumb-video @Tags public, breadcrumb @Param videoid path int true "Video ID" @Produce json @Success 200 {object} public.Breadcrumb @Router /v1/public/video/{videoid}/breadcrumb [get]

type StreamMeta

type StreamMeta struct {
	public.VideoMeta
	Status string
}

StreamMeta contains basic stream information

Jump to

Keyboard shortcuts

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