config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: GPL-3.0 Imports: 3 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 {
	Environment string `default:"prod"`

	APIAddress string `default:"http://localhost:8082" split_words:"true"`
	APIKey     string `split_words:"true"`

	FeedMETARs bool `envconfig:"feed_metars"`
}

Config represents the application configuration structure

func LoadFromEnv

func LoadFromEnv() (*Config, error)

LoadFromEnv loads a new configuration structure using environment variables and an optional .env file

func (*Config) IsEnvProduction

func (config *Config) IsEnvProduction() bool

IsEnvProduction returns whether the application runs in production environment

Jump to

Keyboard shortcuts

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