Documentation
¶
Index ¶
- Constants
- func GetDuration(c *z.Context) time.Duration
- func GetFinishTime(c *z.Context) time.Time
- func GetLogger(c *z.Context) bunyan.Log
- func GetRequestId(c *z.Context) string
- func GetSession(c *z.Context) *sessions.Session
- func GetStartTime(c *z.Context) time.Time
- func LogFilter(name string, parent bunyan.Log) z.Filter
- func RequestIdFilter() z.Filter
- func SessionFilter(name, secret string) z.Filter
- func TimeFilter() z.Filter
- type Controller
Constants ¶
View Source
const LogFilterPrefix = "z.log"
View Source
const RequestIdPrefix = "z.requestid"
View Source
const SessionFilterPrefix = "z.session"
View Source
const TimeFilterPrefix = "z.time"
Variables ¶
This section is empty.
Functions ¶
func GetRequestId ¶
func RequestIdFilter ¶
func SessionFilter ¶
TODO: Rename to CookieSessionFilter (we would soon need redis)
func TimeFilter ¶
Types ¶
type Controller ¶
type Controller struct{}
func (*Controller) GetDuration ¶
func (ctr *Controller) GetDuration(c *z.Context) time.Duration
func (*Controller) GetLogger ¶
func (ctr *Controller) GetLogger(c *z.Context) bunyan.Log
func (*Controller) GetRequestId ¶
func (ctr *Controller) GetRequestId(c *z.Context) string
func (*Controller) GetSession ¶
func (ctr *Controller) GetSession(c *z.Context) *sessions.Session
Click to show internal directories.
Click to hide internal directories.