handler

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppHandler added in v0.12.0

type AppHandler struct {
	App *app.Application
	controller.StandardResponseFields
}

AppHandler is the struct that serves the application and methods for handling all HTTP requests

func NewAppHandler added in v0.13.0

func NewAppHandler(app *app.Application) *AppHandler

NewAppHandler initializes the AppHandler

func (*AppHandler) AddMovie added in v0.12.0

func (ah *AppHandler) AddMovie() http.HandlerFunc

AddMovie handles POST requests for the /movies endpoint and creates a movie in the database

func (*AppHandler) AddRequestID added in v0.13.0

func (ah *AppHandler) AddRequestID(h http.Handler) http.Handler

AddRequestID middleware is used to add a unique request ID to each request

func (*AppHandler) AddStandardResponseHeaders added in v0.12.0

func (ah *AppHandler) AddStandardResponseHeaders(h http.Handler) http.Handler

AddStandardResponseHeaders middleware is used to add any standard HTTP response headers

func (*AppHandler) Delete added in v0.13.0

func (ah *AppHandler) Delete() http.HandlerFunc

Delete handles DELETE requests for the /movies/{id} endpoint and updates the given movie

func (*AppHandler) FindAll added in v0.13.0

func (ah *AppHandler) FindAll() http.HandlerFunc

FindAll handles GET requests for the /movies endpoint and finds all movies

func (*AppHandler) FindByID added in v0.12.0

func (ah *AppHandler) FindByID() http.HandlerFunc

FindByID handles GET requests for the /movies/{id} endpoint and finds a movie by it's ID

func (*AppHandler) Update added in v0.13.0

func (ah *AppHandler) Update() http.HandlerFunc

Update handles PUT requests for the /movies/{id} endpoint and updates the given movie

Jump to

Keyboard shortcuts

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