handlers

package
v0.0.0-...-f828b04 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleUnexpectedError

func HandleUnexpectedError(err error, w http.ResponseWriter, r *http.Request)

func NewHandlers

func NewHandlers(h *HandlerConfig)

Types

type HandlerConfig

type HandlerConfig struct {
	App *config.AppConfig
}
var Instance *HandlerConfig

func NewConfig

func NewConfig(a *config.AppConfig) *HandlerConfig

func (*HandlerConfig) AdminCatalogue

func (a *HandlerConfig) AdminCatalogue(w http.ResponseWriter, r *http.Request)

func (*HandlerConfig) AdminMovieAddGet

func (a *HandlerConfig) AdminMovieAddGet(w http.ResponseWriter, r *http.Request)

AdminMovieAddGet renders the add movie page

func (*HandlerConfig) AdminMovieAddPost

func (a *HandlerConfig) AdminMovieAddPost(w http.ResponseWriter, r *http.Request)

func (*HandlerConfig) AdminMovieDeletePost

func (a *HandlerConfig) AdminMovieDeletePost(w http.ResponseWriter, r *http.Request)

func (*HandlerConfig) AdminMovieEditGet

func (a *HandlerConfig) AdminMovieEditGet(w http.ResponseWriter, r *http.Request)

AdminMovieEditGet renders the add movie page

func (*HandlerConfig) AdminMovieEditPost

func (a *HandlerConfig) AdminMovieEditPost(w http.ResponseWriter, r *http.Request)

func (*HandlerConfig) AllMovies

func (a *HandlerConfig) AllMovies(w http.ResponseWriter, r *http.Request)

func (*HandlerConfig) AllMoviesByGenre

func (a *HandlerConfig) AllMoviesByGenre(w http.ResponseWriter, r *http.Request)

func (*HandlerConfig) Genres

func (a *HandlerConfig) Genres(w http.ResponseWriter, r *http.Request)

func (*HandlerConfig) GraphQLGet

func (a *HandlerConfig) GraphQLGet(w http.ResponseWriter, r *http.Request)

func (*HandlerConfig) GraphQLPost

func (a *HandlerConfig) GraphQLPost(w http.ResponseWriter, r *http.Request)

func (*HandlerConfig) Home

func (a *HandlerConfig) Home(w http.ResponseWriter, r *http.Request)

func (*HandlerConfig) LoginPost

func (a *HandlerConfig) LoginPost(w http.ResponseWriter, r *http.Request)

LoginPost handles logging the user in

func (*HandlerConfig) Logout

func (a *HandlerConfig) Logout(w http.ResponseWriter, r *http.Request)

Logout logs a user out

func (*HandlerConfig) Movie

func (a *HandlerConfig) Movie(w http.ResponseWriter, r *http.Request)

func (*HandlerConfig) OneGenre

func (a *HandlerConfig) OneGenre(w http.ResponseWriter, r *http.Request)

func (*HandlerConfig) ShowLogin

func (a *HandlerConfig) ShowLogin(w http.ResponseWriter, r *http.Request)

type Result

type Result struct {
	Data ResultList
}

type ResultList

type ResultList struct {
	List   []models.Movie
	Search []models.Movie
}

Jump to

Keyboard shortcuts

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