Documentation ¶
Index ¶
- Constants
- func CheckPasswordHash(password, hash string) bool
- func GenerateHashPassword(password string) (string, error)
- func GenerateJWT(secret string, userId int64) (string, error)
- func GenerateNodeID() int64
- func GeneratedID() int64
- func LogMiddleware(logger logrus.FieldLogger) gin.HandlerFunc
- func ValidateJWT(token, secret string) (string, error)
- type Logger
- type LoggerInterface
Constants ¶
View Source
const ( ErrorAuthHeaderNotFound = "X-Authorization not found in headers" ErrorInvalidToken = "invalid token" ErrorDatabaseConn = "ERROR DATABASE -> Connection:" ErrorDatabaseMigrate = "ERROR DATABASE MIGRATE -> Migrations:" ErrorNonImplemented = "non implemented error" )
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func GenerateHashPassword ¶
func GenerateNodeID ¶
func GenerateNodeID() int64
func GeneratedID ¶
func GeneratedID() int64
func LogMiddleware ¶
func LogMiddleware(logger logrus.FieldLogger) gin.HandlerFunc
Logger is the logrus logger handler
func ValidateJWT ¶
Types ¶
type LoggerInterface ¶
type LoggerInterface interface { Debug(i ...interface{}) Info(i ...interface{}) Error(i ...interface{}) }
Click to show internal directories.
Click to hide internal directories.