handler

package
v0.0.0-...-37d92c4 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePaciente

func CreatePaciente(db *mongo.Database, res http.ResponseWriter, req *http.Request)

CreatePaciente will handle the create person post request

func GetPaciente

func GetPaciente(db *mongo.Database, res http.ResponseWriter, req *http.Request)

GetPaciente will give us person with special id

func GetPacientes

func GetPacientes(db *mongo.Database, res http.ResponseWriter, req *http.Request)

GetPacientes will handle pacientes list get request

func JSONContentTypeMiddleware

func JSONContentTypeMiddleware(next http.Handler) http.Handler

JSONContentTypeMiddleware will add the json content type header for all endpoints

func ResponseWriter

func ResponseWriter(res http.ResponseWriter, statusCode int, message string, data interface{}) error

ResponseWriter will write result in http.ResponseWriter

func UpdatePaciente

func UpdatePaciente(db *mongo.Database, res http.ResponseWriter, req *http.Request)

UpdatePaciente will handle the person update endpoint

Types

This section is empty.

Jump to

Keyboard shortcuts

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