config

package
v0.0.0-...-10d2010 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ETH_MONITOR_INTERVAL = 3 * time.Second
	ETH_USEFUL_BLOCK_NUM = 6
)

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(filepath string) error

Types

type DB

type DB struct {
	UserName string `json:"UserName"`
	Password string `json:"Password"`
	DBAddr   string `json:"DBAddr"`
	DbName   string `json:"DBName"`
}

type DidConf

type DidConf struct {
	Chain                    string `json:"chain"`
	Wallet                   string `json:"wallet"`
	Password                 string `json:"password"`
	URL                      string `json:"url"`
	DID                      string `json:"did"`
	DIDContract              string `json:"DIDContract"`
	CredentialExpirationDays int    `json:"CredentialExpirationDays"`
	Gasprice                 uint64 `json:"gasprice"`
	Gaslimit                 uint64 `json:"gaslimit"`
	Commit                   bool   `json:"commit"`
}

type ETHWallet

type ETHWallet struct {
	KeyStore string `json:"key_store_path"`
	Password string `json:"password"`
}

type EmailConfig

type EmailConfig struct {
	MailAddress string `json:"mail_address"`
	Host        string `json:"host"`
	SmtpPort    int    `json:"smtp_port"`
	Password    string `json:"password"`
	Subject     string `json:"subject"`
	Content     string `json:"content"`
}

type GraphConfig

type GraphConfig struct {
	Eth     string `json:"eth"`
	Bsc     string `json:"bsc"`
	Polygon string `json:"polygon"`
}

type NFTConfig

type NFTConfig struct {
	NftInfos map[string]NFTInfo `json:"nft_infos"`
}

type NFTInfo

type NFTInfo struct {
	ContractAddress string `json:"contract_address"`
	Rpc             string `json:"rpc"`
}

type OntloginConfig

type OntloginConfig struct {
	Chain      []string            `json:"chain"`
	Alg        []string            `json:"alg"`
	ServerInfo *modules.ServerInfo `json:"serverInfo"`
}

type SnapShotAssetsConfig

type SnapShotAssetsConfig struct {
	ApDID    string `json:"ap_did"`
	ApMethod string `json:"ap_method"`
	DpDID    string `json:"dp_did"`
	DpMethod string `json:"dp_method"`
}

type SysConfig

type SysConfig struct {
	Chain                string                `json:"chain"`
	ChainRpc             string                `json:"chain_rpc"`
	SysDs                string                `json:"sys_data_service"`
	FilePath             string                `json:"file_path"`
	AvatarFilePath       string                `json:"avatar_file_path"`
	WasmExecutor         WasmExecutor          `json:"wasm_executor"`
	Db                   *DB                   `json:"db"`
	DidConf              []*DidConf            `json:"did_config"`
	OntloginConf         *OntloginConfig       `json:"ontlogin_config"`
	CallerAddrs          []string              `json:"outer_task_caller"`
	SigAuth              bool                  `json:"sig_auth"`
	MNftBlock            int                   `json:"m_nft_block"`
	METHBlock            int                   `json:"m_eth_block"`
	EmailConfig          *EmailConfig          `json:"mail_config"`
	SnapShotAssetsConfig *SnapShotAssetsConfig `json:"snapshot_assets_config"`
	BatchTaskCount       int                   `json:"batch_task_count"`
	TimeOutSeconds       int                   `json:"task_timeout_seconds"`
	ETHWallet            *ETHWallet            `json:"eth_wallet"`
	NFTConfig            *NFTConfig            `json:"nft_config"`
	GraphConfig          *GraphConfig          `json:"graph_config"`
	NFTTimeOutMinutes    int                   `json:"nft_timeout_minutes"`
}
var GlobalConfig *SysConfig

type WasmExecutor

type WasmExecutor struct {
	Did      string `json:"did"`
	Address  string `json:"address"`
	Wallet   string `json:"wallet"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL