Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearBackgroundContext ¶ added in v1.0.2
func ClearBackgroundContext(context BackgroundContext)
Clear Background Context
Types ¶
type BackgroundContext ¶
type BackgroundContext interface {
Set(name string, value interface{})
Get(name string) interface{}
Persist(name string, fn func() (interface{}, error)) interface{}
}
Background Context
func NewBackgroundContext ¶
func NewBackgroundContext() BackgroundContext
type Context ¶
type Context interface {
Title() string
SetTitle(title string)
Data(name string) interface{}
SetData(name string, value interface{})
PersistData(name string, fn func() interface{}) interface{}
Dep(name string) interface{}
SetDep(name string, value interface{})
PersistDep(name string, fn func() interface{}) interface{}
Request() *http.Request
ResponseWriter() http.ResponseWriter
}
For storing anything related to user request
func GetContext ¶
func NewContext ¶
Click to show internal directories.
Click to hide internal directories.