Documentation
¶
Overview ¶
Package config enables loading and utilizing configuration options for different blockchain networks
Index ¶
- Constants
- Variables
- func ChainlinkVals() map[string]interface{}
- func GethNetworks() []environment.SimulatedNetwork
- type ChainlinkChart
- type ChainlinkImage
- type ChainlinkValues
- type ChainlinkValuesWrapper
- type ChartOverrides
- type ConfigurationType
- type ETHNetwork
- type FrameworkConfig
- type GethChart
- type GethImage
- type GethValues
- type GethValuesWrapper
- type LocalStore
- type LoggingConfig
- type NetworkSettings
- type NetworksConfig
- type PrivateKeyStore
- type RemoteRunnerConfig
- type TerraNetwork
Constants ¶
const ( LocalConfig ConfigurationType = "local" SecretConfig ConfigurationType = "secret" DefaultGeth string = "geth" PerformanceGeth string = "geth_performance" RealisticGeth string = "geth_realistic" )
Configs
Variables ¶
var ProjectConfigDirectory string
Functions ¶
func ChainlinkVals ¶ added in v1.0.54
func ChainlinkVals() map[string]interface{}
ChainlinkVals formats Chainlink values set in the framework config to be passed to Chainlink deployments
func GethNetworks ¶ added in v1.0.54
func GethNetworks() []environment.SimulatedNetwork
GethNetworks builds the proper geth network settings to use based on the selected_networks config
Types ¶
type ChainlinkChart ¶ added in v1.0.27
type ChainlinkChart struct {
Values *ChainlinkValuesWrapper `json:"values,omitempty"`
}
ChainlinkChart holds the overall geth chart values
type ChainlinkImage ¶ added in v1.0.27
type ChainlinkImage struct { Image string `json:"image,omitempty" yaml:"chainlink_image"` Version string `json:"version,omitempty" yaml:"chainlink_version"` }
ChainlinkImage defines chainlink image and version
type ChainlinkValues ¶ added in v1.0.27
type ChainlinkValues struct {
Image *ChainlinkImage `json:"image,omitempty"`
}
ChainlinkValues wraps all values
type ChainlinkValuesWrapper ¶ added in v1.0.27
type ChainlinkValuesWrapper struct { ChainlinkVals *ChainlinkValues `json:"chainlink,omitempty"` EnvironmentVariables map[string]string `json:"env,omitempty" yaml:"chainlink_env_values"` }
ChainlinkValuesWrapper Chainlink values wrapper
type ChartOverrides ¶ added in v1.0.27
type ChartOverrides struct { GethChartOverride *GethChart `json:"geth,omitempty"` ChainlinkChartOverrride *ChainlinkChart `json:"chainlink,omitempty"` }
ChartOverrides enables building json styled chart overrides for the deployed chart values and environment variables
type ConfigurationType ¶
type ConfigurationType string
ConfigurationType refers to the different ways that configurations can be set
type ETHNetwork ¶ added in v0.0.25
type ETHNetwork struct { ContractsDeployed bool `mapstructure:"contracts_deployed" yaml:"contracts_deployed"` External bool `mapstructure:"external" yaml:"external"` Name string `mapstructure:"name" yaml:"name"` ID string `mapstructure:"id" yaml:"id"` ChainID int64 `mapstructure:"chain_id" yaml:"chain_id"` URL string `mapstructure:"url" yaml:"url"` URLs []string `mapstructure:"urls" yaml:"urls"` Type string `mapstructure:"type" yaml:"type"` PrivateKeys []string `mapstructure:"private_keys" yaml:"private_keys"` ChainlinkTransactionLimit uint64 `mapstructure:"chainlink_transaction_limit" yaml:"chainlink_transaction_limit"` Timeout time.Duration `mapstructure:"transaction_timeout" yaml:"transaction_timeout"` MinimumConfirmations int `mapstructure:"minimum_confirmations" yaml:"minimum_confirmations"` GasEstimationBuffer uint64 `mapstructure:"gas_estimation_buffer" yaml:"gas_estimation_buffer"` BlockGasLimit uint64 `mapstructure:"block_gas_limit" yaml:"block_gas_limit"` }
ETHNetwork data to configure fully ETH compatible network
type FrameworkConfig ¶ added in v0.0.25
type FrameworkConfig struct { KeepEnvironments string `mapstructure:"keep_environments" yaml:"keep_environments"` Logging *LoggingConfig `mapstructure:"logging" yaml:"logging"` EnvironmentFile string `mapstructure:"environment_file" yaml:"environment_file"` ChainlinkImage string `mapstructure:"chainlink_image" yaml:"chainlink_image"` ChainlinkVersion string `mapstructure:"chainlink_version" yaml:"chainlink_version"` // ChainlinkEnvValues uses interface{} as the value because it's needed for proper helmchart merges ChainlinkEnvValues map[string]interface{} `mapstructure:"chainlink_env_values" yaml:"chainlink_env_values"` }
FrameworkConfig common framework config
var ProjectFrameworkSettings *FrameworkConfig
func LoadFrameworkConfig ¶ added in v0.0.25
func LoadFrameworkConfig(cfgPath string) (*FrameworkConfig, error)
LoadFrameworkConfig loads framework config
type GethChart ¶ added in v1.0.27
type GethChart struct {
Values *GethValuesWrapper `json:"values,omitempty"`
}
GethChart holds the overall geth chart values
type GethImage ¶ added in v1.0.27
type GethImage struct { Image string `json:"image,omitempty" yaml:"geth_image"` Version string `json:"version,omitempty" yaml:"geth_version"` }
GethImage defines geth image and version
type GethValues ¶ added in v1.0.27
type GethValues struct {
Image *GethImage `json:"image,omitempty"`
}
GethValues wraps all values
type GethValuesWrapper ¶ added in v1.0.27
type GethValuesWrapper struct { GethVals *GethValues `json:"geth,omitempty"` Args []interface{} `json:"args,omitempty"` }
GethValuesWrapper geth values wrapper
type LocalStore ¶
type LocalStore struct {
RawKeys []string
}
LocalStore retrieves keys defined in a networks.yaml file, or from environment variables
func (*LocalStore) Fetch ¶
func (l *LocalStore) Fetch() ([]string, error)
Fetch private keys from local environment variables or a config file
type LoggingConfig ¶
type LoggingConfig struct { WritePodLogs string `mapstructure:"write_pod_logs" yaml:"write_pod_logs"` Level int8 `mapstructure:"level" yaml:"level"` }
LoggingConfig for logging
type NetworkSettings ¶ added in v0.0.27
NetworkSettings is a map that holds configuration for each individual network
func (NetworkSettings) Decode ¶ added in v0.0.27
func (n NetworkSettings) Decode(value string) error
Decode is used by envconfig to initialize the custom Charts type with populated values This function will take a JSON object representing charts, and unmarshal it into the existing object to "merge" the two
type NetworksConfig ¶ added in v0.0.25
type NetworksConfig struct { SelectedNetworks []string `mapstructure:"selected_networks" yaml:"selected_networks" envconfig:"selected_networks"` NetworkSettings NetworkSettings `mapstructure:"networks" yaml:"networks" envconfig:"network_settings"` DefaultKeyStore string ConfigFileLocation string }
NetworksConfig is network configurations
var ProjectNetworkSettings *NetworksConfig
func LoadNetworksConfig ¶ added in v0.0.25
func LoadNetworksConfig(cfgPath string) (*NetworksConfig, error)
LoadNetworksConfig loads networks config
type PrivateKeyStore ¶
PrivateKeyStore enables access, through a variety of methods, to private keys for use in blockchain networks
type RemoteRunnerConfig ¶ added in v1.0.53
type RemoteRunnerConfig struct { TestRegex string `mapstructure:"test_regex" yaml:"test_regex"` TestDirectory string `mapstructure:"test_directory" yaml:"test_directory"` SlackAPIKey string `mapstructure:"slack_api_key" yaml:"slack_api_key"` SlackChannel string `mapstructure:"slack_channel" yaml:"slack_channel"` SlackUserID string `mapstructure:"slack_user_id" yaml:"slack_user_id"` }
RemoteRunnerConfig reads the config file for remote test runs
func ReadWriteRemoteRunnerConfig ¶ added in v1.0.53
func ReadWriteRemoteRunnerConfig() (*RemoteRunnerConfig, error)
ReadWriteRemoteRunnerConfig looks for an already existing remote config to read from, or asks the user to build one
type TerraNetwork ¶ added in v0.0.25
type TerraNetwork struct { Name string `mapstructure:"name" yaml:"name"` ChainName string `mapstructure:"chain_name" yaml:"chain_name"` Mnemonics []string `mapstructure:"mnemonic" yaml:"mnemonic"` Currency string `mapstructure:"currency" yaml:"currency"` Type string `mapstructure:"type" yaml:"type"` ChainlinkTransactionLimit uint64 `mapstructure:"chainlink_transaction_limit" yaml:"chainlink_transaction_limit"` Timeout time.Duration `mapstructure:"transaction_timeout" yaml:"transaction_timeout"` MinimumConfirmations int `mapstructure:"minimum_confirmations" yaml:"minimum_confirmations"` }
TerraNetwork data to configure Terra network