Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDB ¶
type MongoDB interface {
Session() *mgo.Session
Create(model interface{})
CreateMany(models interface{})
FindAll(models interface{})
FindMany(bson bson.M, models interface{})
Find(bson bson.M, model interface{})
Close()
}
func NewMongoDB ¶
type MongoModule ¶
mongo
func NewMongoModule ¶
func NewMongoModule(dbs map[string]MongoDB) MongoModule
type MySqlDB ¶
type MySqlDB interface {
OrmDB() *gorm.DB
TableName(tbName string) string
AutoMigrate(model interface{})
Create(model interface{}) bool
Find(model interface{}) bool
FindAll(models interface{}) bool
FindMany(models interface{}, limit int, orderBy string, whereAndArgs ...interface{}) bool
Begin() *gorm.DB
Rollback()
Commit()
Close()
}
func NewMysqlDB ¶
type MySqlModule ¶
mysql
func NewMysqlModule ¶
func NewMysqlModule(dbs map[string]MySqlDB) MySqlModule
type RPCModule ¶
type RPCModule interface {
Module
Call(appName, method string, args interface{}, reply interface{}) error
}
rpc
type ServiceModule ¶
service
func NewServiceModule ¶
func NewServiceModule(servers Services) ServiceModule
Click to show internal directories.
Click to hide internal directories.