Documentation ¶
Index ¶
- Constants
- Variables
- func JSON(c *web.C, h http.Handler) http.Handler
- type Application
- type Params
- func (p Params) Add(key string, value interface{})
- func (p Params) Get(key string) string
- func (p Params) GetA(key string) []interface{}
- func (p Params) GetAString(key string) []string
- func (p Params) GetI(key string) interface{}
- func (p Params) GetP(key string) Params
- func (p Params) Required(keys ...string) error
- func (p Params) ShouldBeEmail(key string) error
Constants ¶
View Source
const EMAIL_REGEX string = `^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$`
Variables ¶
View Source
var App = NewApplication()
Functions ¶
Types ¶
type Application ¶
type Application struct { Store *sessions.CookieStore DB *mgo.Database // contains filtered or unexported fields }
func NewApplication ¶
func NewApplication() *Application
func (*Application) Close ¶
func (application *Application) Close()
func (*Application) CreateIndexes ¶
func (application *Application) CreateIndexes()
func (*Application) DBSession ¶
func (application *Application) DBSession() *mgo.Session
func (*Application) Init ¶
func (application *Application) Init()
type Params ¶
type Params map[string]interface{}
func (Params) GetAString ¶
func (Params) ShouldBeEmail ¶
Click to show internal directories.
Click to hide internal directories.