Documentation ¶
Index ¶
- type UserRepository
- func (ur *UserRepository) Create(ctx context.Context, user *models.User) (*models.User, error)
- func (ur *UserRepository) Delete(ctx context.Context, id primitive.ObjectID) error
- func (ur *UserRepository) GetByID(ctx context.Context, id primitive.ObjectID) (*models.User, error)
- func (ur *UserRepository) Update(ctx context.Context, id primitive.ObjectID, user *models.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserRepository ¶
type UserRepository struct {
Collection *mongo.Collection
}
func NewUserRepository ¶
func NewUserRepository(db *mongo.Database) *UserRepository
Click to show internal directories.
Click to hide internal directories.