filters

package module
v0.0.0-...-8b9de39 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2014 License: BSD-2-Clause Imports: 6 Imported by: 0

README

Build Status

ZAIUZ/FILTERS

Filters for ZAIUS

LICENSE

BSD 2-Clause (see the LICENSE file for more info)

Documentation

Index

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 GetDuration

func GetDuration(c *z.Context) time.Duration

func GetFinishTime

func GetFinishTime(c *z.Context) time.Time

func GetLogger

func GetLogger(c *z.Context) bunyan.Log

func GetRequestId

func GetRequestId(c *z.Context) string

func GetSession

func GetSession(c *z.Context) *sessions.Session

func GetStartTime

func GetStartTime(c *z.Context) time.Time

func LogFilter

func LogFilter(name string, parent bunyan.Log) z.Filter

func RequestIdFilter

func RequestIdFilter() z.Filter

func SessionFilter

func SessionFilter(name, secret string) z.Filter

TODO: Rename to CookieSessionFilter (we would soon need redis)

func TimeFilter

func TimeFilter() z.Filter

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

Jump to

Keyboard shortcuts

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