Documentation ¶
Index ¶
- Constants
- type Context
- func (ctx *Context) Get(r *http.Request, key interface{}) interface{}
- func (ctx *Context) GetCurrentUserCtx(r *http.Request) domain.IUser
- func (ctx *Context) Inject(handler domain.ContextHandlerFunc) http.HandlerFunc
- func (ctx *Context) InjectMiddleware(middleware domain.ContextMiddlewareFunc) domain.MiddlewareFunc
- func (ctx *Context) Set(r *http.Request, key interface{}, val interface{})
- func (ctx *Context) SetCurrentUserCtx(r *http.Request, user domain.IUser)
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 (*Context) GetCurrentUserCtx ¶
func (*Context) Inject ¶
func (ctx *Context) Inject(handler domain.ContextHandlerFunc) http.HandlerFunc
func (*Context) InjectMiddleware ¶
func (ctx *Context) InjectMiddleware(middleware domain.ContextMiddlewareFunc) domain.MiddlewareFunc
Click to show internal directories.
Click to hide internal directories.