mongo

package
v0.0.0-...-258f086 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

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 New

func New(dbName string, opt *options.ClientOptions) *Mongo

func (*Mongo) CloseConnection

func (m *Mongo) CloseConnection() error

func (*Mongo) CollectionList

func (m *Mongo) CollectionList(filter bson.M) []string

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) Drop

func (m *Mongo) Drop(collection 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL