config

package
v0.0.0-...-369a1d7 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"

	// PubsubLogLevelEnvVariable can be used to define logging configuration
	// for the pubsub implementation.
	PubsubLogLevelEnvVariable = "PUBSUB_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

func GetDeveloperContractAddressKey(contractName string) string

GetDeveloperContractAddressKey returns a key for developer contract address configuration.

Types

type BitcoinConfig

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

BitcoinConfig defines the configuration for Bitcoin.

type Category

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

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