API

package
v0.0.0-...-f619c18 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFair

func CreateFair(w http.ResponseWriter, r *http.Request)

CreateFair create new models.Fair on database

func DeleteFair

func DeleteFair(w http.ResponseWriter, r *http.Request)

DeleteFair delete models.Fair by given id

func GetFair

func GetFair(w http.ResponseWriter, r *http.Request)

GetFair read and find models.Fair using SearchFair

func GetFairs

func GetFairs(w http.ResponseWriter, r *http.Request)

GetFairs read and find all models.Fair in database

func HandleRequest

func HandleRequest()

HandleRequest function to manage all routes of the API and set the content-type as JSON

func SearchFair

func SearchFair(w http.ResponseWriter, searchParam, searchType, query string) error

SearchFair simple function for json return using searchType with a searchParam

func UpdateFair

func UpdateFair(w http.ResponseWriter, r *http.Request)

UpdateFair update models.Fair by given id

Types

This section is empty.

Jump to

Keyboard shortcuts

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