Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationController ¶
type AuthenticationController struct {
// contains filtered or unexported fields
}
func NewAuthentication ¶
func NewAuthentication(db interfaces.DBRepository, pwd *PasswordService) *AuthenticationController
func (*AuthenticationController) Signin ¶
func (a *AuthenticationController) Signin(ctx *gin.Context)
func (*AuthenticationController) Signup ¶
func (a *AuthenticationController) Signup(ctx *gin.Context)
type PasswordService ¶
type PasswordService struct {
// contains filtered or unexported fields
}
func NewPasswordService ¶
func NewPasswordService(time, saltLen uint32, memory uint32, threads uint8, keyLen uint32) *PasswordService
func (*PasswordService) Compare ¶
func (p *PasswordService) Compare(hash, salt, password string) error
Compare generated hash with store hash.
func (*PasswordService) GenerateHash ¶
func (p *PasswordService) GenerateHash(password string, salt string) (*HashSalt, error)
GenerateHash using the password and provided salt. If not salt value provided fallback to random value generated of a given length.
type RestService ¶
type RestService struct {
// contains filtered or unexported fields
}
func NewRoute ¶
func NewRoute(dbRepo interfaces.DBRepository) *RestService
func (*RestService) RegisterHandlers ¶
func (r *RestService) RegisterHandlers(e *gin.Engine)
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
func NewUserController ¶
func NewUserController(db interfaces.DBRepository) *UserController
func (*UserController) GetAll ¶
func (c *UserController) GetAll(ctx *gin.Context)
Click to show internal directories.
Click to hide internal directories.