Documentation ¶
Index ¶
- func DefaultHTTPErrorHandler(err error, c echo.Context)
- func DeleteCookie(c echo.Context, name string)
- func SessionMiddleware() echo.MiddlewareFunc
- func SessionTokenAuth(next echo.HandlerFunc) echo.HandlerFunc
- func SetSystem(s *sys.System)
- func Setup(serverVersion string) *echo.Echo
- func StartServer(e *echo.Echo, addr string, autoTLS bool)
- type Context
- func (me *Context) BasicAuth() (string, string)
- func (me *Context) EndSession()
- func (me *Context) I18n() *WebI18n
- func (me *Context) Lang() string
- func (me *Context) Session(create bool) *sys.Session
- func (me *Context) SessionToken() string
- func (me *Context) SessionWithUser(usr *model.User) *sys.Session
- func (me *Context) System() *sys.System
- type Embedded
- type EmbeddedTemplateLoader
- type HttpAceptLanguage
- type InitialHandler
- type Security
- type Translator
- type WebI18n
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultHTTPErrorHandler ¶
func DefaultHTTPErrorHandler(err error, c echo.Context)
DefaultHTTPErrorHandler is the default HTTP error handler
func DeleteCookie ¶
func DeleteCookie(c echo.Context, name string)
func SessionMiddleware ¶
func SessionMiddleware() echo.MiddlewareFunc
func SessionTokenAuth ¶
func SessionTokenAuth(next echo.HandlerFunc) echo.HandlerFunc
SessionAuthToken create a request session if a valid API Key is found
func StartServer ¶
Types ¶
type Context ¶
type Context struct { echo.Context // contains filtered or unexported fields }
func (*Context) EndSession ¶
func (me *Context) EndSession()
func (*Context) SessionToken ¶
Extract the session token from the header
type EmbeddedTemplateLoader ¶
type EmbeddedTemplateLoader struct {
Embedded *Embedded
}
func (*EmbeddedTemplateLoader) Abs ¶
func (htl *EmbeddedTemplateLoader) Abs(base, name string) (absPath string)
Abs calculates the path to a given template. Whenever a path must be resolved due to an import from another template, the base equals the parent template's path.
type HttpAceptLanguage ¶
func ParseAcceptLanguageHeader ¶
func ParseAcceptLanguageHeader(headerValue string) []*HttpAceptLanguage
ParseAcceptLanguageHeader reads the weighted header values like de-CH,de;q=0.9,en;q=0.8,en-US;q=0.7 into [{Lang:de-CH, Weight:1} {Lang:de Weight:0.9} {Lang:en Weight:0.8} {Lang:en-US Weight:0.7}]
type InitialHandler ¶
type InitialHandler struct {
// contains filtered or unexported fields
}
func NewInitialHandler ¶
func NewInitialHandler(configured bool) *InitialHandler
func (*InitialHandler) Handler ¶
func (me *InitialHandler) Handler(next echo.HandlerFunc) echo.HandlerFunc
type Translator ¶
type Translator interface {
T(b ...interface{}) string
}
Click to show internal directories.
Click to hide internal directories.