Documentation
¶
Index ¶
- func CreateToken(user *models.User, ExpiresAt int64) (string, error)
- func ExtractClaims(token string) (*models.Claims, error)
- func SendLoginResponse(c *gin.Context, code int, response *models.LoginResponsePayload)
- func SendMail(user *models.User, formMail interface{}, pathTotemplate string)
- func SendRegisterResponse(c *gin.Context, code int, response *models.RegisterResponsePayload)
- func SendResponse(c *gin.Context, code int, response *models.ResponsePayload)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToken ¶
CreateToken create a jwt token depending to the user's id
func ExtractClaims ¶
ExtractClaims from the header and return it
func SendLoginResponse ¶
func SendLoginResponse(c *gin.Context, code int, response *models.LoginResponsePayload)
SendLoginResponse is used to respond to the client
func SendRegisterResponse ¶
func SendRegisterResponse(c *gin.Context, code int, response *models.RegisterResponsePayload)
SendRegisterResponse is used to respond to the client
func SendResponse ¶
func SendResponse(c *gin.Context, code int, response *models.ResponsePayload)
SendResponse is used to respond to the client
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.