Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKeyConflict = errors.New("Key Conflict") ErrDataNotFound = errors.New("Record Not Found") ErrUserExists = errors.New("User already exists") ErrWrongPassword = errors.New("Wrong password") )
Repository errors
Functions ¶
This section is empty.
Types ¶
type Repository ¶
Repository the repository structure
func (*Repository) CreateRepository ¶
func (r *Repository) CreateRepository(db *gorm.DB)
CreateRepository create the repository
type UserRepository ¶
type UserRepository struct {
Repository
}
UserRepository the user repository
func (*UserRepository) Create ¶
func (r *UserRepository) Create(user *models.User) error
Create the user
func (*UserRepository) GetFirstByEmail ¶
func (r *UserRepository) GetFirstByEmail(email string) (*models.User, error)
GetFirstByEmail gets the user by his email
Click to show internal directories.
Click to hide internal directories.