Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Repository ¶
type Repository interface { // Create creates a new user. Create(user models.User) (models.User, error) // GetByEmail gets a user by email. GetByEmail(email string) (models.User, error) // GetByUsername gets a user by username. GetByUsername(username string) (models.User, error) // GetByID gets a user by ID. GetByID(id string) (models.User, error) }
func NewRepository ¶
func NewRepository(collection *mongo.Collection) Repository
NewRepository creates a new user repository.
Click to show internal directories.
Click to hide internal directories.