Documentation
¶
Index ¶
- func AddRoutes(router *mux.Router, prefix string, b []backend.Backend, ...) error
- func AddRoutesWithMiddleware(router *mux.Router, prefix string, b []backend.Backend, ...) error
- func DeleteAnnotation(w http.ResponseWriter, req *http.Request)
- func Dir(useLocal bool, name string) http.FileSystem
- func FS(useLocal bool) http.FileSystem
- func FSByte(useLocal bool, name string) ([]byte, error)
- func FSMustByte(useLocal bool, name string) []byte
- func FSMustString(useLocal bool, name string) string
- func FSString(useLocal bool, name string) (string, error)
- func GetAnnotation(w http.ResponseWriter, req *http.Request)
- func GetAnnotations(w http.ResponseWriter, req *http.Request)
- func GetFieldValues(w http.ResponseWriter, req *http.Request)
- func Index(w http.ResponseWriter, r *http.Request)
- func InsertAnnotation(w http.ResponseWriter, req *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRoutes ¶
func AddRoutes(router *mux.Router, prefix string, b []backend.Backend, enableUI, useLocalAssets bool) error
AddRoutes will add annotate routes to the given router, using the specified prefix
func AddRoutesWithMiddleware ¶
func AddRoutesWithMiddleware(router *mux.Router, prefix string, b []backend.Backend, enableUI, useLocalAssets bool, readMiddleware, modifyMiddleware func(http.HandlerFunc) http.Handler) error
AddRoutesWithMiddleware will add annotate routes to the given router, using the specified prefix. It accepts two middleware functions that will be applied to each route, depending on whether they are a "read" operation, or a "write" operation
func DeleteAnnotation ¶
func DeleteAnnotation(w http.ResponseWriter, req *http.Request)
func Dir ¶
func Dir(useLocal bool, name string) http.FileSystem
Dir returns a http.Filesystem for the embedded assets on a given prefix dir. If useLocal is true, the filesystem's contents are instead used.
func FS ¶
func FS(useLocal bool) http.FileSystem
FS returns a http.Filesystem for the embedded assets. If useLocal is true, the filesystem's contents are instead used.
func FSByte ¶
FSByte returns the named file from the embedded assets. If useLocal is true, the filesystem's contents are instead used.
func FSMustByte ¶
FSMustByte is the same as FSByte, but panics if name is not present.
func FSMustString ¶
FSMustString is the string version of FSMustByte.
func GetAnnotation ¶
func GetAnnotation(w http.ResponseWriter, req *http.Request)
func GetAnnotations ¶
func GetAnnotations(w http.ResponseWriter, req *http.Request)
func GetFieldValues ¶
func GetFieldValues(w http.ResponseWriter, req *http.Request)
func InsertAnnotation ¶
func InsertAnnotation(w http.ResponseWriter, req *http.Request)
Types ¶
This section is empty.