Documentation ¶
Index ¶
- func AddClientDB(message []byte)
- func BeginClientTx() (tx *gorm.DB)
- func BeginClientTxByID(clientID string) (tx *gorm.DB)
- func BeginClientTxByIDWithAutoCommit(clientID string) (tx *gorm.DB)
- func BeginCommonTx() (tx *gorm.DB)
- func DisposeClientTx(err interface{})
- func DisposeCommonTx(err interface{})
- func GetClientDB() (db *gorm.DB)
- func GetClientDBs() (dbs map[string]*gorm.DB)
- func GetClientDbById(clientId string) (db *gorm.DB)
- func GetCommonDB() (db *gorm.DB)
- func HealthCheck() error
- func Init(app *iris.Application)
- func InitCommonDB()
- func InitCustomizedDB()
- func InitTenantDB()
- type GormLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddClientDB ¶
func AddClientDB(message []byte)
func BeginClientTx ¶
BeginClientTx begin a transaction by default client ID
func BeginClientTxByID ¶
BeginClientTxByID must commit it manually
func DisposeClientTx ¶
func DisposeClientTx(err interface{})
DisposeClientTx commit the transaction if err is nil otherwise rollback
func DisposeCommonTx ¶
func DisposeCommonTx(err interface{})
DisposeCommonTx commit the transaction if err is nil otherwise rollback
func GetClientDBs ¶
GetClientDBs return all Client DB list
func GetClientDbById ¶
GetClientDbById returns client DB by Client_ID
func GetCommonDB ¶
func HealthCheck ¶
func HealthCheck() error
func InitCommonDB ¶
func InitCommonDB()
func InitCustomizedDB ¶
func InitCustomizedDB()
func InitTenantDB ¶
func InitTenantDB()
Types ¶
type GormLogger ¶
type GormLogger struct{}
func NewGormLogger ¶
func NewGormLogger() *GormLogger
func (*GormLogger) Printf ¶
func (*GormLogger) Printf(format string, v ...interface{})
Click to show internal directories.
Click to hide internal directories.