config

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 5 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 {
	IdemKeyTimeout int    `mapstructure:"IDEM_KEY_TIMEOUT" validate:"required"`
	DBSource       string `mapstructure:"DB_SOURCE"  validate:"required"`
	ServerAddress  string `mapstructure:"SERVER_ADDRESS"  validate:"required"`
	StripeKey      string `mapstructure:"STRIPE_KEY"  validate:"required"`
}

Config stores all configuration of the application. The values are read by viper from a config file or environment variable.

func Load

func Load() (config Config, err error)

Load reads configuration from file or environment variables.

func LoadFromPath

func LoadFromPath(cfgPath string) (config Config, err error)

LoadFromPath reads configuration from file or environment variables.

Jump to

Keyboard shortcuts

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