Documentation ¶
Index ¶
- Variables
- type Database
- func (d *Database) CreateUser(ctx context.Context, user users.User) (users.User, error)
- func (d *Database) DeleteUser(ctx context.Context, email string) error
- func (d *Database) GetUser(ctx context.Context, email string) (users.User, error)
- func (d *Database) UpdateUser(ctx context.Context, user users.User) (users.User, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUserNotFound = errors.New("user not found")
)
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct { Client *mongo.Client Collection *mongo.Collection DBConfig *configs.DBConfig }
Database struct describes the database
func NewDatabase ¶
NewDatabase returns a new database
func (*Database) CreateUser ¶
func (*Database) DeleteUser ¶
Click to show internal directories.
Click to hide internal directories.