Back to godoc.org

Package web

v0.0.0-...-8a7cd2d
Latest Go to latest

The latest major version is .

Published: Jun 18, 2020 | License: MIT | Module: bosun.org

Index

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

func FSByte(useLocal bool, name string) ([]byte, error)

FSByte returns the named file from the embedded assets. If useLocal is true, the filesystem's contents are instead used.

func FSMustByte

func FSMustByte(useLocal bool, name string) []byte

FSMustByte is the same as FSByte, but panics if name is not present.

func FSMustString

func FSMustString(useLocal bool, name string) string

FSMustString is the string version of FSMustByte.

func FSString

func FSString(useLocal bool, name string) (string, error)

FSString is the string version of FSByte.

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 Index

func Index(w http.ResponseWriter, r *http.Request)

func InsertAnnotation

func InsertAnnotation(w http.ResponseWriter, req *http.Request)
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier