656 lines
17 KiB
Go
656 lines
17 KiB
Go
package mtb
|
|
|
|
import (
|
|
"f5"
|
|
)
|
|
|
|
type BackTaskCluster struct {
|
|
instance_id int32
|
|
listen_port int32
|
|
http_listen_port int32
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
type GameDb struct {
|
|
host string
|
|
port int32
|
|
user string
|
|
passwd string
|
|
database string
|
|
max_open_conns int32
|
|
max_idle_conns int32
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
type MailDb struct {
|
|
host string
|
|
port int32
|
|
user string
|
|
passwd string
|
|
database string
|
|
max_open_conns int32
|
|
max_idle_conns int32
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
type BcNftDb struct {
|
|
host string
|
|
port int32
|
|
user string
|
|
passwd string
|
|
database string
|
|
max_open_conns int32
|
|
max_idle_conns int32
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
type BcEventDb struct {
|
|
host string
|
|
port int32
|
|
user string
|
|
passwd string
|
|
database string
|
|
max_open_conns int32
|
|
max_idle_conns int32
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
type Config struct {
|
|
gameapi_url string
|
|
net_id int32
|
|
immutable_base_url string
|
|
chain_name string
|
|
hero_contract_address string
|
|
immutable_api_key string
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
type Item struct {
|
|
name string
|
|
id int32
|
|
type_ int32
|
|
sub_type int32
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
type Language struct {
|
|
info string
|
|
en string
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
type BcCurrency struct {
|
|
name string
|
|
contract_address string
|
|
current_price float64
|
|
decimals int32
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
type RankSeason struct {
|
|
id int32
|
|
name string
|
|
start_time string
|
|
end_time string
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
type HashRateCommon struct {
|
|
id int32
|
|
start_time string
|
|
end_time string
|
|
cec_pool int32
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
func (this *BackTaskCluster) GetInstanceId() int32 {
|
|
return this.instance_id
|
|
}
|
|
|
|
func (this *BackTaskCluster) HasInstanceId() bool {
|
|
return (this._flags1_ & (uint64(1) << 1)) > 0
|
|
}
|
|
|
|
func (this *BackTaskCluster) GetListenPort() int32 {
|
|
return this.listen_port
|
|
}
|
|
|
|
func (this *BackTaskCluster) HasListenPort() bool {
|
|
return (this._flags1_ & (uint64(1) << 2)) > 0
|
|
}
|
|
|
|
func (this *BackTaskCluster) GetHttpListenPort() int32 {
|
|
return this.http_listen_port
|
|
}
|
|
|
|
func (this *BackTaskCluster) HasHttpListenPort() bool {
|
|
return (this._flags1_ & (uint64(1) << 3)) > 0
|
|
}
|
|
|
|
func (this *GameDb) GetHost() string {
|
|
return this.host
|
|
}
|
|
|
|
func (this *GameDb) HasHost() bool {
|
|
return (this._flags1_ & (uint64(1) << 1)) > 0
|
|
}
|
|
|
|
func (this *GameDb) GetPort() int32 {
|
|
return this.port
|
|
}
|
|
|
|
func (this *GameDb) HasPort() bool {
|
|
return (this._flags1_ & (uint64(1) << 2)) > 0
|
|
}
|
|
|
|
func (this *GameDb) GetUser() string {
|
|
return this.user
|
|
}
|
|
|
|
func (this *GameDb) HasUser() bool {
|
|
return (this._flags1_ & (uint64(1) << 3)) > 0
|
|
}
|
|
|
|
func (this *GameDb) GetPasswd() string {
|
|
return this.passwd
|
|
}
|
|
|
|
func (this *GameDb) HasPasswd() bool {
|
|
return (this._flags1_ & (uint64(1) << 4)) > 0
|
|
}
|
|
|
|
func (this *GameDb) GetDatabase() string {
|
|
return this.database
|
|
}
|
|
|
|
func (this *GameDb) HasDatabase() bool {
|
|
return (this._flags1_ & (uint64(1) << 5)) > 0
|
|
}
|
|
|
|
func (this *GameDb) GetMaxOpenConns() int32 {
|
|
return this.max_open_conns
|
|
}
|
|
|
|
func (this *GameDb) HasMaxOpenConns() bool {
|
|
return (this._flags1_ & (uint64(1) << 6)) > 0
|
|
}
|
|
|
|
func (this *GameDb) GetMaxIdleConns() int32 {
|
|
return this.max_idle_conns
|
|
}
|
|
|
|
func (this *GameDb) HasMaxIdleConns() bool {
|
|
return (this._flags1_ & (uint64(1) << 7)) > 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 *MailDb) GetMaxOpenConns() int32 {
|
|
return this.max_open_conns
|
|
}
|
|
|
|
func (this *MailDb) HasMaxOpenConns() bool {
|
|
return (this._flags1_ & (uint64(1) << 6)) > 0
|
|
}
|
|
|
|
func (this *MailDb) GetMaxIdleConns() int32 {
|
|
return this.max_idle_conns
|
|
}
|
|
|
|
func (this *MailDb) HasMaxIdleConns() bool {
|
|
return (this._flags1_ & (uint64(1) << 7)) > 0
|
|
}
|
|
|
|
func (this *BcNftDb) GetHost() string {
|
|
return this.host
|
|
}
|
|
|
|
func (this *BcNftDb) HasHost() bool {
|
|
return (this._flags1_ & (uint64(1) << 1)) > 0
|
|
}
|
|
|
|
func (this *BcNftDb) GetPort() int32 {
|
|
return this.port
|
|
}
|
|
|
|
func (this *BcNftDb) HasPort() bool {
|
|
return (this._flags1_ & (uint64(1) << 2)) > 0
|
|
}
|
|
|
|
func (this *BcNftDb) GetUser() string {
|
|
return this.user
|
|
}
|
|
|
|
func (this *BcNftDb) HasUser() bool {
|
|
return (this._flags1_ & (uint64(1) << 3)) > 0
|
|
}
|
|
|
|
func (this *BcNftDb) GetPasswd() string {
|
|
return this.passwd
|
|
}
|
|
|
|
func (this *BcNftDb) HasPasswd() bool {
|
|
return (this._flags1_ & (uint64(1) << 4)) > 0
|
|
}
|
|
|
|
func (this *BcNftDb) GetDatabase() string {
|
|
return this.database
|
|
}
|
|
|
|
func (this *BcNftDb) HasDatabase() bool {
|
|
return (this._flags1_ & (uint64(1) << 5)) > 0
|
|
}
|
|
|
|
func (this *BcNftDb) GetMaxOpenConns() int32 {
|
|
return this.max_open_conns
|
|
}
|
|
|
|
func (this *BcNftDb) HasMaxOpenConns() bool {
|
|
return (this._flags1_ & (uint64(1) << 6)) > 0
|
|
}
|
|
|
|
func (this *BcNftDb) GetMaxIdleConns() int32 {
|
|
return this.max_idle_conns
|
|
}
|
|
|
|
func (this *BcNftDb) HasMaxIdleConns() bool {
|
|
return (this._flags1_ & (uint64(1) << 7)) > 0
|
|
}
|
|
|
|
func (this *BcEventDb) GetHost() string {
|
|
return this.host
|
|
}
|
|
|
|
func (this *BcEventDb) HasHost() bool {
|
|
return (this._flags1_ & (uint64(1) << 1)) > 0
|
|
}
|
|
|
|
func (this *BcEventDb) GetPort() int32 {
|
|
return this.port
|
|
}
|
|
|
|
func (this *BcEventDb) HasPort() bool {
|
|
return (this._flags1_ & (uint64(1) << 2)) > 0
|
|
}
|
|
|
|
func (this *BcEventDb) GetUser() string {
|
|
return this.user
|
|
}
|
|
|
|
func (this *BcEventDb) HasUser() bool {
|
|
return (this._flags1_ & (uint64(1) << 3)) > 0
|
|
}
|
|
|
|
func (this *BcEventDb) GetPasswd() string {
|
|
return this.passwd
|
|
}
|
|
|
|
func (this *BcEventDb) HasPasswd() bool {
|
|
return (this._flags1_ & (uint64(1) << 4)) > 0
|
|
}
|
|
|
|
func (this *BcEventDb) GetDatabase() string {
|
|
return this.database
|
|
}
|
|
|
|
func (this *BcEventDb) HasDatabase() bool {
|
|
return (this._flags1_ & (uint64(1) << 5)) > 0
|
|
}
|
|
|
|
func (this *BcEventDb) GetMaxOpenConns() int32 {
|
|
return this.max_open_conns
|
|
}
|
|
|
|
func (this *BcEventDb) HasMaxOpenConns() bool {
|
|
return (this._flags1_ & (uint64(1) << 6)) > 0
|
|
}
|
|
|
|
func (this *BcEventDb) GetMaxIdleConns() int32 {
|
|
return this.max_idle_conns
|
|
}
|
|
|
|
func (this *BcEventDb) HasMaxIdleConns() bool {
|
|
return (this._flags1_ & (uint64(1) << 7)) > 0
|
|
}
|
|
|
|
func (this *Config) GetGameapiUrl() string {
|
|
return this.gameapi_url
|
|
}
|
|
|
|
func (this *Config) HasGameapiUrl() bool {
|
|
return (this._flags1_ & (uint64(1) << 1)) > 0
|
|
}
|
|
|
|
func (this *Config) GetNetId() int32 {
|
|
return this.net_id
|
|
}
|
|
|
|
func (this *Config) HasNetId() bool {
|
|
return (this._flags1_ & (uint64(1) << 2)) > 0
|
|
}
|
|
|
|
func (this *Config) GetImmutableBaseUrl() string {
|
|
return this.immutable_base_url
|
|
}
|
|
|
|
func (this *Config) HasImmutableBaseUrl() bool {
|
|
return (this._flags1_ & (uint64(1) << 3)) > 0
|
|
}
|
|
|
|
func (this *Config) GetChainName() string {
|
|
return this.chain_name
|
|
}
|
|
|
|
func (this *Config) HasChainName() bool {
|
|
return (this._flags1_ & (uint64(1) << 4)) > 0
|
|
}
|
|
|
|
func (this *Config) GetHeroContractAddress() string {
|
|
return this.hero_contract_address
|
|
}
|
|
|
|
func (this *Config) HasHeroContractAddress() bool {
|
|
return (this._flags1_ & (uint64(1) << 5)) > 0
|
|
}
|
|
|
|
func (this *Config) GetImmutableApiKey() string {
|
|
return this.immutable_api_key
|
|
}
|
|
|
|
func (this *Config) HasImmutableApiKey() bool {
|
|
return (this._flags1_ & (uint64(1) << 6)) > 0
|
|
}
|
|
|
|
func (this *Item) GetName() string {
|
|
return this.name
|
|
}
|
|
|
|
func (this *Item) HasName() bool {
|
|
return (this._flags1_ & (uint64(1) << 1)) > 0
|
|
}
|
|
|
|
func (this *Item) GetId() int32 {
|
|
return this.id
|
|
}
|
|
|
|
func (this *Item) HasId() bool {
|
|
return (this._flags1_ & (uint64(1) << 2)) > 0
|
|
}
|
|
|
|
func (this *Item) GetType() int32 {
|
|
return this.type_
|
|
}
|
|
|
|
func (this *Item) HasType() bool {
|
|
return (this._flags1_ & (uint64(1) << 3)) > 0
|
|
}
|
|
|
|
func (this *Item) GetSubType() int32 {
|
|
return this.sub_type
|
|
}
|
|
|
|
func (this *Item) HasSubType() bool {
|
|
return (this._flags1_ & (uint64(1) << 4)) > 0
|
|
}
|
|
|
|
func (this *Language) GetInfo() string {
|
|
return this.info
|
|
}
|
|
|
|
func (this *Language) HasInfo() bool {
|
|
return (this._flags1_ & (uint64(1) << 1)) > 0
|
|
}
|
|
|
|
func (this *Language) GetEn() string {
|
|
return this.en
|
|
}
|
|
|
|
func (this *Language) HasEn() bool {
|
|
return (this._flags1_ & (uint64(1) << 2)) > 0
|
|
}
|
|
|
|
func (this *BcCurrency) GetName() string {
|
|
return this.name
|
|
}
|
|
|
|
func (this *BcCurrency) HasName() bool {
|
|
return (this._flags1_ & (uint64(1) << 1)) > 0
|
|
}
|
|
|
|
func (this *BcCurrency) GetContractAddress() string {
|
|
return this.contract_address
|
|
}
|
|
|
|
func (this *BcCurrency) HasContractAddress() bool {
|
|
return (this._flags1_ & (uint64(1) << 3)) > 0
|
|
}
|
|
|
|
func (this *BcCurrency) GetCurrentPrice() float64 {
|
|
return this.current_price
|
|
}
|
|
|
|
func (this *BcCurrency) HasCurrentPrice() bool {
|
|
return (this._flags1_ & (uint64(1) << 4)) > 0
|
|
}
|
|
|
|
func (this *BcCurrency) GetDecimals() int32 {
|
|
return this.decimals
|
|
}
|
|
|
|
func (this *BcCurrency) HasDecimals() bool {
|
|
return (this._flags1_ & (uint64(1) << 5)) > 0
|
|
}
|
|
|
|
func (this *RankSeason) GetId() int32 {
|
|
return this.id
|
|
}
|
|
|
|
func (this *RankSeason) HasId() bool {
|
|
return (this._flags1_ & (uint64(1) << 1)) > 0
|
|
}
|
|
|
|
func (this *RankSeason) GetName() string {
|
|
return this.name
|
|
}
|
|
|
|
func (this *RankSeason) HasName() bool {
|
|
return (this._flags1_ & (uint64(1) << 2)) > 0
|
|
}
|
|
|
|
func (this *RankSeason) GetStartTime() string {
|
|
return this.start_time
|
|
}
|
|
|
|
func (this *RankSeason) HasStartTime() bool {
|
|
return (this._flags1_ & (uint64(1) << 3)) > 0
|
|
}
|
|
|
|
func (this *RankSeason) GetEndTime() string {
|
|
return this.end_time
|
|
}
|
|
|
|
func (this *RankSeason) HasEndTime() bool {
|
|
return (this._flags1_ & (uint64(1) << 4)) > 0
|
|
}
|
|
|
|
func (this *HashRateCommon) GetId() int32 {
|
|
return this.id
|
|
}
|
|
|
|
func (this *HashRateCommon) HasId() bool {
|
|
return (this._flags1_ & (uint64(1) << 1)) > 0
|
|
}
|
|
|
|
func (this *HashRateCommon) GetStartTime() string {
|
|
return this.start_time
|
|
}
|
|
|
|
func (this *HashRateCommon) HasStartTime() bool {
|
|
return (this._flags1_ & (uint64(1) << 2)) > 0
|
|
}
|
|
|
|
func (this *HashRateCommon) GetEndTime() string {
|
|
return this.end_time
|
|
}
|
|
|
|
func (this *HashRateCommon) HasEndTime() bool {
|
|
return (this._flags1_ & (uint64(1) << 3)) > 0
|
|
}
|
|
|
|
func (this *HashRateCommon) GetCecPool() int32 {
|
|
return this.cec_pool
|
|
}
|
|
|
|
func (this *HashRateCommon) HasCecPool() bool {
|
|
return (this._flags1_ & (uint64(1) << 4)) > 0
|
|
}
|
|
|
|
|
|
func (this *BackTaskCluster) LoadFromKv(kv map[string]interface{}) {
|
|
f5.ReadMetaTableField(&this.instance_id, "instance_id", &this._flags1_, 1, kv)
|
|
f5.ReadMetaTableField(&this.listen_port, "listen_port", &this._flags1_, 2, kv)
|
|
f5.ReadMetaTableField(&this.http_listen_port, "http_listen_port", &this._flags1_, 3, kv)
|
|
}
|
|
|
|
func (this *GameDb) 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)
|
|
f5.ReadMetaTableField(&this.max_open_conns, "max_open_conns", &this._flags1_, 6, kv)
|
|
f5.ReadMetaTableField(&this.max_idle_conns, "max_idle_conns", &this._flags1_, 7, 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)
|
|
f5.ReadMetaTableField(&this.max_open_conns, "max_open_conns", &this._flags1_, 6, kv)
|
|
f5.ReadMetaTableField(&this.max_idle_conns, "max_idle_conns", &this._flags1_, 7, kv)
|
|
}
|
|
|
|
func (this *BcNftDb) 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)
|
|
f5.ReadMetaTableField(&this.max_open_conns, "max_open_conns", &this._flags1_, 6, kv)
|
|
f5.ReadMetaTableField(&this.max_idle_conns, "max_idle_conns", &this._flags1_, 7, kv)
|
|
}
|
|
|
|
func (this *BcEventDb) 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)
|
|
f5.ReadMetaTableField(&this.max_open_conns, "max_open_conns", &this._flags1_, 6, kv)
|
|
f5.ReadMetaTableField(&this.max_idle_conns, "max_idle_conns", &this._flags1_, 7, kv)
|
|
}
|
|
|
|
func (this *Config) LoadFromKv(kv map[string]interface{}) {
|
|
f5.ReadMetaTableField(&this.gameapi_url, "gameapi_url", &this._flags1_, 1, kv)
|
|
f5.ReadMetaTableField(&this.net_id, "net_id", &this._flags1_, 2, kv)
|
|
f5.ReadMetaTableField(&this.immutable_base_url, "immutable_base_url", &this._flags1_, 3, kv)
|
|
f5.ReadMetaTableField(&this.chain_name, "chain_name", &this._flags1_, 4, kv)
|
|
f5.ReadMetaTableField(&this.hero_contract_address, "hero_contract_address", &this._flags1_, 5, kv)
|
|
f5.ReadMetaTableField(&this.immutable_api_key, "immutable_api_key", &this._flags1_, 6, kv)
|
|
}
|
|
|
|
func (this *Item) LoadFromKv(kv map[string]interface{}) {
|
|
f5.ReadMetaTableField(&this.name, "name", &this._flags1_, 1, kv)
|
|
f5.ReadMetaTableField(&this.id, "id", &this._flags1_, 2, kv)
|
|
f5.ReadMetaTableField(&this.type_, "type", &this._flags1_, 3, kv)
|
|
f5.ReadMetaTableField(&this.sub_type, "sub_type", &this._flags1_, 4, kv)
|
|
}
|
|
|
|
func (this *Language) LoadFromKv(kv map[string]interface{}) {
|
|
f5.ReadMetaTableField(&this.info, "info", &this._flags1_, 1, kv)
|
|
f5.ReadMetaTableField(&this.en, "en", &this._flags1_, 2, kv)
|
|
}
|
|
|
|
func (this *BcCurrency) LoadFromKv(kv map[string]interface{}) {
|
|
f5.ReadMetaTableField(&this.name, "name", &this._flags1_, 1, kv)
|
|
f5.ReadMetaTableField(&this.contract_address, "contract_address", &this._flags1_, 3, kv)
|
|
f5.ReadMetaTableField(&this.current_price, "current_price", &this._flags1_, 4, kv)
|
|
f5.ReadMetaTableField(&this.decimals, "decimals", &this._flags1_, 5, kv)
|
|
}
|
|
|
|
func (this *RankSeason) LoadFromKv(kv map[string]interface{}) {
|
|
f5.ReadMetaTableField(&this.id, "id", &this._flags1_, 1, kv)
|
|
f5.ReadMetaTableField(&this.name, "name", &this._flags1_, 2, kv)
|
|
f5.ReadMetaTableField(&this.start_time, "start_time", &this._flags1_, 3, kv)
|
|
f5.ReadMetaTableField(&this.end_time, "end_time", &this._flags1_, 4, kv)
|
|
}
|
|
|
|
func (this *HashRateCommon) LoadFromKv(kv map[string]interface{}) {
|
|
f5.ReadMetaTableField(&this.id, "id", &this._flags1_, 1, kv)
|
|
f5.ReadMetaTableField(&this.start_time, "start_time", &this._flags1_, 2, kv)
|
|
f5.ReadMetaTableField(&this.end_time, "end_time", &this._flags1_, 3, kv)
|
|
f5.ReadMetaTableField(&this.cec_pool, "cec_pool", &this._flags1_, 4, kv)
|
|
}
|