Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DetContext ¶
type DetContext struct {
echo.Context
}
DetContext is a wrapper around echo.Context so that some convenience functions that depend on context can be made accessible to handlers.
func (*DetContext) GetUsername ¶
func (c *DetContext) GetUsername() string
GetUsername returns the username for the relevant echo request context, or unknown.
func (*DetContext) MustGetUser ¶
func (c *DetContext) MustGetUser() model.User
MustGetUser returns the user for the relevant echo request context. Panics if the user has not been set, so this method should only be used inside handlers that _require_ authentication.
func (*DetContext) MustGetUserSession ¶
func (c *DetContext) MustGetUserSession() model.UserSession
MustGetUserSession returns the user session for the relevant echo request context. Panics if the user has not been set, so this method should only be used inside handlers that _require_ authentication.
func (*DetContext) SetUser ¶
func (c *DetContext) SetUser(user model.User)
SetUser sets the user for an echo request context.
func (*DetContext) SetUserSession ¶
func (c *DetContext) SetUserSession(session model.UserSession)
SetUserSession sets session information for an echo request context.