Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrate ¶
Types ¶
type FailedLoginAttemp ¶
type Repository ¶
type Repository interface { CreateUser(user *User) error GetUser(user *User) (*User, error) Save(obj interface{}) CreateFailedLoginAttempt(attempt *FailedLoginAttemp) error GetFailedLoginAttempts(ipAddress string) ([]*FailedLoginAttemp, error) }
type Service ¶
type Service interface { Register(username, password string) (*User, error) Login(username, password, ipAddress string) (*User, error) GetUserByID(id string) (*User, error) GenerateOTP(user *User) (string, string, error) ValidateOTP(code string, user *User) error }
func NewService ¶
func NewService(r Repository) Service
Click to show internal directories.
Click to hide internal directories.