config

package
v0.0.0-...-344a3b9 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ValOperatorAddress  string            `mapstructure:"val_operator_addr"`
	AccountAddress      string            `mapstructure:"account_addr"`
	ValidatorHexAddress string            `mapstructure:"validator_hex_addr"`
	LCDEndpoint         string            `mapstructure:"lcd_endpoint"`
	Telegram            TelegramBotConfig `mapstructure:"telegram"`
	RPCEndpoint         string            `mapstructure:"rpc_endpoint"`
	ExternalRPC         string            `mapstructure:"external_rpc"`
	AlertTime1          string            `mapstructure:"alert_time1"`
	AlertTime2          string            `mapstructure:"alert_time2"`
	ValidatorName       string            `mapstructure:"validator_name"`
}

Config defines all the app configurations

func ReadConfigFromFile

func ReadConfigFromFile() (*Config, error)

ReadConfigFromFile to read config details using viper

func (*Config) Validate

func (c *Config) Validate(e ...string) error

Validate config struct

type TelegramBotConfig

type TelegramBotConfig struct {
	BotToken string `mapstructure:"tg_bot_token"`
	ChatID   int64  `mapstructure:"tg_chat_id"`
}

Telegram bot config details

Jump to

Keyboard shortcuts

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