Documentation ¶
Index ¶
- Variables
- func IsValidPointer(i interface{}) bool
- type CollectionKey
- type DB
- type Store
- func (d *Store) DeleteMany(ctx context.Context, filter bson.M, hardDelete bool) error
- func (d *Store) FindAll(ctx context.Context, filter bson.M, sort interface{}, ...) error
- func (d *Store) GetDatabase() *mongo.Database
- func (d *Store) UpdateMany(ctx context.Context, filter, payload bson.M, bulk bool) error
- func (d *Store) WithTransaction(ctx context.Context, fn func(sessCtx mongo.SessionContext) error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidCollection = errors.New("Invalid collection type") ErrInvalidPtr = errors.New("out param is not a valid pointer") )
Functions ¶
func IsValidPointer ¶
func IsValidPointer(i interface{}) bool
Types ¶
type DB ¶
type DB interface { GetDatabase() *mongo.Database FindAll(ctx context.Context, filter bson.M, sort interface{}, projection, results interface{}) error UpdateMany(ctx context.Context, filter, payload bson.M, bulk bool) error DeleteMany(ctx context.Context, filter bson.M, hardDelete bool) error WithTransaction(ctx context.Context, fn func(sessCtx mongo.SessionContext) error) error }
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) DeleteMany ¶
func (*Store) GetDatabase ¶
func (*Store) UpdateMany ¶
func (*Store) WithTransaction ¶
Click to show internal directories.
Click to hide internal directories.