Documentation ¶
Index ¶
- func GenerateNewAccessToken(userID int, isAdmin bool) (string, error)
- func GeneratePasswordHash(password []byte) (string, error)
- func GetNewAccessToken(c *fiber.Ctx) error
- func GetPagination(c *fiber.Ctx) (pageNo, pageSize int)
- func GetUsers(ctx *fiber.Ctx) error
- func IsValidPassword(hash, password []byte) bool
- type ErrorResponse
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePasswordHash ¶
func GetNewAccessToken ¶
func GetNewAccessToken(c *fiber.Ctx) error
GetNewAccessToken method for create a new access token.
@Description Create a new access token. @Summary create a new access token @Tags Token @Accept json @Produce json @Param login body dto.Auth true "Request for token" @Failure 400,404,401,500 {object} ErrorResponse @Success 200 {object} TokenResponse @Router /v1/login [post]
func GetPagination ¶
func GetPagination(c *fiber.Ctx) (pageNo, pageSize int)
func IsValidPassword ¶
Types ¶
type ErrorResponse ¶
type TokenResponse ¶
Click to show internal directories.
Click to hide internal directories.