Documentation ¶
Index ¶
- func GetContext() (ctx context.Context)
- func Use(client *mongo.Client, dbname, collname string) *mongo.Collection
- type MongoDBClient
- func (odb *MongoDBClient) WebLogin(data request.WebLoginData) (request.WebLoginResponseData, error)
- func (odb *MongoDBClient) WebRegister(user request.WebRegisterData) (request.WebUser, error)
- func (odb *MongoDBClient) WxLogin(id string) (request.WxUser, error)
- func (odb *MongoDBClient) WxRegister(user request.WxUser) (request.WxUser, error)
- type ODBLayer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MongoDBClient ¶
使用mongoDB官方库进行数据库操作
func (*MongoDBClient) WebLogin ¶
func (odb *MongoDBClient) WebLogin(data request.WebLoginData) (request.WebLoginResponseData, error)
func (*MongoDBClient) WebRegister ¶
func (odb *MongoDBClient) WebRegister(user request.WebRegisterData) (request.WebUser, error)
func (*MongoDBClient) WxLogin ¶
func (odb *MongoDBClient) WxLogin(id string) (request.WxUser, error)
func (*MongoDBClient) WxRegister ¶
实现数据库操作
Click to show internal directories.
Click to hide internal directories.