Documentation ¶
Overview ¶
This code is from https://www.codementor.io/codehakase/building-a-restful-api-with-golang-a6yivzqdo
Index ¶
- func CreatePerson(w http.ResponseWriter, r *http.Request)
- func CreatePersonFromForm(w http.ResponseWriter, r *http.Request)
- func DeletePerson(w http.ResponseWriter, r *http.Request)
- func GetDummyRouter() *mux.Router
- func GetPeople(w http.ResponseWriter, r *http.Request)
- func GetPeopleArray(w http.ResponseWriter, r *http.Request)
- func GetPerson(w http.ResponseWriter, r *http.Request)
- func GetRouter() *mux.Router
- type Address
- type Person
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePerson ¶ added in v0.7.0
func CreatePerson(w http.ResponseWriter, r *http.Request)
CreatePerson creates a new item
func CreatePersonFromForm ¶ added in v0.7.0
func CreatePersonFromForm(w http.ResponseWriter, r *http.Request)
CreatePersonFromForm creates a new item using form data
func DeletePerson ¶ added in v0.7.0
func DeletePerson(w http.ResponseWriter, r *http.Request)
DeletePerson deletes an item
func GetDummyRouter ¶ added in v0.7.0
DummyRouter is router for test
func GetPeople ¶ added in v0.7.0
func GetPeople(w http.ResponseWriter, r *http.Request)
GetPeople displays all from the people var
func GetPeopleArray ¶ added in v0.8.0
func GetPeopleArray(w http.ResponseWriter, r *http.Request)
Types ¶
Click to show internal directories.
Click to hide internal directories.