Documentation ¶
Index ¶
- type Mongo
- func (m *Mongo) CloseConnection() error
- func (m *Mongo) CollectionList(filter bson.M) []string
- func (m *Mongo) CreateCollection(key string, opts ...*options.CreateCollectionOptions) error
- func (m *Mongo) CreateCollectionIndexMany(collection string, indexes []mongo.IndexModel, ...) ([]string, error)
- func (m *Mongo) CreateCollectionIndexOne(collection string, index mongo.IndexModel, ...) (string, error)
- func (m *Mongo) Drop(collection string) error
- func (m *Mongo) InsertMany(collection string, data []interface{}) (*mongo.InsertManyResult, error)
- func (m *Mongo) InsertOne(collection string, data interface{}) (*mongo.InsertOneResult, error)
- func (m *Mongo) SelectMany(collection string, filter interface{}, result *[]interface{}, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mongo ¶
type Mongo struct {
// contains filtered or unexported fields
}
func (*Mongo) CloseConnection ¶
func (*Mongo) CreateCollection ¶
func (m *Mongo) CreateCollection(key string, opts ...*options.CreateCollectionOptions) error
func (*Mongo) CreateCollectionIndexMany ¶
func (m *Mongo) CreateCollectionIndexMany(collection string, indexes []mongo.IndexModel, opts ...*options.CreateIndexesOptions) ([]string, error)
func (*Mongo) CreateCollectionIndexOne ¶
func (m *Mongo) CreateCollectionIndexOne(collection string, index mongo.IndexModel, opts ...*options.CreateIndexesOptions) (string, error)
func (*Mongo) InsertMany ¶
func (m *Mongo) InsertMany(collection string, data []interface{}) (*mongo.InsertManyResult, error)
func (*Mongo) InsertOne ¶
func (m *Mongo) InsertOne(collection string, data interface{}) (*mongo.InsertOneResult, error)
func (*Mongo) SelectMany ¶
func (m *Mongo) SelectMany(collection string, filter interface{}, result *[]interface{}, opts ...*options.FindOptions) error
Click to show internal directories.
Click to hide internal directories.