Documentation ¶
Overview ¶
User implements a group that handle /user requests.
Index ¶
- type AuthCtx
- type ChangePasswordForm
- type CustomizeForm
- type Group
- func (g *Group) ChangePassword(c echo.Context) error
- func (g *Group) CustomizePost(c echo.Context) error
- func (g *Group) HomeGet(c echo.Context) error
- func (g *Group) LoginGet(c echo.Context) error
- func (g *Group) LoginPost(c echo.Context) error
- func (g *Group) LogoutPost(c echo.Context) error
- func (g *Group) RegisterPost(c echo.Context) error
- type HomeCtx
- type LoginCtx
- type LoginForm
- type RegisterForm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthCtx ¶
AuthCtx is a context that holds the "me" user.
type ChangePasswordForm ¶
type ChangePasswordForm struct { CurrentPassword string `form:"current_password"` NewPassword string `form:"new_password"` }
ChangePasswordForm is the form handling a password change request.
type CustomizeForm ¶
type CustomizeForm struct { DisplayName string `form:"display_name"` Organization string `form:"organization"` }
CustomizeForm is a form for an user to change their name or organization.
func (*CustomizeForm) Bind ¶
func (c *CustomizeForm) Bind(u *models.User)
Bind binds the form to an user.
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group is the /user handling group.
func (*Group) ChangePassword ¶
ChangePassword implements POST /user/change_password.
func (*Group) CustomizePost ¶
CustomizePost implements POST /user/customize.
func (*Group) LogoutPost ¶
LogoutPost implements GET/POST /user/logout.
func (*Group) RegisterPost ¶
RegisterPost implements POST /user/register
type HomeCtx ¶
type HomeCtx struct { *AuthCtx EnableUserCustomization bool CustomizeError error Customize CustomizeForm ChangePasswordError error ChangePassword ChangePasswordForm }
HomeCtx is the context to render the /user page.
type LoginCtx ¶
type LoginCtx struct { AllowRegistration bool Error error RegisterForm }
LoginCtx represents the context to render logins.
type RegisterForm ¶
Click to show internal directories.
Click to hide internal directories.