Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ORM orm.Ormer
ORM - Global ORM object for the handler package
Functions ¶
func LoginHandler ¶
LoginHandler - Handler function for the login route
func RegistrationHandler ¶
RegistrationHandler - Encrypts the new users password and stores user details in the DB
func TokenValidator ¶
func TokenValidator() gin.HandlerFunc
TokenValidator - gin middleware function to validate the jwt tokens in the incoming requests
Types ¶
type LoginRequest ¶
LoginRequest - Login JSON request format
type RegistrationRequest ¶
type RegistrationRequest struct { Email string `json:"email"` Password string `json:"password"` UserName string `json:"user_name"` }
RegistrationRequest - Registration request parameter format
Click to show internal directories.
Click to hide internal directories.