Documentation
¶
Index ¶
- func Context(h echo.HandlerFunc) echo.HandlerFunc
- type AppContext
- func (c *AppContext) GetCookieStore() *sessions.CookieStore
- func (c *AppContext) GetWantedContentType() string
- func (c *AppContext) LogError(v ...interface{})
- func (c *AppContext) LogErrorf(format string, v ...interface{})
- func (c *AppContext) LogInfo(v ...interface{})
- func (c *AppContext) LogInfof(format string, v ...interface{})
- func (c *AppContext) SessionExpire() error
- func (c *AppContext) SessionGet(key string) (interface{}, error)
- func (c *AppContext) SessionSet(key string, value interface{}) error
- func (c *AppContext) SetCookieStore(cs *sessions.CookieStore)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppContext ¶
type AppContext struct { echo.Context CookieStore *sessions.CookieStore UUID string }
AppContext extends echo.Context add session management via encrypted cookie
func NewMockedContext ¶
func NewMockedContext(c echo.Context) *AppContext
func (*AppContext) GetCookieStore ¶
func (c *AppContext) GetCookieStore() *sessions.CookieStore
GetCookieStore CookieStore getter
func (*AppContext) GetWantedContentType ¶
func (c *AppContext) GetWantedContentType() string
GetWantedContentType returns wanted content type Warning file extension >> header accept (yes i know...) Warning supported CT html, json, atom
func (*AppContext) LogError ¶
func (c *AppContext) LogError(v ...interface{})
LogError is the error level logger
func (*AppContext) LogErrorf ¶
func (c *AppContext) LogErrorf(format string, v ...interface{})
LogErrorf is the info level logger
func (*AppContext) LogInfo ¶
func (c *AppContext) LogInfo(v ...interface{})
LogInfo is the info level logger
func (*AppContext) LogInfof ¶
func (c *AppContext) LogInfof(format string, v ...interface{})
LogInfof is the info level logger
func (*AppContext) SessionExpire ¶
func (c *AppContext) SessionExpire() error
SessionExpire expire the current session
func (*AppContext) SessionGet ¶
func (c *AppContext) SessionGet(key string) (interface{}, error)
SessionGet get data from session
func (*AppContext) SessionSet ¶
func (c *AppContext) SessionSet(key string, value interface{}) error
SessionSet set data in session
func (*AppContext) SetCookieStore ¶
func (c *AppContext) SetCookieStore(cs *sessions.CookieStore)
SetCookieStore CookieStore setter
Click to show internal directories.
Click to hide internal directories.