context

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contexter

func Contexter() macaron.Handler

Contexter wrap macaron.Context

Types

type Context

type Context struct {
	*macaron.Context

	Flash   *session.Flash
	Session session.Store
	User    *models.User
}

Context will be used in routers

func (*Context) Autorized

func (ctx *Context) Autorized() bool

Autorized just hellper

func (*Context) HTML

func (ctx *Context) HTML(code int, tmplName string, other ...interface{})

HTML overwrite macaron.HTML method

func (*Context) HasError

func (ctx *Context) HasError(err error) bool

HasError check passed err and write resposne if err!=nil

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL