Documentation ¶
Index ¶
Constants ¶
View Source
const ( CtxMongoKey = util.CtxKey("ctxMongoKey") HeaderDBKey = "raccMongoDB" )
View Source
const ( CoreDB = "core" UserDB = "user" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoConf ¶
type MongoConf struct { Uri string `yaml:"uri"` User string `yaml:"user"` Pass string `yaml:"pass"` DefaultDB string `yaml:"defaul"` // contains filtered or unexported fields }
func (MongoConf) NewMongoDBClient ¶
type MongoDBClient ¶
type MongoDBClient interface { GetCoreDB() *mongo.Database GetUserDB() *mongo.Database WithSession(f func(sc mongo.SessionContext) error) error AbortTransaction(sc mongo.SessionContext) error CommitTransaction(sc mongo.SessionContext) error Close() }
func GetCtxMgoDBClient ¶
func GetCtxMgoDBClient(req *http.Request) MongoDBClient
Click to show internal directories.
Click to hide internal directories.