config

package
v0.0.0-...-a1990c1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 4 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 {
	HTTPAddr string `mapstructure:"HTTP_ADDR"`

	DatabaseDSN    string        `mapstructure:"DATABASE_DSN"`
	DBRetryCount   int           `mapstructure:"DB_RETRY_COUNT"`
	DBRetryBackoff time.Duration `mapstructure:"DB_RETRY_BACKOFF"`

	MigrationsPath string `mapstructure:"MIGRATIONS_PATH"`

	DetailsServerAddr            string        `mapstructure:"DETAILS_SERVER_ADDR"`
	DetailsServerRetryCount      int           `mapstructure:"DETAILS_SERVER_RETRY_COUNT"`
	DetailsServerRetryBackoff    time.Duration `mapstructure:"DETAILS_SERVER_RETRY_BACKOFF"`
	DetailsServerMaxRetryBackoff time.Duration `mapstructure:"DETAILS_SERVER_MAX_RETRY_BACKOFF"`
}

Config represents the application configuration.

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the application configuration from a .env file.

Jump to

Keyboard shortcuts

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