context

package
v0.0.0-...-a85dc47 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2016 License: MIT Imports: 3 Imported by: 8

Documentation

Index

Constants

View Source
const CurrentUserKey domain.ContextKey = "slumber-mddlwr-context-current-user-key"
View Source
const DatabaseKey domain.ContextKey = "slumber-mddlwr-context-database-key"

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
}

Context implements IContext

func New

func New() *Context

func (*Context) Get

func (ctx *Context) Get(r *http.Request, key interface{}) interface{}

func (*Context) GetCurrentUserCtx

func (ctx *Context) GetCurrentUserCtx(r *http.Request) domain.IUser

func (*Context) Inject

func (ctx *Context) Inject(handler domain.ContextHandlerFunc) http.HandlerFunc

func (*Context) InjectMiddleware

func (ctx *Context) InjectMiddleware(middleware domain.ContextMiddlewareFunc) domain.MiddlewareFunc

func (*Context) Set

func (ctx *Context) Set(r *http.Request, key interface{}, val interface{})

func (*Context) SetCurrentUserCtx

func (ctx *Context) SetCurrentUserCtx(r *http.Request, user domain.IUser)

Jump to

Keyboard shortcuts

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