nanoDB: github.com/jackyzha0/nanoDB/api Index | Files

package api

import "github.com/jackyzha0/nanoDB/api"

Package api contains files responsible for defining and serving the restful api

Index

Package Files

api.go

func DeleteKey Uses

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 Uses

func GetIndex(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

GetIndex returns a JSON of all files in db index

func GetKey Uses

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 Uses

func GetKeyField(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

GetKeyField returns key's field, 404 if not found

func PatchKeyField Uses

func PatchKeyField(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

PatchKeyField modifies the field of a key

func RegenerateIndex Uses

func RegenerateIndex(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

RegenerateIndex rebuilds main index with saved directory

func UpdateKey Uses

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.