Documentation ¶
Index ¶
- func ConnectMongoDB(url string, dbName string) error
- func ConnectMongoDBWithPasswd(url string, dbName string, user string, passwd string, timeout time.Duration) error
- func GetNextSeq(collection string, key string, num int) int
- func QueryWithCollection(collection string, s func(*mgo.Collection) error) error
- func SetNextSeqBaseNum(collection string, key string, base int) int
- type MongoDataInterface
- type MongodbConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectMongoDBWithPasswd ¶
func ConnectMongoDBWithPasswd(url string, dbName string, user string, passwd string, timeout time.Duration) error
ConnectMongoDB 连接MongoDB
func QueryWithCollection ¶
QueryWithCollection 获取collection对象
Types ¶
type MongoDataInterface ¶
MongoDataInterface 存储的MongoData
Click to show internal directories.
Click to hide internal directories.