Documentation ¶
Overview ¶
Package db implements database interactions.
Package db implements database interactions.
Package db implements database interactions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoData = errors.New("no data in collection")
ErrNoData returned when no data found in collection.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { // InsertUsersBatch creates record in database with passed users batch. InsertUsersBatch(ctx context.Context, users models.UsersBatch) error // GetLastUsersBatchByType returns last created users batch by passed batch type. GetLastUsersBatchByType(ctx context.Context, batchType models.UsersBatchType) (models.UsersBatch, error) }
DB represents database interaction contract.
type MongoParams ¶
MongoParams represents mongo db configuration parameters.
type Params ¶
type Params struct { LocalDB bool MongoParams MongoParams }
Params used for DB constructor.
Click to show internal directories.
Click to hide internal directories.