Documentation ¶
Index ¶
- func FakeCDNHandler(w http.ResponseWriter, r *http.Request)
- func GetHandler(w http.ResponseWriter, r *http.Request)
- func GetHippoHandler(w http.ResponseWriter, r *http.Request)
- func PostHandler(w http.ResponseWriter, r *http.Request)
- func RandomHippoHandler(w http.ResponseWriter, r *http.Request)
- func VoteHippoHandler(w http.ResponseWriter, r *http.Request)
- type PaginatedResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FakeCDNHandler ¶
func FakeCDNHandler(w http.ResponseWriter, r *http.Request)
FakeCDNHandler will return the image stream for the hippo. TODO: this is just temporal until we have a proper CDN.
func GetHandler ¶
func GetHandler(w http.ResponseWriter, r *http.Request)
GetHandler is a JSON endpoint that returns ALL the hippos paginated. It can be filtered with ?verified=true or ?verified=false
func GetHippoHandler ¶
func GetHippoHandler(w http.ResponseWriter, r *http.Request)
GetHippoHandler is going to find a hippo by Mongo ID and return it in JSON format. In case that the hippo is not found, we are going to return a 404.
func PostHandler ¶
func PostHandler(w http.ResponseWriter, r *http.Request)
PostHandler is able to receive hippo image and store them in our backend.
func RandomHippoHandler ¶
func RandomHippoHandler(w http.ResponseWriter, r *http.Request)
RandomHippoHandler will return a JSON response with a verified hippo
func VoteHippoHandler ¶
func VoteHippoHandler(w http.ResponseWriter, r *http.Request)
VoteHippoHandler is going to increment the number of votes for a cerating hippo
Types ¶
Click to show internal directories.
Click to hide internal directories.