1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-19 04:50:02 +02:00

app/config/config.go: add mapstructure tags.

This commit is contained in:
Henrik Hautakoski 2024-02-17 16:30:54 +01:00
parent d43ef7f7ff
commit 106e88f2f4

View file

@ -17,30 +17,30 @@ type RedisConfig struct {
} }
type TelegramConfig struct { type TelegramConfig struct {
Id string `yaml:"id"` Id string `yaml:"id" mapstructure:"id"`
Channel int64 `yaml:"channel"` Channel int64 `yaml:"channel" mapstructure:"channel"`
} }
type ShipConfig struct { type ShipConfig struct {
Url string `yaml:"url"` Url string `yaml:"url" mapstructure:"url"`
IrreversibleOnly bool `yaml:"irreversible_only"` IrreversibleOnly bool `yaml:"irreversible_only" mapstructure:"irreversible_only"`
MaxMessagesInFlight uint32 `yaml:"max_messages_in_flight"` MaxMessagesInFlight uint32 `yaml:"max_messages_in_flight" mapstructure:"max_messages_in_flight"`
StartBlockNum uint32 `yaml:"start_block_num"` StartBlockNum uint32 `yaml:"start_block_num" mapstructure:"start_block_num"`
EndBlockNum uint32 `yaml:"end_block_num"` EndBlockNum uint32 `yaml:"end_block_num" mapstructure:"end_block_num"`
Chain string `yaml:"chain"` Chain string `yaml:"chain" mapstructure:"chain"`
} }
type Config struct { type Config struct {
Name string `yaml:"name"` Name string `yaml:"name" mapstructure:"name"`
Ship ShipConfig `yaml:"ship"` Ship ShipConfig `yaml:"ship" mapstructure:"ship"`
Api string `yaml:"api"` Api string `yaml:"api" mapstructure:"api"`
Log log.Config `yaml:"log"` Log log.Config `yaml:"log" mapstructure:"log"`
Redis RedisConfig `yaml:"redis"` Redis RedisConfig `yaml:"redis" mapstructure:"redis"`
MessageCodec string `yaml:"message_codec"` MessageCodec string `yaml:"message_codec" mapstructure:"message_codec"`
Telegram TelegramConfig `yaml:"telegram"` Telegram TelegramConfig `yaml:"telegram" mapstructure:"telegram"`
} }
// Create a new Config object with default values // Create a new Config object with default values