config

package
v2.0.0-...-d7ce1a4 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CRYPTO_GM = "gm"
View Source
const CRYPTO_XCHAIN = "xchain"

Variables

This section is empty.

Functions

func SetConfig

func SetConfig(checkHost, checkAddr, checkFeeAddr, checkFee string, isNeedCheck, isNeedCheckFee bool, minNewChainAmount string)

SetConfig set config fileds.

Types

type CommConfig

type CommConfig struct {
	EndorseServiceHost string                `yaml:"endorseServiceHost,omitempty"`
	ComplianceCheck    ComplianceCheckConfig `yaml:"complianceCheck,omitempty"`
	MinNewChainAmount  string                `yaml:"minNewChainAmount,omitempty"`
	Crypto             string                `yaml:"crypto,omitempty"`
	TxVersion          int32                 `yaml:"txVersion,omitempty"`
}

CommConfig sdk config.

func GetConfig

func GetConfig(confFile string) (*CommConfig, error)

GetConfig load config from confFile and new config instance.

func GetInstance

func GetInstance() *CommConfig

GetInstance get config instance.

func (*CommConfig) SetGMCrypto

func (c *CommConfig) SetGMCrypto()

SetGMCrypto 使用国密,用这个方法可以不使用配置文件来修改了。

func (*CommConfig) SetXchainCrypto

func (c *CommConfig) SetXchainCrypto()

SetXchainCrypto 使用 xchain 加密算法,用这个方法可以不使用配置文件来修改了。

type ComplianceCheckConfig

type ComplianceCheckConfig struct {
	IsNeedComplianceCheck                bool   `yaml:"isNeedComplianceCheck,omitempty"`
	IsNeedComplianceCheckFee             bool   `yaml:"isNeedComplianceCheckFee,omitempty"`
	ComplianceCheckEndorseServiceFee     int    `yaml:"complianceCheckEndorseServiceFee,omitempty"`
	ComplianceCheckEndorseServiceFeeAddr string `yaml:"complianceCheckEndorseServiceFeeAddr,omitempty"`
	ComplianceCheckEndorseServiceAddr    string `yaml:"complianceCheckEndorseServiceAddr,omitempty"`
}

ComplianceCheckConfig endorser config.

Jump to

Keyboard shortcuts

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