Documentation ¶
Index ¶
- Variables
- func BadRequest(w http.ResponseWriter)
- func Fatal(w http.ResponseWriter)
- func LoadConfig(file string) error
- func NotFound(w http.ResponseWriter)
- func RenderJSON(w io.Writer, data interface{}) error
- func RenderView(w io.Writer, filename string, data Data) error
- func Route(pattern string, handler interface{})
- func Run()
- type Data
- type ServerMux
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ViewPath = "view" LayoutFile = "layout/default.html" )
View Source
var Config = &struct { App *struct { Bind string `json:"bind"` WebRoot string `json:"webroot"` Env string `json:"env"` NumDoc int64 `json:"numdoc"` } `json:"app"` Upload *struct { Server string `json:"server"` Root string `json:"root"` } `json:"upload"` Rethink *struct { Address string `json:"address"` Database string `json:"database"` MaxIdle int `json:"maxIdle"` MaxActive int `json:"maxActive"` } `json:"rethink"` Redis map[string]*struct { Address string `json:"address"` } `json:"redis"` }{}
View Source
var DefaultServerMux = &ServerMux{}
Functions ¶
func BadRequest ¶
func BadRequest(w http.ResponseWriter)
func Fatal ¶
func Fatal(w http.ResponseWriter)
func LoadConfig ¶
func NotFound ¶
func NotFound(w http.ResponseWriter)
func RenderJSON ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.