1
This commit is contained in:
parent
53c2e78aa4
commit
ea6f71ba8e
18
server/marketserver/mt/Web3SignCluster.go
Normal file
18
server/marketserver/mt/Web3SignCluster.go
Normal file
@ -0,0 +1,18 @@
|
||||
package mt
|
||||
|
||||
import (
|
||||
"f5"
|
||||
"mtb"
|
||||
)
|
||||
|
||||
type Web3SignCluster struct {
|
||||
mtb.Web3SignCluster
|
||||
}
|
||||
|
||||
type Web3SignClusterTable struct {
|
||||
f5.IdMetaTable[Web3SignCluster]
|
||||
}
|
||||
|
||||
func (this *Web3SignCluster) Init1() {
|
||||
|
||||
}
|
@ -12,6 +12,7 @@ type table struct {
|
||||
Config *ConfigTable
|
||||
Item *ItemTable
|
||||
Contract *ContractTable
|
||||
Web3SignCluster *Web3SignClusterTable
|
||||
}
|
||||
|
||||
var Table = f5.New(func(this *table) {
|
||||
@ -50,4 +51,9 @@ var Table = f5.New(func(this *table) {
|
||||
this.PrimKey = "name"
|
||||
})
|
||||
|
||||
this.Web3SignCluster = f5.New(func(this *Web3SignClusterTable) {
|
||||
this.FileName = "../config/web3sign.cluster.json"
|
||||
this.PrimKey = ""
|
||||
})
|
||||
|
||||
})
|
||||
|
@ -69,6 +69,13 @@ type Contract struct {
|
||||
_flags2_ uint64
|
||||
}
|
||||
|
||||
type Web3SignCluster struct {
|
||||
url string
|
||||
|
||||
_flags1_ uint64
|
||||
_flags2_ uint64
|
||||
}
|
||||
|
||||
func (this *MarketServerCluster) GetInstanceId() int32 {
|
||||
return this.instance_id
|
||||
}
|
||||
@ -253,6 +260,14 @@ func (this *Contract) HasAddress() bool {
|
||||
return (this._flags1_ & (uint64(1) << 4)) > 0
|
||||
}
|
||||
|
||||
func (this *Web3SignCluster) GetUrl() string {
|
||||
return this.url
|
||||
}
|
||||
|
||||
func (this *Web3SignCluster) HasUrl() bool {
|
||||
return (this._flags1_ & (uint64(1) << 1)) > 0
|
||||
}
|
||||
|
||||
|
||||
func (this *MarketServerCluster) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.instance_id, "instance_id", &this._flags1_, 1, kv)
|
||||
@ -297,3 +312,7 @@ func (this *Contract) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.name, "name", &this._flags1_, 1, kv)
|
||||
f5.ReadMetaTableField(&this.address, "address", &this._flags1_, 4, kv)
|
||||
}
|
||||
|
||||
func (this *Web3SignCluster) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.url, "url", &this._flags1_, 1, kv)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user