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 GenerateToken ¶
func GenerateToken(claims *jwt.StandardClaims) (token string, err error)
func GoogleCallback ¶
func GoogleLogin ¶
func NewVerificationEmailMessage ¶
return verification email message body with token
func ParseJwtToken ¶
parse jwt token and return standard claims
func UserCreate ¶
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 ¶
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 ¶
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 UserUpdate ¶
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.