httphandler

package
v0.0.0-...-a59a69c Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMovie

func CreateMovie(s storage.Storage) http.HandlerFunc

Handler for HTTP Post - "/movies" Insert a new Movie document

func DeleteMovie

func DeleteMovie(s storage.Storage) http.HandlerFunc

Handler for HTTP Delete - "/movies/{id}" Delete movie by id

func GetLiveness

func GetLiveness() http.HandlerFunc

func GetMovieById

func GetMovieById(s storage.Storage) http.HandlerFunc

Handler for HTTP Get - "/movies/{id}" Get movie by id

func GetMovies

func GetMovies(s storage.Storage) http.HandlerFunc

Handler for HTTP Get - "/movies" Returns all Movie documents

func GetReadiness

func GetReadiness(s storage.Storage) http.HandlerFunc

Types

type MovieResource

type MovieResource struct {
	Data model.Movie `json:"data"`
}

For Post/Put - /movies

type MoviesResource

type MoviesResource struct {
	Data []model.Movie `json:"data"`
}

For Get - /movies

Jump to

Keyboard shortcuts

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