Documentation ¶
Index ¶
- func EmailSend(msg, to string) error
- func EmailVerify(c *fiber.Ctx) error
- func GenerateToken(claims *jwt.StandardClaims) (token string, err error)
- func GoogleCallback(c *fiber.Ctx) error
- func GoogleLogin(c *fiber.Ctx) error
- func NewResetPasswordEmailMessage(to, token string) (msg string)
- func NewVerificationEmailMessage(to, token string) (msg string)
- func ParseJwtToken(c *fiber.Ctx, token string) (*jwt.StandardClaims, error)
- func SetUserCookie(c *fiber.Ctx, user *models.User) error
- func UserCreate(c *fiber.Ctx) error
- func UserDelete(c *fiber.Ctx) error
- func UserGet(c *fiber.Ctx) error
- func UserLogin(c *fiber.Ctx) error
- func UserLogout(c *fiber.Ctx) error
- func UserPasswordReset(c *fiber.Ctx) error
- func UserUpdate(c *fiber.Ctx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmailVerify ¶
func EmailVerify(c *fiber.Ctx) error
func GenerateToken ¶
func GoogleCallback ¶
func GoogleCallback(c *fiber.Ctx) error
func GoogleLogin ¶
func GoogleLogin(c *fiber.Ctx) error
func NewVerificationEmailMessage ¶
return verification email message body with token
func ParseJwtToken ¶
parse jwt token and return standard claims
func SetUserCookie ¶
func UserCreate ¶
func UserCreate(c *fiber.Ctx) error
UserCreate creates a new user account
@Summary Create user @Description Create new user account @Tags User @Accept json @Produce json @Param User body models.UserInfo true "User info" @Success 200 {object} models.User @Failure 400 {object} error @Router /user [post]
func UserDelete ¶
func UserDelete(c *fiber.Ctx) error
UserDelete deletes a user account
@Summary Delete user @Description Delete user account @Tags User @Accept json @Produce json @Success 200 {object} models.User @Failure 400 {object} error @Security ApiKeyAuth @Router /user [delete]
func UserGet ¶
func UserGet(c *fiber.Ctx) error
UserGet get a user account
@Summary Get user @Description Get user account @Tags User @Accept json @Produce json @Param id path int true "User ID" @Success 200 {object} models.User @Failure 400 {object} error @Router /user/{id} [get]
func UserPasswordReset ¶
func UserPasswordReset(c *fiber.Ctx) error
func UserUpdate ¶
func UserUpdate(c *fiber.Ctx) error
UserUpdate updates a user account info
@Summary Update user account info @Description Update user account info @Tags User @Accept json @Produce json @Success 200 {object} models.User @Failure 400 {object} error @Param id path int true "User ID" @Param User body models.UserInfo true "User" @Security ApiKeyAuth @Router /user/{id} [put]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.