import "github.com/jackyzha0/nanoDB/api"
Package api contains files responsible for defining and serving the restful api
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(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
GetIndex returns a JSON of all files in db index
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(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
GetKeyField returns key's field, 404 if not found
func PatchKeyField(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
PatchKeyField modifies the field of a key
func RegenerateIndex(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
RegenerateIndex rebuilds main index with saved directory
func UpdateKey(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
UpdateKey creates or updates the file with that key with the request body
Package api imports 8 packages (graph) and is imported by 1 packages. Updated 2020-09-03. Refresh now. Tools for package owners.