config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadTxIndexerConfig

func ReadTxIndexerConfig() (*tx_indexer_config.Config, error)

Types

type FeesConfig

type FeesConfig struct {
	USDCAddress string `mapstructure:"usdc_address" json:"usdc_address,omitempty"`
}

type VerifierConfig

type VerifierConfig struct {
	LogFormat logging.LogFormat `mapstructure:"log_format" json:"log_format,omitempty"`
	Server    struct {
		Host      string `mapstructure:"host" json:"host,omitempty"`
		Port      int64  `mapstructure:"port" json:"port,omitempty"`
		JWTSecret string `mapstructure:"jwt_secret" json:"jwt_secret,omitempty"`
	} `mapstructure:"server" json:"server"`
	Database         config.Database           `mapstructure:"database" json:"database,omitempty"`
	Redis            config.Redis              `mapstructure:"redis" json:"redis,omitempty"`
	BlockStorage     vault_config.BlockStorage `mapstructure:"block_storage" json:"block_storage,omitempty"`
	EncryptionSecret string                    `mapstructure:"encryption_secret" json:"encryption_secret,omitempty"`
	Auth             struct {
		NonceExpiryMinutes int `mapstructure:"nonce_expiry_minutes" json:"nonce_expiry_minutes,omitempty"`
		// could be disabled for autotests / local,
		// pointer so it must be explicitly set to false, no value considered as enabled
		Enabled *bool `mapstructure:"enabled" json:"enabled,omitempty"`
	} `mapstructure:"auth" json:"auth"`
	Fees FeesConfig `mapstructure:"fees" json:"fees"`
}

func ReadVerifierConfig

func ReadVerifierConfig() (*VerifierConfig, error)

type WorkerConfig

type WorkerConfig struct {
	LogFormat    logging.LogFormat         `mapstructure:"log_format" json:"log_format,omitempty"`
	VaultService vault_config.Config       `mapstructure:"vault_service" json:"vault_service,omitempty"`
	Redis        config.Redis              `mapstructure:"redis" json:"redis,omitempty"`
	BlockStorage vault_config.BlockStorage `mapstructure:"block_storage" json:"block_storage,omitempty"`
	Database     config.Database           `mapstructure:"database" json:"database,omitempty"`
	Fees         FeesConfig                `mapstructure:"fees" json:"fees"`
}

func GetConfigure

func GetConfigure() (*WorkerConfig, error)

func ReadConfig

func ReadConfig(configName string) (*WorkerConfig, error)

Jump to

Keyboard shortcuts

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