Documentation ¶
Overview ¶
Package api contains files responsible for defining and serving the restful api
Index ¶
- func DeleteKey(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func GetIndex(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func GetKey(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func GetKeyField(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func PatchKeyField(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func RegenerateIndex(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func UpdateKey(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteKey ¶
func DeleteKey(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
DeleteKey deletes the file associated with the given key, returns 404 if not found
func GetIndex ¶
func GetIndex(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
GetIndex returns a JSON of all files in db index
func GetKey ¶
func GetKey(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
GetKey returns the file with that key if found, otherwise return 404
func GetKeyField ¶
func GetKeyField(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
GetKeyField returns key's field, 404 if not found
func PatchKeyField ¶
func PatchKeyField(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
PatchKeyField modifies the field of a key
func RegenerateIndex ¶
func RegenerateIndex(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
RegenerateIndex rebuilds main index with saved directory
func UpdateKey ¶
func UpdateKey(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
UpdateKey creates or updates the file with that key with the request body
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.