1
This commit is contained in:
parent
8f9d63dec2
commit
56da2d7533
14
server/backtask/mt/MailDb.go
Normal file
14
server/backtask/mt/MailDb.go
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package mt
|
||||||
|
|
||||||
|
import (
|
||||||
|
"f5"
|
||||||
|
"mtb"
|
||||||
|
)
|
||||||
|
|
||||||
|
type MailDb struct {
|
||||||
|
mtb.MailDb
|
||||||
|
}
|
||||||
|
|
||||||
|
type MailDbTable struct {
|
||||||
|
f5.IdMetaTable[MailDb]
|
||||||
|
}
|
@ -7,6 +7,7 @@ import (
|
|||||||
type table struct {
|
type table struct {
|
||||||
BackTaskCluster *BackTaskClusterTable
|
BackTaskCluster *BackTaskClusterTable
|
||||||
GameDb *GameDbTable
|
GameDb *GameDbTable
|
||||||
|
MailDb *MailDbTable
|
||||||
BcEventDb *BcEventDbTable
|
BcEventDb *BcEventDbTable
|
||||||
BcNftDb *BcNftDbTable
|
BcNftDb *BcNftDbTable
|
||||||
Config *ConfigTable
|
Config *ConfigTable
|
||||||
@ -29,6 +30,11 @@ var Table = f5.New(func(this *table) {
|
|||||||
this.PrimKey = ""
|
this.PrimKey = ""
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.MailDb = f5.New(func(this *MailDbTable) {
|
||||||
|
this.FileName = "../config/maildb.mysql.json"
|
||||||
|
this.PrimKey = ""
|
||||||
|
})
|
||||||
|
|
||||||
this.BcEventDb = f5.New(func(this *BcEventDbTable) {
|
this.BcEventDb = f5.New(func(this *BcEventDbTable) {
|
||||||
this.FileName = "../config/bceventdb.mysql.json"
|
this.FileName = "../config/bceventdb.mysql.json"
|
||||||
this.PrimKey = ""
|
this.PrimKey = ""
|
||||||
|
@ -24,6 +24,17 @@ type GameDb struct {
|
|||||||
_flags2_ uint64
|
_flags2_ uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type MailDb struct {
|
||||||
|
host string
|
||||||
|
port int32
|
||||||
|
user string
|
||||||
|
passwd string
|
||||||
|
database string
|
||||||
|
|
||||||
|
_flags1_ uint64
|
||||||
|
_flags2_ uint64
|
||||||
|
}
|
||||||
|
|
||||||
type BcNftDb struct {
|
type BcNftDb struct {
|
||||||
host string
|
host string
|
||||||
port int32
|
port int32
|
||||||
@ -158,6 +169,46 @@ func (this *GameDb) HasDatabase() bool {
|
|||||||
return (this._flags1_ & (uint64(1) << 5)) > 0
|
return (this._flags1_ & (uint64(1) << 5)) > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *MailDb) GetHost() string {
|
||||||
|
return this.host
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MailDb) HasHost() bool {
|
||||||
|
return (this._flags1_ & (uint64(1) << 1)) > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MailDb) GetPort() int32 {
|
||||||
|
return this.port
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MailDb) HasPort() bool {
|
||||||
|
return (this._flags1_ & (uint64(1) << 2)) > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MailDb) GetUser() string {
|
||||||
|
return this.user
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MailDb) HasUser() bool {
|
||||||
|
return (this._flags1_ & (uint64(1) << 3)) > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MailDb) GetPasswd() string {
|
||||||
|
return this.passwd
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MailDb) HasPasswd() bool {
|
||||||
|
return (this._flags1_ & (uint64(1) << 4)) > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MailDb) GetDatabase() string {
|
||||||
|
return this.database
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MailDb) HasDatabase() bool {
|
||||||
|
return (this._flags1_ & (uint64(1) << 5)) > 0
|
||||||
|
}
|
||||||
|
|
||||||
func (this *BcNftDb) GetHost() string {
|
func (this *BcNftDb) GetHost() string {
|
||||||
return this.host
|
return this.host
|
||||||
}
|
}
|
||||||
@ -397,6 +448,14 @@ func (this *GameDb) LoadFromKv(kv map[string]interface{}) {
|
|||||||
f5.ReadMetaTableField(&this.database, "database", &this._flags1_, 5, kv)
|
f5.ReadMetaTableField(&this.database, "database", &this._flags1_, 5, kv)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *MailDb) LoadFromKv(kv map[string]interface{}) {
|
||||||
|
f5.ReadMetaTableField(&this.host, "host", &this._flags1_, 1, kv)
|
||||||
|
f5.ReadMetaTableField(&this.port, "port", &this._flags1_, 2, kv)
|
||||||
|
f5.ReadMetaTableField(&this.user, "user", &this._flags1_, 3, kv)
|
||||||
|
f5.ReadMetaTableField(&this.passwd, "passwd", &this._flags1_, 4, kv)
|
||||||
|
f5.ReadMetaTableField(&this.database, "database", &this._flags1_, 5, kv)
|
||||||
|
}
|
||||||
|
|
||||||
func (this *BcNftDb) LoadFromKv(kv map[string]interface{}) {
|
func (this *BcNftDb) LoadFromKv(kv map[string]interface{}) {
|
||||||
f5.ReadMetaTableField(&this.host, "host", &this._flags1_, 1, kv)
|
f5.ReadMetaTableField(&this.host, "host", &this._flags1_, 1, kv)
|
||||||
f5.ReadMetaTableField(&this.port, "port", &this._flags1_, 2, kv)
|
f5.ReadMetaTableField(&this.port, "port", &this._flags1_, 2, kv)
|
||||||
|
@ -18,6 +18,15 @@ message GameDb
|
|||||||
optional string database = 5;
|
optional string database = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message MailDb
|
||||||
|
{
|
||||||
|
optional string host = 1;
|
||||||
|
optional int32 port = 2;
|
||||||
|
optional string user = 3;
|
||||||
|
optional string passwd = 4;
|
||||||
|
optional string database = 5;
|
||||||
|
}
|
||||||
|
|
||||||
message BcNftDb
|
message BcNftDb
|
||||||
{
|
{
|
||||||
optional string host = 1;
|
optional string host = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user