Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Conn string `json:"conn" mapstructure:"conn"`
CtxTimeout int64 `mapstructure:"ctxTimeout"`
Database string `mapstructure:"database"`
SetLocalThreshold int `mapstructure:"setLocalThreshold"`
SetMaxConnIdleTime int `mapstructure:"setMaxConnIdleTime"`
SetMaxPoolSize uint64 `mapstructure:"setMaxPoolSize"`
}
type Mongo ¶
type Mongo struct {
Config Config
Client *mongo.Client
Database *mongo.Database
IndexOptions *options.CreateIndexesOptions
Collections map[string]*mongo.Collection
}
func (*Mongo) CreateIndex ¶
CreateIndex 创建索引
Click to show internal directories.
Click to hide internal directories.