Documentation ¶
Index ¶
- Variables
- func ComparePasswords(hashedPwd string, plainPwd []byte) bool
- func CreateToken(username string) (string, error)
- func HashAndSalt(pwd []byte) string
- func RespondError(w http.ResponseWriter, code int, message string)
- func RespondJSON(w http.ResponseWriter, status int, payload interface{})
- func SetDatabase()
- func ValidateToken(tokenString string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
func ComparePasswords ¶
func CreateToken ¶
func HashAndSalt ¶
func RespondError ¶
func RespondError(w http.ResponseWriter, code int, message string)
func RespondJSON ¶
func RespondJSON(w http.ResponseWriter, status int, payload interface{})
func SetDatabase ¶
func SetDatabase()
func ValidateToken ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.