Documentation ¶
Index ¶
- Constants
- Variables
- func GetS3Object(region string, bucket string, key string) (string, error)
- func GetSecret(secretName, region string) (string, error)
- func InitLogger(config LogConfig)
- func SendTelegramMessage(botId string, chatId string, msg string)
- type AdminConfig
- type AlertConfig
- type ChainConfig
- type Config
- type DBConfig
- type LogConfig
Constants ¶
View Source
const ( KeyTypeMnemonic = "mnemonic" KeyTypeAWSMnemonic = "aws_mnemonic" )
Variables ¶
View Source
var ( // Logger instance for quick declarative logging levels Logger = logging.MustGetLogger("deputy") SdkLogger = &sdkLogger{} )
Functions ¶
func SendTelegramMessage ¶
Types ¶
type AdminConfig ¶
type AdminConfig struct {
ListenAddr string `json:"listen_addr"`
}
type AlertConfig ¶
type ChainConfig ¶
type ChainConfig struct { BSCStartHeight int64 `json:"bsc_start_height"` BSCProvider string `json:"bsc_provider"` BSCConfirmNum int64 `json:"bsc_confirm_num"` BSCChainId string `json:"bsc_chain_id"` BSCTokenHubContractAddress ethcmm.Address `json:"bsc_token_hub_contract_address"` BSCValidatorSetContractAddress ethcmm.Address `json:"bsc_validator_set_contract_address"` BBCRpcAddr string `json:"bbc_rpc_addr"` BBCMnemonic string `json:"bbc_mnemonic"` BBCKeyType string `json:"bbc_key_type"` BBCAWSRegion string `json:"bbc_aws_region"` BBCAWSSecretName string `json:"bbc_aws_secret_name"` }
func (*ChainConfig) Validate ¶
func (cfg *ChainConfig) Validate()
type Config ¶
type Config struct { DBConfig *DBConfig `json:"db_config"` ChainConfig *ChainConfig `json:"chain_config"` LogConfig *LogConfig `json:"log_config"` AlertConfig *AlertConfig `json:"alert_config"` AdminConfig *AdminConfig `json:"admin_config"` }
func ParseConfigFromFile ¶
func ParseConfigFromJson ¶
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"` }
Click to show internal directories.
Click to hide internal directories.