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 BasicAuth(pass http.HandlerFunc) http.HandlerFunc
- func Cache(h http.Handler) http.HandlerFunc
- func DebugLog(pass http.HandlerFunc) http.HandlerFunc
- func FireItUp(svr *server.Server) error
- func GetOnly(h http.HandlerFunc) http.HandlerFunc
- func InitialSetup(pwd string)
- func Log(pass http.HandlerFunc) http.HandlerFunc
- func PostOnly(h http.HandlerFunc) http.HandlerFunc
- func Setup(pass http.HandlerFunc, debug bool) http.HandlerFunc
- func Timeago(t time.Time) string
- type AssetDirectory
- type AssetFS
- type AssetFile
- type Context
- type DefaultContext
- type DummyFile
- type Queue
- type Tab
- type Translater
Constants ¶
This section is empty.
Variables ¶
var ( DefaultTabs = []Tab{ Tab{"Home", "/"}, Tab{"Busy", "/busy"}, Tab{"Queues", "/queues"}, Tab{"Retries", "/retries"}, Tab{"Scheduled", "/scheduled"}, Tab{"Dead", "/morgue"}, } )
var (
LAST_ELEMENT = regexp.MustCompile(`\/([^\/]+)\z`)
)
var (
Password = ""
)
Functions ¶
func BasicAuth ¶
func BasicAuth(pass http.HandlerFunc) http.HandlerFunc
func DebugLog ¶
func DebugLog(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 InitialSetup ¶
func InitialSetup(pwd string)
func Log ¶
func Log(pass http.HandlerFunc) http.HandlerFunc
func PostOnly ¶
func PostOnly(h http.HandlerFunc) http.HandlerFunc
func Setup ¶
func Setup(pass http.HandlerFunc, debug bool) http.HandlerFunc
Types ¶
type AssetDirectory ¶
func NewAssetDirectory ¶
func NewAssetDirectory(name string, children []string, fs *AssetFS) *AssetDirectory
type AssetFS ¶
type AssetFile ¶
func NewAssetFile ¶
type 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) Translation ¶
func (d *DefaultContext) Translation(str string) string