config

package
v0.0.0-...-e54d674 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBTCNode    = "http://bitcoinrpc:DVnnAgN2vYvgS26UR8lH9QJVgbq5nFerycMuwh8P7Sw@192.168.1.146:18332"
	DefaultETHNode    = "http://192.168.1.146:8545"
	DefaultERC20Token = "0xaff4481d10270f50f203e0763e2597776068cbc5"
	DefaultBNCNode    = "tcp://192.168.1.146:26657"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BNCConfig

type BNCConfig struct {
	NodeAddr string `mapstructure:"node" json:"node"`
	Testnet  bool   `mapstructure:"testnet" json:"testnet"`
}

type BTCConfig

type BTCConfig struct {
	NodeAddr       string `mapstructure:"node" json:"node"`
	Testnet        bool   `mapstructure:"testnet" json:"testnet"`
	TargetOutbound uint32 `mapstructure:"nodeSize" json:"targetSize"`
}

type Config

type Config struct {
	// Network parameters. Set mainnet, testnet, or regtest using this.
	BTCConfig  BTCConfig  `mapstructure:"btc" json:"btc"`
	ETHConfig  ETHConfig  `mapstructure:"eth" json:"eth"`
	BNCConfig  BNCConfig  `mapstructure:"bnc" json:"bnc"`
	LogConfig  LogConfig  `mapstructure:"log" json:"log"`
	RESTConfig RESTConfig `mapstructure:"rest" json:"rest"`
	WSConfig   WSConfig   `mapstructure:"ws" json:"ws"`
	PruneTime  int64      `mapstructure:"prune" json:"prune"`
}

Config is app of conig

func NewDefaultConfig

func NewDefaultConfig() (*Config, error)

NewDefaultConfig is default config

type ETHConfig

type ETHConfig struct {
	NodeAddr   string `mapstructure:"node" json:"node"`
	WatchToken string `mapstructure:"token" json:"token"`
	Testnet    bool   `mapstructure:"testnet" json:"testnet"`
}

type LogConfig

type LogConfig struct {
	LogLevel string `mapstructure:"level" json:"level"`
}

type P2PConfig

type P2PConfig struct {
	ConnAddr       string `mapstructure:"connect" json:"connect"`
	TargetOutbound uint32 `mapstructure:"targetSize" json:"targetSize"`
}

type RESTConfig

type RESTConfig struct {
	ConnAddr   string `mapstructure:"connect" json:"connect"`
	ListenAddr string `mapstructure:"listen" json:"listen"`
}

type WSConfig

type WSConfig struct {
	ListenAddr string `mapstructure:"listen" json:"listen"`
}

Jump to

Keyboard shortcuts

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