Documentation ¶
Index ¶
- func CreateEntry(s *mgo.Session) func(w http.ResponseWriter, r *http.Request)
- func DeleteEntry(s *mgo.Session) func(w http.ResponseWriter, r *http.Request)
- func ErrorWithJSON(w http.ResponseWriter, message string, code int)
- func GetEntries(s *mgo.Session) func(w http.ResponseWriter, r *http.Request)
- func GetEntry(s *mgo.Session) func(w http.ResponseWriter, r *http.Request)
- func ResponseWithJSON(w http.ResponseWriter, json []byte, code int)
- func UpdateEntry(s *mgo.Session) func(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateEntry ¶
CreateEntry makes a new Entry
func DeleteEntry ¶
DeleteEntry removes a entry a row from db
func ErrorWithJSON ¶
func ErrorWithJSON(w http.ResponseWriter, message string, code int)
ErrorWithJSON represents errors in JSON for HTTP response
func GetEntries ¶
GetEntries fetches all the Entry stored TODO: Needs to throttle the count.
func ResponseWithJSON ¶
func ResponseWithJSON(w http.ResponseWriter, json []byte, code int)
ResponseWithJSON returns HTTP response in JSON
func UpdateEntry ¶
UpdateEntry updates data in mongodb for specific ID
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.