Documentation ¶
Overview ¶
User implements a group that handle /user requests.
Index ¶
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.
func Me ¶
Me returns the "me" user context.
type ChangePasswordForm ¶
type ChangePasswordForm struct { CurrentPassword string `form:"current_password"` NewPassword string `form:"new_password"` }
ChangePasswordForm is the form handling a password change request.
func (*ChangePasswordForm) Bind ¶
func (c *ChangePasswordForm) Bind(u *models.User) error
Bind binds the content of the form into the 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) LoginGet ¶
LoginGet implements GET /user/login.
func (*Group) LoginPost ¶
LoginPost implements POST /user/login.
func (*Group) LogoutPost ¶
LogoutPost implements GET/POST /user/logout.
type HomeCtx ¶
type HomeCtx struct { *AuthCtx ChangePasswordError error ChangePassword ChangePasswordForm }
HomeCtx is the context to render the /user page.
type LoginCtx ¶
LoginCtx represents the context to render logins.
Click to show internal directories.
Click to hide internal directories.