You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-library/utils/dorm/yiigo_mongodb.go

19 lines
280 B

package dorm
import (
"github.com/shenghui0779/yiigo"
)
func NewYiiGoMongoDbClient(config *ConfigYiiGoClient) (*YiiGoClient, error) {
c := &YiiGoClient{config: config}
yiigo.Init(
yiigo.WithMongo(yiigo.Default, c.config.Dns),
)
c.MDb = yiigo.Mongo()
return c, nil
}