Documentation ¶
Index ¶
- func Connect()
- func Delete(db *DB, collectionName string, id string) (*mongo.DeleteResult, error)
- func Find[Type any](db *DB, collectionName string, filter interface{}, ...) ([]*Type, error)
- func FindOne[Type any](db *DB, collectionName string, filter interface{}, ...) (*Type, error)
- func Save[Type Saveable](db *DB, collectionName string, obj Type) (*mongo.UpdateResult, error)
- type Bsonable
- type DB
- type Saveable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) Collection ¶
func (db *DB) Collection(collectionName string) *mongo.Collection
Click to show internal directories.
Click to hide internal directories.