Versions in this module Expand all Collapse all v1 v1.4.3 Feb 27, 2015 Changes in this version + const AfterExec + const BeforeExec + const BeforeRouter + const BeforeStatic + const COMMENTFL + const FinishRouter + const LevelAlert + const LevelCritical + const LevelDebug + const LevelEmergency + const LevelError + const LevelInformational + const LevelNotice + const LevelWarning + const VERSION + var AccessLogs bool + var AdminHttpAddr string + var AdminHttpPort int + var AppConfig *beegoAppConfig + var AppConfigPath string + var AppConfigProvider string + var AppName string + var AppPath string + var AutoRender bool + var BeeApp *App + var BeeLogger *logs.BeeLogger + var BeeTemplateExt []string + var BeeTemplates map[string]*template.Template + var BeegoServerName string + var CopyRequestBody bool + var DirectoryIndex bool + var EnableAdmin bool + var EnableDocs bool + var EnableGzip bool + var EnableHttpListen bool + var EnableHttpTLS bool + var EnableXSRF bool + var ErrorMaps map[string]*errorInfo + var ErrorsShow bool + var FilterMonitorFunc func(string, string, time.Duration) bool + var FlashName string + var FlashSeperator string + var GlobalControllerRouter map[string][]ControllerComments = make(map[string][]ControllerComments) + var GlobalDocApi map[string]interface + var GlobalSessions *session.Manager + var HttpAddr string + var HttpCertFile string + var HttpKeyFile string + var HttpPort int + var HttpServerTimeOut int64 + var HttpsPort int + var ListenTCP4 bool + var MaxMemory int64 + var RecoverPanic bool + var RouterCaseSensitive bool + var RunMode string + var SessionAutoSetCookie bool + var SessionCookieLifeTime int + var SessionDomain string + var SessionGCMaxLifetime int64 + var SessionName string + var SessionOn bool + var SessionProvider string + var SessionSavePath string + var StaticDir map[string]string + var StaticExtensionsToGzip []string + var TemplateCache map[string]*template.Template + var TemplateLeft string + var TemplateRight string + var USERSTOPRUN = errors.New("User stop run") + var UseFcgi bool + var UseStdIo bool + var ViewsPath string + var XSRFExpire int + var XSRFKEY string + func AddAPPStartHook(hf hookfunc) + func AddFuncMap(key string, funname interface{}) error + func AddNamespace(nl ...*Namespace) + func AddTemplateExt(ext string) + func Alert(v ...interface{}) + func AssetsCss(src string) template.HTML + func AssetsJs(src string) template.HTML + func BuildTemplate(dir string) error + func Compare(a, b interface{}) (equal bool) + func CompareNot(a, b interface{}) (equal bool) + func Config(returnType, key string, defaultVal interface{}) (value interface{}, err error) + func Critical(v ...interface{}) + func Date(t time.Time, format string) string + func DateFormat(t time.Time, layout string) (datestring string) + func DateParse(dateString, format string) (time.Time, error) + func Debug(v ...interface{}) + func Emergency(v ...interface{}) + func Error(v ...interface{}) + func ExceptMethodAppend(action string) + func HasTemplateExt(paths string) bool + func Html2str(html string) string + func Htmlquote(src string) string + func Htmlunquote(src string) string + func Info(v ...interface{}) + func Informational(v ...interface{}) + func NSAfter(filiterList ...FilterFunc) innnerNamespace + func NSAny(rootpath string, f FilterFunc) innnerNamespace + func NSAutoPrefix(prefix string, c ControllerInterface) innnerNamespace + func NSAutoRouter(c ControllerInterface) innnerNamespace + func NSBefore(filiterList ...FilterFunc) innnerNamespace + func NSCond(cond namespaceCond) innnerNamespace + func NSDelete(rootpath string, f FilterFunc) innnerNamespace + func NSGet(rootpath string, f FilterFunc) innnerNamespace + func NSHead(rootpath string, f FilterFunc) innnerNamespace + func NSInclude(cList ...ControllerInterface) innnerNamespace + func NSNamespace(prefix string, params ...innnerNamespace) innnerNamespace + func NSOptions(rootpath string, f FilterFunc) innnerNamespace + func NSPatch(rootpath string, f FilterFunc) innnerNamespace + func NSPost(rootpath string, f FilterFunc) innnerNamespace + func NSPut(rootpath string, f FilterFunc) innnerNamespace + func NSRouter(rootpath string, c ControllerInterface, mappingMethods ...string) innnerNamespace + func NotNil(a interface{}) (is_nil bool) + func Notice(v ...interface{}) + func ParseConfig() (err error) + func ParseForm(form url.Values, obj interface{}) error + func RenderForm(obj interface{}) template.HTML + func Run(params ...string) + func SetLevel(l int) + func SetLogFuncCall(b bool) + func SetLogger(adaptername string, config string) error + func Str2html(raw string) template.HTML + func Substr(s string, start, length int) string + func TestBeegoInit(apppath string) + func Trace(v ...interface{}) + func UrlFor(endpoint string, values ...interface{}) string + func Warn(v ...interface{}) + func Warning(v ...interface{}) + type App struct + Handlers *ControllerRegistor + Server *http.Server + func Any(rootpath string, f FilterFunc) *App + func AutoPrefix(prefix string, c ControllerInterface) *App + func AutoRouter(c ControllerInterface) *App + func DelStaticPath(url string) *App + func Delete(rootpath string, f FilterFunc) *App + func ErrorController(c ControllerInterface) *App + func Errorhandler(code string, h http.HandlerFunc) *App + func Get(rootpath string, f FilterFunc) *App + func Handler(rootpath string, h http.Handler, options ...interface{}) *App + func Head(rootpath string, f FilterFunc) *App + func Include(cList ...ControllerInterface) *App + func InsertFilter(pattern string, pos int, filter FilterFunc, params ...bool) *App + func NewApp() *App + func Options(rootpath string, f FilterFunc) *App + func Patch(rootpath string, f FilterFunc) *App + func Post(rootpath string, f FilterFunc) *App + func Put(rootpath string, f FilterFunc) *App + func RESTRouter(rootpath string, c ControllerInterface) *App + func Router(rootpath string, c ControllerInterface, mappingMethods ...string) *App + func SetStaticPath(url string, path string) *App + func SetViewsPath(path string) *App + func (app *App) Run() + type Controller struct + AppController interface{} + CruSession session.SessionStore + Ctx *context.Context + Data map[interface{}]interface{} + EnableRender bool + EnableXSRF bool + Layout string + LayoutSections map[string]string + TplExt string + TplNames string + XSRFExpire int + func (c *Controller) Abort(code string) + func (c *Controller) CheckXsrfCookie() bool + func (c *Controller) CustomAbort(status int, body string) + func (c *Controller) DelSession(name interface{}) + func (c *Controller) Delete() + func (c *Controller) DestroySession() + func (c *Controller) Finish() + func (c *Controller) Get() + func (c *Controller) GetBool(key string, def ...bool) (bool, error) + func (c *Controller) GetControllerAndAction() (controllerName, actionName string) + func (c *Controller) GetFile(key string) (multipart.File, *multipart.FileHeader, error) + func (c *Controller) GetFloat(key string, def ...float64) (float64, error) + func (c *Controller) GetInt(key string, def ...int) (int, error) + func (c *Controller) GetInt16(key string, def ...int16) (int16, error) + func (c *Controller) GetInt32(key string, def ...int32) (int32, error) + func (c *Controller) GetInt64(key string, def ...int64) (int64, error) + func (c *Controller) GetInt8(key string, def ...int8) (int8, error) + func (c *Controller) GetSecureCookie(Secret, key string) (string, bool) + func (c *Controller) GetSession(name interface{}) interface{} + func (c *Controller) GetString(key string, def ...string) string + func (c *Controller) GetStrings(key string, def ...[]string) []string + func (c *Controller) HandlerFunc(fnname string) bool + func (c *Controller) Head() + func (c *Controller) Init(ctx *context.Context, controllerName, actionName string, app interface{}) + func (c *Controller) Input() url.Values + func (c *Controller) IsAjax() bool + func (c *Controller) Mapping(method string, fn func()) + func (c *Controller) Options() + func (c *Controller) ParseForm(obj interface{}) error + func (c *Controller) Patch() + func (c *Controller) Post() + func (c *Controller) Prepare() + func (c *Controller) Put() + func (c *Controller) Redirect(url string, code int) + func (c *Controller) Render() error + func (c *Controller) RenderBytes() ([]byte, error) + func (c *Controller) RenderString() (string, error) + func (c *Controller) SaveToFile(fromfile, tofile string) error + func (c *Controller) ServeFormatted() + func (c *Controller) ServeJson(encoding ...bool) + func (c *Controller) ServeJsonp() + func (c *Controller) ServeXml() + func (c *Controller) SessionRegenerateID() + func (c *Controller) SetSecureCookie(Secret, name, value string, others ...interface{}) + func (c *Controller) SetSession(name interface{}, value interface{}) + func (c *Controller) StartSession() session.SessionStore + func (c *Controller) StopRun() + func (c *Controller) URLMapping() + func (c *Controller) UrlFor(endpoint string, values ...interface{}) string + func (c *Controller) XsrfFormHtml() string + func (c *Controller) XsrfToken() string + type ControllerComments struct + AllowHTTPMethods []string + Method string + Params []map[string]string + Router string + type ControllerInterface interface + CheckXsrfCookie func() bool + Delete func() + Finish func() + Get func() + HandlerFunc func(fn string) bool + Head func() + Init func(ct *context.Context, controllerName, actionName string, app interface{}) + Options func() + Patch func() + Post func() + Prepare func() + Put func() + Render func() error + URLMapping func() + XsrfToken func() string + type ControllerRegistor struct + func NewControllerRegister() *ControllerRegistor + func (p *ControllerRegistor) Add(pattern string, c ControllerInterface, mappingMethods ...string) + func (p *ControllerRegistor) AddAuto(c ControllerInterface) + func (p *ControllerRegistor) AddAutoPrefix(prefix string, c ControllerInterface) + func (p *ControllerRegistor) AddMethod(method, pattern string, f FilterFunc) + func (p *ControllerRegistor) Any(pattern string, f FilterFunc) + func (p *ControllerRegistor) Delete(pattern string, f FilterFunc) + func (p *ControllerRegistor) Get(pattern string, f FilterFunc) + func (p *ControllerRegistor) Handler(pattern string, h http.Handler, options ...interface{}) + func (p *ControllerRegistor) Head(pattern string, f FilterFunc) + func (p *ControllerRegistor) Include(cList ...ControllerInterface) + func (p *ControllerRegistor) InsertFilter(pattern string, pos int, filter FilterFunc, params ...bool) error + func (p *ControllerRegistor) Options(pattern string, f FilterFunc) + func (p *ControllerRegistor) Patch(pattern string, f FilterFunc) + func (p *ControllerRegistor) Post(pattern string, f FilterFunc) + func (p *ControllerRegistor) Put(pattern string, f FilterFunc) + func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) + func (p *ControllerRegistor) UrlFor(endpoint string, values ...interface{}) string + type FilterFunc func(*context.Context) + type FilterHandler interface + Filter func(*beecontext.Context) bool + var DefaultLogFilter FilterHandler = &logFilter{} + var HTTPMETHOD = map[string]string{ ... } + type FilterRouter struct + func (f *FilterRouter) ValidRouter(router string) (bool, map[string]string) + type FlashData struct + Data map[string]string + func NewFlash() *FlashData + func ReadFromRequest(c *Controller) *FlashData + func (fd *FlashData) Error(msg string, args ...interface{}) + func (fd *FlashData) Notice(msg string, args ...interface{}) + func (fd *FlashData) Set(key string, msg string, args ...interface{}) + func (fd *FlashData) Store(c *Controller) + func (fd *FlashData) Success(msg string, args ...interface{}) + func (fd *FlashData) Warning(msg string, args ...interface{}) + type Namespace struct + func NewNamespace(prefix string, params ...innnerNamespace) *Namespace + func (n *Namespace) Any(rootpath string, f FilterFunc) *Namespace + func (n *Namespace) AutoPrefix(prefix string, c ControllerInterface) *Namespace + func (n *Namespace) AutoRouter(c ControllerInterface) *Namespace + func (n *Namespace) Cond(cond namespaceCond) *Namespace + func (n *Namespace) Delete(rootpath string, f FilterFunc) *Namespace + func (n *Namespace) Filter(action string, filter ...FilterFunc) *Namespace + func (n *Namespace) Get(rootpath string, f FilterFunc) *Namespace + func (n *Namespace) Handler(rootpath string, h http.Handler) *Namespace + func (n *Namespace) Head(rootpath string, f FilterFunc) *Namespace + func (n *Namespace) Include(cList ...ControllerInterface) *Namespace + func (n *Namespace) Namespace(ns ...*Namespace) *Namespace + func (n *Namespace) Options(rootpath string, f FilterFunc) *Namespace + func (n *Namespace) Patch(rootpath string, f FilterFunc) *Namespace + func (n *Namespace) Post(rootpath string, f FilterFunc) *Namespace + func (n *Namespace) Put(rootpath string, f FilterFunc) *Namespace + func (n *Namespace) Router(rootpath string, c ControllerInterface, mappingMethods ...string) *Namespace + type Tree struct + func NewTree() *Tree + func (t *Tree) AddRouter(pattern string, runObject interface{}) + func (t *Tree) AddTree(prefix string, tree *Tree) + func (t *Tree) Match(pattern string) (runObject interface{}, params map[string]string)