Documentation ¶
Index ¶
- func ComparePasswords(hashedPassword string, password string) error
- func GenerateToken(userId uint, email string, secretKey string) (string, error)
- func HandleGenericResponse(w http.ResponseWriter, message string, statusCode int)
- func HashPassword(password string) (string, error)
- func ValidateToken(tokenString string, secretKey string) (jwt.MapClaims, error)
- type GenericResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePasswords ¶
func GenerateToken ¶
func HandleGenericResponse ¶
func HandleGenericResponse(w http.ResponseWriter, message string, statusCode int)
func HashPassword ¶
func ValidateToken ¶
Types ¶
type GenericResponse ¶
type GenericResponse struct { Status int `json:"status"` Message string `json:"message"` Payload interface{} `json:"payload"` }
func NewGenericResponse ¶
func NewGenericResponse(status int, message string, payload interface{}) *GenericResponse
Click to show internal directories.
Click to hide internal directories.