Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Address string // mongo address, like: mongodb://127.0.0.1:27017
Username string // username
Password string
Database string
AuthSource string // default is admin
Timeout time.Duration // default is 30 seconds
}
Config represents the configuration of a MongoDB connection
type Instance ¶
func (*Instance) Collection ¶
func (m *Instance) Collection(name string, opts ...*options.CollectionOptions) *mongo.Collection
Collection use current database for the provide collection
Click to show internal directories.
Click to hide internal directories.