Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MWContext ¶
func MWContext() echo.MiddlewareFunc
MWContext is a middleware that injects custom context into echo.Context
Types ¶
type Context ¶
type Context interface {
GetContext() context.Context
AuthUser() *types.AuthUser
RealIP() string
UserAgent() string
}
Context is a custom context interface
type HTTPContext ¶
HTTPContext is a custom context
func (*HTTPContext) AuthUser ¶
func (h *HTTPContext) AuthUser() *types.AuthUser
AuthUser returns authenticated user info
func (*HTTPContext) GetContext ¶
func (h *HTTPContext) GetContext() context.Context
GetContext returns context
func (*HTTPContext) SetAuthUser ¶
func (h *HTTPContext) SetAuthUser()
SetAuthUser sets authenticated user info
func (*HTTPContext) UserAgent ¶
func (h *HTTPContext) UserAgent() string
UserAgent returns user agent
Click to show internal directories.
Click to hide internal directories.