app

package
v0.0.0-...-77c78fe Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config      *m.Config
	DB          *db.DB
	Logger      *zap.Logger
	Transcoder  *transcoder.Transcoder
	Recommender *recommender.Recommender
	Settings    m.Settings
}

App represents dependencies which will be injected into the Server handlers.

func New

func New(c string) App

New initiates a new App instance and returns it.

func (*App) APIMedia

func (app *App) APIMedia(c echo.Context) error

APIMedia returns the media entry matching the hash from the database in JSON

func (*App) APIMedias

func (app *App) APIMedias(c echo.Context) error

APIMedias returns media entries from the database in JSON

func (*App) APIMetricsMedia

func (app *App) APIMetricsMedia(c echo.Context) error

func (*App) APIMetricsUser

func (app *App) APIMetricsUser(c echo.Context) error

func (*App) APIMovie

func (app *App) APIMovie(c echo.Context) error

APIMovie returns the media entry (movie) matching the hash from the database in JSON

func (*App) APIMovies

func (app *App) APIMovies(c echo.Context) error

APIMovies returns media entries (movies) from the database in JSON

func (*App) APIRecommendationByHash

func (app *App) APIRecommendationByHash(c echo.Context) error

func (*App) APIShow

func (app *App) APIShow(c echo.Context) error

APIShow returns the media entry (show) matching the hash from the database in JSON

func (*App) APIShows

func (app *App) APIShows(c echo.Context) error

APIShows returns media entries (shows) from the database in JSON

func (*App) APITranscode

func (app *App) APITranscode(c echo.Context) error

APITranscode handles the initiation of the transcoding process

func (*App) APITranscodePoll

func (app *App) APITranscodePoll(c echo.Context) error

APITranscodePoll provides transcoding status updates via a websocket

func (*App) GetConfig

func (a *App) GetConfig() *m.Config

func (*App) GetPort

func (a *App) GetPort() int

func (*App) Init

func (a *App) Init(c string)

Init sets up some basic parameters of the provided App instance, like the Config and the DB (Database) connection.

func (*App) Log

func (a *App) Log(level string)

func (*App) RedirectToBrowse

func (app *App) RedirectToBrowse(c echo.Context) error

RedirectToBrowse redirects to /browse

func (*App) UI404Page

func (app *App) UI404Page(c echo.Context) error

UI404Page renders a 404 error page via the template 404.html

func (*App) UI500Page

func (app *App) UI500Page(c echo.Context) error

UI500Page renders a 500 error page via the template 500.html

func (*App) UIBrowsePage

func (app *App) UIBrowsePage(c echo.Context) error

UIBrowsePage renders the home page via the template browse.html

func (*App) UIMoviePage

func (app *App) UIMoviePage(c echo.Context) error

UIMoviePage renders the movie detail page via the template movie.html

func (*App) UIMoviesPage

func (app *App) UIMoviesPage(c echo.Context) error

UIMoviesPage renders the browse page via the template browse-movies.html

func (*App) UIShowPage

func (app *App) UIShowPage(c echo.Context) error

UIShowPage renders the show detail page via the template show.html

func (*App) UIShowsPage

func (app *App) UIShowsPage(c echo.Context) error

UIShowsPage renders the browse page via the template browse-shows.html

Jump to

Keyboard shortcuts

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