Documentation
¶
Index ¶
- Variables
- func FromKey(s string) string
- func ToKey(s string) string
- type AddedRoute
- type App
- func (wfa *App) AddRoute(path string, ...)
- func (wfa *App) GetRow(table, key string) map[string]interface{}
- func (wfa *App) GetRows(table string) []map[string]interface{}
- func (wfa *App) InsertRow(table, key, value string) error
- func (wfa *App) ReadCookie(r *http.Request) map[string]string
- func (wfa *App) Render(c *wsrooms.Conn, msg *wsrooms.Message, template string, controllers []string, ...)
- func (wfa *App) SetCookie(w http.ResponseWriter, r *http.Request, value map[string]string, logout bool)
- func (wfa *App) Start()
- type Auth
- type DBConfig
- type Route
- type RouteConfig
- type RoutePayload
Constants ¶
This section is empty.
Variables ¶
View Source
var TemplateFuncs = template.FuncMap{ "unescaped": func(x string) interface{} { return template.HTML(x) }, "sha1sum": func(x string) string { return fmt.Sprintf("%x", sha1.Sum([]byte(x))) }, "subtract": func(a, b int) int { return a - b }, "add": func(a, b int) int { return a + b }, "multiply": func(a, b int) int { return a * b }, "divide": func(a, b int) int { return a / b }, "usd": func(x int) string { return fmt.Sprintf("$%.2f", float64(x)/float64(100)) }, "css": func(s string) template.CSS { return template.CSS(s) }, "tokey": ToKey, "fromkey": FromKey, }
Functions ¶
Types ¶
type AddedRoute ¶
type App ¶
type App struct {
Name string `json:"name"`
HashKey string `json:"hashkey"`
BlockKey string `json:"blockkey"`
SecureCookie *securecookie.SecureCookie
Templates *template.Template
Port string `json:"port"`
SSLPort string `json:"sslport"`
Database DBConfig `json:"database"`
Driver *sql.DB
Routes []Route `json:"routes"`
Added []AddedRoute
Router *mux.Router
}
type Route ¶
type Route struct {
Route string `json:"route"`
Admin RouteConfig `json:"admin"`
Authorized RouteConfig `json:"authorized"`
RouteConfig
}
type RouteConfig ¶
type RoutePayload ¶
Click to show internal directories.
Click to hide internal directories.