448 lines
11 KiB
Go
448 lines
11 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
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
type BcNftDb struct {
|
|
host string
|
|
port int32
|
|
user string
|
|
passwd string
|
|
database string
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
type BcEventDb struct {
|
|
host string
|
|
port int32
|
|
user string
|
|
passwd string
|
|
database string
|
|
|
|
_flags1_ uint64
|
|
_flags2_ uint64
|
|
}
|
|
|
|
type Config struct {
|
|
gameapi_url string
|
|
net_id int32
|
|
immutable_base_url string
|
|
chain_name 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 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 *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 *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 *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 *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 *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)
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
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 *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)
|
|
}
|