Documentation ¶
Index ¶
- type MongoClient
- func (mc *MongoClient) CountDocuments(db, coll string) (int64, error)
- func (mc *MongoClient) ListCollectionNames(databaseName string) ([]string, error)
- func (mc *MongoClient) ListDatabaseNames() ([]string, error)
- func (mc *MongoClient) ListDocuments(databaseName, collectionName string) ([]bson.M, []error)
- func (mc *MongoClient) Ping() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoClient ¶
type MongoClient struct { Cancel func() // contains filtered or unexported fields }
MongoClient is exported.
func (*MongoClient) CountDocuments ¶
func (mc *MongoClient) CountDocuments(db, coll string) (int64, error)
CountDocuments return number of documents in the collection.
func (*MongoClient) ListCollectionNames ¶
func (mc *MongoClient) ListCollectionNames(databaseName string) ([]string, error)
ListCollectionNames returns collection names in a given database.
func (*MongoClient) ListDatabaseNames ¶
func (mc *MongoClient) ListDatabaseNames() ([]string, error)
ListDatabaseNames returns all database names.
func (*MongoClient) ListDocuments ¶
func (mc *MongoClient) ListDocuments(databaseName, collectionName string) ([]bson.M, []error)
ListDocuments return list of decoded documents and errors during the process.
Click to show internal directories.
Click to hide internal directories.