context

package
v0.0.0-...-a633465 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2018 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(h echo.HandlerFunc) echo.HandlerFunc

Context app context

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

Jump to

Keyboard shortcuts

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