configs

package
v0.0.0-...-d4bccd0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Host        string `mapstructure:"APP_HOST"`
	Port        int    `mapstructure:"APP_PORT"`
	JWTSecret   string `mapstructure:"JWT_SECRET"`
	ApiEndpoint string `mapstructure:"API_ENDPOINT"`
	Database    struct {
		Driver   string `mapstructure:"DB_DRIVER"`
		Name     string `mapstructure:"DB_NAME"`
		Address  string `mapstructure:"DB_ADDRESS"`
		Port     int    `mapstructure:"DB_PORT"`
		Username string `mapstructure:"DB_USERNAME"`
		Password string `mapstructure:"DB_PASSWORD"`
	}
	Redis struct {
		Address  string `mapstructure:"REDIS_ADDRESS"`
		Port     int    `mapstructure:"REDIS_PORT"`
		Username string `mapstructure:"REDIS_USERNAME"`
		Password string `mapstructure:"REDIS_PASSWORD"`
	}
}

func GetConfig

func GetConfig() (*AppConfig, error)

Jump to

Keyboard shortcuts

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