slumber: github.com/sogko/slumber/middlewares/context Index | Files

package context

import "github.com/sogko/slumber/middlewares/context"

Index

Package Files

context.go

Constants

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

type Context Uses

type Context struct {
}

Context implements IContext

func New Uses

func New() *Context

func (*Context) Get Uses

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

func (*Context) GetCurrentUserCtx Uses

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

func (*Context) Inject Uses

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

func (*Context) InjectMiddleware Uses

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

func (*Context) Set Uses

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

func (*Context) SetCurrentUserCtx Uses

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

Package context imports 3 packages (graph) and is imported by 12 packages. Updated 2016-07-16. Refresh now. Tools for package owners.