config

package
v0.0.0-...-3beaeaf Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	Environment        string   `mapstructure:"ENV"`
	Port               string   `mapstructure:"PORT"`
	BaseURL            string   `mapstructure:"BASE_URL"`
	AllowedCORSDomains []string `mapstructure:"ALLOWED_CORS_DOMAINS"`
}

type AppConfig

type AppConfig struct {
	API      *APIConfig      `mapstructure:"API"`
	Gin      *GinConfig      `mapstructure:"GIN"`
	Postgres *PostgresConfig `mapstructure:"POSTGRES"`
}

func Load

func Load(configFile string) (*AppConfig, error)

type GinConfig

type GinConfig struct {
	Mode string `mapstructure:"MODE"`
}

type PostgresConfig

type PostgresConfig struct {
	Host     string `mapstructure:"HOST"`
	Port     string `mapstructure:"PORT"`
	User     string `mapstructure:"USER"`
	Password string `mapstructure:"PASSWORD"`
	DB       string `mapstructure:"DB"`
	LogLevel string `mapstructure:"LOG_LEVEL"`
}

Jump to

Keyboard shortcuts

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