Documentation ¶
Index ¶
- func New(conf map[string]string) (drivers.DataStore, error)
- type Mongo
- func (m *Mongo) Close() error
- func (m *Mongo) Connect() error
- func (m *Mongo) CreateUser(ctx context.Context, user *entity.User) (int, error)
- func (m *Mongo) GetUserByEmail(ctx context.Context, email string) (*entity.User, error)
- func (m *Mongo) GetUserByID(ctx context.Context, id int) (user *entity.User, err error)
- func (m *Mongo) GetUsers(ctx context.Context) ([]*entity.User, error)
- func (m *Mongo) Name() string
- func (m *Mongo) Ping() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mongo ¶
type Mongo struct { MongoURL string DB *mongo.Database Context context.Context // contains filtered or unexported fields }
func (*Mongo) CreateUser ¶
func (*Mongo) GetUserByEmail ¶
func (*Mongo) GetUserByID ¶
Click to show internal directories.
Click to hide internal directories.