Documentation ¶
Index ¶
Constants ¶
View Source
const ( FlagConfigPath = "config-path" FlagConfigType = "config-type" FlagConfigAwsRegion = "aws-region" FlagConfigAwsSecretKey = "aws-secret-key" FlagConfigPrivateKey = "private-key" FlagConfigBlsPrivateKey = "bls-private-key" FlagConfigDbPass = "db-pass" DBDialectMysql = "mysql" DBDialectSqlite3 = "sqlite3" LocalConfig = "local" AWSConfig = "aws" KeyTypeLocalPrivateKey = "local_private_key" KeyTypeAWSPrivateKey = "aws_private_key" ConfigType = "CONFIG_TYPE" ConfigFilePath = "CONFIG_FILE_PATH" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AlertConfig ¶
type Config ¶
type Config struct { GreenfieldConfig GreenfieldConfig `json:"greenfield_config"` LogConfig LogConfig `json:"log_config"` AlertConfig AlertConfig `json:"alert_config"` DBConfig DBConfig `json:"db_config"` MetricsConfig MetricsConfig `json:"metrics_config"` SPConfig SPConfig `json:"sp_config"` }
func ParseConfigFromFile ¶
func ParseConfigFromJson ¶
type DBConfig ¶
type DBConfig struct { Dialect string `json:"dialect"` DBPath string `json:"db_path"` KeyType string `json:"key_type"` AWSRegion string `json:"aws_region"` AWSSecretName string `json:"aws_secret_name"` Password string `json:"password"` Username string `json:"username"` MaxIdleConns int `json:"max_idle_conns"` MaxOpenConns int `json:"max_open_conns"` DebugMode bool `json:"debug_mode"` }
type GreenfieldConfig ¶
type GreenfieldConfig struct { KeyType string `json:"key_type"` AWSRegion string `json:"aws_region"` AWSSecretName string `json:"aws_secret_name"` AWSBlsSecretName string `json:"aws_bls_secret_name"` PrivateKey string `json:"private_key"` BlsPrivateKey string `json:"bls_private_key"` RPCAddrs []string `json:"rpc_addrs"` ChainIdString string `json:"chain_id_string"` GasLimit uint64 `json:"gas_limit"` FeeAmount string `json:"fee_amount"` FeeDenom string `json:"fee_denom"` }
func (*GreenfieldConfig) Validate ¶ added in v0.0.2
func (cfg *GreenfieldConfig) Validate()
type LogConfig ¶
type LogConfig struct { Level string `json:"level"` Filename string `json:"filename"` MaxFileSizeInMB int `json:"max_file_size_in_mb"` MaxBackupsOfLogFiles int `json:"max_backups_of_log_files"` MaxAgeToRetainLogFilesInDays int `json:"max_age_to_retain_log_files_in_days"` UseConsoleLogger bool `json:"use_console_logger"` UseFileLogger bool `json:"use_file_logger"` Compress bool `json:"compress"` }
type MetricsConfig ¶ added in v0.0.4
type MetricsConfig struct {
Port uint16 `json:"port"`
}
func (*MetricsConfig) Validate ¶ added in v0.0.4
func (cfg *MetricsConfig) Validate()
Click to show internal directories.
Click to hide internal directories.