Documentation ¶
Index ¶
- func Create(w http.ResponseWriter, r *http.Request)
- func Delete(w http.ResponseWriter, r *http.Request)
- func Get(w http.ResponseWriter, r *http.Request)
- func GetAll(w http.ResponseWriter, r *http.Request)
- func Init(session *mgo.Session)
- func Update(w http.ResponseWriter, r *http.Request)
- type Address
- type Person
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(w http.ResponseWriter, r *http.Request)
Create a person object example: curl -d '{"id":"100", "firstname":"foo", "lastname":"bar"}' -H "Content-Type: application/json" -X POST http://backend:8000/db/100
func Delete ¶
func Delete(w http.ResponseWriter, r *http.Request)
Delete a person object example: curl -X DELETE http://backend:8000/db/100
func Update ¶
func Update(w http.ResponseWriter, r *http.Request)
Update a person object example: curl -d '{"lastname":"brad"}' -X PUT http://backend:8000/db/100
Types ¶
Click to show internal directories.
Click to hide internal directories.