Documentation
¶
Overview ¶
Code generated for package webui by go-bindata DO NOT EDIT. (@generated) sources: static/application-rtl.css static/application.css static/application.js static/bootstrap-rtl.min.css static/bootstrap.css static/dashboard.js static/img/apple-touch-icon.png static/img/favicon-16x16.png static/img/favicon-32x32.png static/img/favicon.ico static/img/favicon.svg static/img/status.png static/locales/ar.yml static/locales/cs.yml static/locales/da.yml static/locales/de.yml static/locales/el.yml static/locales/en.yml static/locales/es.yml static/locales/fa.yml static/locales/fr.yml static/locales/he.yml static/locales/hi.yml static/locales/it.yml static/locales/ja.yml static/locales/ko.yml static/locales/nb.yml static/locales/nl.yml static/locales/pl.yml static/locales/pt-br.yml static/locales/pt.yml static/locales/ru.yml static/locales/sv.yml static/locales/ta.yml static/locales/uk.yml static/locales/ur.yml static/locales/zh-cn.yml static/locales/zh-tw.yml
Copyright (c) 2016 Justin Campbell ¶
MIT License ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetFile() http.FileSystem
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func DebugLog(ui *WebUI, pass http.HandlerFunc) http.HandlerFunc
- func GetOnly(h http.HandlerFunc) http.HandlerFunc
- func Layout(w io.Writer, req *http.Request, yield func())
- func Log(ui *WebUI, pass http.HandlerFunc) http.HandlerFunc
- func MustAsset(name string) []byte
- func PostOnly(h http.HandlerFunc) http.HandlerFunc
- func Proxy(ui *WebUI) http.HandlerFunc
- func Redirect(w http.ResponseWriter, r *http.Request, path string, code int)
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func Timeago(t time.Time) string
- type Context
- type DefaultContext
- func (d *DefaultContext) Locale() string
- func (d *DefaultContext) Request() *http.Request
- func (d *DefaultContext) Response() http.ResponseWriter
- func (d *DefaultContext) Server() *server.Server
- func (d *DefaultContext) Store() storage.Store
- func (d *DefaultContext) Translation(str string) string
- func (d *DefaultContext) UseCsrf() bool
- type Lifecycle
- type Options
- type Queue
- type Tab
- type Translator
- type WebUI
Constants ¶
This section is empty.
Variables ¶
var ( DefaultTabs = []Tab{ {"Home", "/"}, {"Busy", "/busy"}, {"Queues", "/queues"}, {"Retries", "/retries"}, {"Scheduled", "/scheduled"}, {"Dead", "/morgue"}, } LicenseStatus = func(w io.Writer, req *http.Request) string { return "" } )
var (
AssetLookups = []assetLookup{Asset}
)
var (
LAST_ELEMENT = regexp.MustCompile(`\/([^\/]+)\z`)
)
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/
foo.txt
img/
a.png
b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetFile ¶
func AssetFile() http.FileSystem
AssetFile return a http.FileSystem instance that data backend by asset
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func DebugLog ¶
func DebugLog(ui *WebUI, pass http.HandlerFunc) http.HandlerFunc
The stats handler is hit a lot and adds much noise to the log, quiet it down.
func GetOnly ¶
func GetOnly(h http.HandlerFunc) http.HandlerFunc
func Log ¶
func Log(ui *WebUI, pass http.HandlerFunc) http.HandlerFunc
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func PostOnly ¶
func PostOnly(h http.HandlerFunc) http.HandlerFunc
func Proxy ¶ added in v1.5.0
func Proxy(ui *WebUI) http.HandlerFunc
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type DefaultContext ¶
type DefaultContext struct {
context.Context
Root string
// contains filtered or unexported fields
}
func NewContext ¶ added in v1.5.0
func NewContext(ui *WebUI, req *http.Request, resp http.ResponseWriter) *DefaultContext
func (*DefaultContext) Locale ¶
func (d *DefaultContext) Locale() string
func (*DefaultContext) Request ¶
func (d *DefaultContext) Request() *http.Request
func (*DefaultContext) Response ¶
func (d *DefaultContext) Response() http.ResponseWriter
func (*DefaultContext) Server ¶ added in v1.5.0
func (d *DefaultContext) Server() *server.Server
func (*DefaultContext) Store ¶ added in v1.5.0
func (d *DefaultContext) Store() storage.Store
func (*DefaultContext) Translation ¶
func (d *DefaultContext) Translation(str string) string
func (*DefaultContext) UseCsrf ¶ added in v1.5.0
func (d *DefaultContext) UseCsrf() bool
type Lifecycle ¶ added in v1.5.0
type Lifecycle struct {
WebUI *WebUI
// contains filtered or unexported fields
}