Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles account endpoints.
func NewHandler ¶
NewHandler returns a new account handler.
func (*Handler) ChangeEmail ¶
func (h *Handler) ChangeEmail() http.HandlerFunc
ChangeEmail changes the user email to the specified one.
func (*Handler) ChangePassword ¶
func (h *Handler) ChangePassword() http.HandlerFunc
ChangePassword updates the user password.
func (*Handler) SendChangeConfirmation ¶
func (h *Handler) SendChangeConfirmation() http.HandlerFunc
SendChangeConfirmation takes the new email and sends an email confirmation.
func (*Handler) SendEmailValidation ¶
func (h *Handler) SendEmailValidation(u user.Service) http.HandlerFunc
SendEmailValidation saves the user email into the validated list. Once in the validated list, the user is able to log in.
type Service ¶
type Service interface { ChangeEmail(ctx context.Context, id, newEmail, token string) error ChangePassword(ctx context.Context, id, oldPass, newPass string) error ValidateUserEmail(ctx context.Context, id, confirmationCode string, verified bool) error }
Service provides user account operations.
Click to show internal directories.
Click to hide internal directories.