Documentation ¶
Overview ¶
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 DebugOnlyLog(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 PostOnly(h http.HandlerFunc) http.HandlerFunc
- func Redirect(w http.ResponseWriter, r *http.Request, path string, code int)
- func Timeago(t time.Time) string
- type Context
- type DefaultContext
- func (d *DefaultContext) Locale() string
- func (d *DefaultContext) Manager() manager.Manager
- func (d *DefaultContext) Request() *http.Request
- func (d *DefaultContext) Response() http.ResponseWriter
- func (d *DefaultContext) Server() *faktory.Server
- func (d *DefaultContext) Store() storage.Store
- func (d *DefaultContext) Translation(str string) string
- func (d *DefaultContext) UseCsrf() bool
- type Queue
- type Tab
- type Translator
- type WebUI
Constants ¶
This section is empty.
Variables ¶
var (
AssetLookups = []assetLookup{
localeFiles.ReadFile,
}
)
var (
DefaultTabs = []Tab{
{"Home", "/"},
{"Busy", "/busy"},
{"Queues", "/queues"},
{"Retries", "/retries"},
{"Scheduled", "/scheduled"},
{"Dead", "/morgue"},
}
)
Functions ¶
func DebugOnlyLog ¶
func DebugOnlyLog(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 PostOnly ¶
func PostOnly(h http.HandlerFunc) http.HandlerFunc
Types ¶
type DefaultContext ¶
type DefaultContext struct { context.Context Root string // contains filtered or unexported fields }
func NewContext ¶
func NewContext(ui *WebUI, req *http.Request, resp http.ResponseWriter) *DefaultContext
func (*DefaultContext) Locale ¶
func (d *DefaultContext) Locale() string
func (*DefaultContext) Manager ¶
func (d *DefaultContext) Manager() manager.Manager
func (*DefaultContext) Request ¶
func (d *DefaultContext) Request() *http.Request
func (*DefaultContext) Response ¶
func (d *DefaultContext) Response() http.ResponseWriter
func (*DefaultContext) Server ¶
func (d *DefaultContext) Server() *faktory.Server
func (*DefaultContext) Store ¶
func (d *DefaultContext) Store() storage.Store
func (*DefaultContext) Translation ¶
func (d *DefaultContext) Translation(str string) string
func (*DefaultContext) UseCsrf ¶
func (d *DefaultContext) UseCsrf() bool