config

package
v0.0.0-...-98a09a2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Default is the default config
	Default = Config{
		API: API{
			Url: "api.testnet.iotex.one:80",
		},
		KeyStore: "",
	}

	// ErrInvalidCfg indicates the invalid config value
	ErrInvalidCfg = errors.New("invalid config value")
)

Functions

This section is empty.

Types

type API

type API struct {
	Url string `yaml:"url"`
}

API is the api service config

type Config

type Config struct {
	API         API              `yaml:"api"`
	Log         log.GlobalConfig `yaml:"log"`
	KeyStore    string           `yaml:"keyStore"`
	RunInterval uint64           `yaml:"runInterval"`
	Transfer    transfer         `yaml:"transfer"`
	Wallet      string           `yaml:"wallet"`
	Xrc20       xrc20            `yaml:"xrc20"`
	Execution   execution        `yaml:"execution"`
}

Config is the root config struct, each package's config should be put as its sub struct

func New

func New() (Config, error)

func (Config) ProducerAddress

func (cfg Config) ProducerAddress() address.Address

ProducerAddress returns the configured producer address derived from key

func (Config) ProducerPrivateKey

func (cfg Config) ProducerPrivateKey() crypto.PrivateKey

ProducerPrivateKey returns the configured private key

Jump to

Keyboard shortcuts

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