config

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 28 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// #nosec G101 (look for hardcoded credentials)
	// This line doesn't contain any credentials.
	// It's just the name of the environment variable.
	EthereumPasswordEnvVariable = "KEEP_ETHEREUM_PASSWORD"

	// LogLevelEnvVariable can be used to define logging configuration.
	LogLevelEnvVariable = "LOG_LEVEL"
)

Variables

AllCategories are all available categories.

View Source
var MaintainerCategories = []Category{
	Ethereum,
	BitcoinElectrum,
	Maintainer,
}

MaintainerCategories are categories needed for the maintainer command.

StartCmdCategories are categories needed for the start command.

Functions

func GetDeveloperContractAddressKey added in v1.21.0

func GetDeveloperContractAddressKey(contractName string) string

GetDeveloperContractAddressKey returns a key for developer contract address configuration.

Types

type BitcoinConfig added in v1.21.0

type BitcoinConfig struct {
	bitcoin.Network
	// Electrum defines the configuration for the Electrum client.
	Electrum electrum.Config
}

BitcoinConfig defines the configuration for Bitcoin.

type Category added in v1.21.0

type Category int
const (
	General Category = iota
	Ethereum
	BitcoinElectrum
	Network
	Storage
	ClientInfo
	Tbtc
	Maintainer
	Developer
)

type Config

type Config struct {
	Ethereum   commonEthereum.Config
	Bitcoin    BitcoinConfig
	LibP2P     libp2p.Config `mapstructure:"network"`
	Storage    storage.Config
	ClientInfo clientinfo.Config
	Maintainer maintainer.Config
	Tbtc       tbtc.Config
}

Config is the top level config structure.

func (*Config) ReadConfig added in v1.21.0

func (c *Config) ReadConfig(configFilePath string, flagSet *pflag.FlagSet, categories ...Category) error

ReadConfig reads in the configuration file at `configFilePath` and flags defined in the `flagSet`.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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