context

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contexter

type Contexter struct {
	// contains filtered or unexported fields
}

Contexter handles managing application-wide context information.

func NewContexter

func NewContexter(cfg *conf.Config, model *models.Model, sessionStore sessions.Store) *Contexter

NewContexter constructs a new instance of Contexter.

func (Contexter) ServeHTTP

func (c Contexter) ServeHTTP(resp http.ResponseWriter, req *http.Request, next http.HandlerFunc)

type RequestContext

type RequestContext struct {
	Data map[string]interface{}
}

RequestContext represents the context data for a single request.

func Get

func Get(req *http.Request) *RequestContext

Get returns the RequestContext for the specified request object, creating a new one if necessary.

Jump to

Keyboard shortcuts

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