Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTokenInvalid is returned if token is invalid or expired. ErrTokenInvalid = errors.New("token invalid or expired") // ErrAccountAlreadyExist is returned if an email already exists in the db. ErrAccountAlreadyExist = errors.New("the account already exist") // ErrInvalidCredentials is returned if an email and password don't match a db entry. ErrInvalidCredentials = errors.New("invalid credentials") // ErrWrongPassword is returned if the provided password doesn't match. ErrWrongPassword = errors.New("wrong password") )
Functions ¶
This section is empty.
Types ¶
type Controller ¶
Controller handles User routines.
func NewController ¶
func NewController(db *gorm.DB) *Controller
NewController instantiate a new Controller that handles user routines.
func (Controller) ProfileEdit ¶
func (controller Controller) ProfileEdit(w http.ResponseWriter, r *http.Request, vars map[string]string) error
ProfileEdit modify the information of the user
func (Controller) ProfileView ¶
func (controller Controller) ProfileView(w http.ResponseWriter, r *http.Request, vars map[string]string) error
ProfileView return the information of the user
Click to show internal directories.
Click to hide internal directories.