package
0.0.0-20241014210555-56102b3a10bd
Repository: https://github.com/enzo-gbd/gba.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
AbortWithError sends a JSON response with a failure status and a custom message.
GenerateToken creates a new JWT token with a specified time-to-live (ttl), payload, and private RSA key.
GetDatabaseInContext retrieves the database instance from the given Gin context.
HashPassword takes a plain text password and returns a bcrypt hashed version of it.
HttpTestRequest helps in creating and sending an HTTP request using a gin.Engine router for testing purposes.
PasswordRequirements checks if the given password meets specific security requirements.
SendSuccess sends a JSON response containing the provided data.
StructToIOReader takes any interface{} value, marshals it into JSON, and returns an io.Reader for the JSON data.
ValidateToken verifies the authenticity of a JWT token using the provided public RSA key.
VerifyPassword compares a bcrypt hashed password with a candidate password.