config

package
v2.0.0-...-2642f33 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: MIT Imports: 1 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 {
	AppName    string `envconfig:"APP_NAME" default:"go-papyrus"`
	AppEnv     string `envconfig:"ENVIRONMENT" required:"true"`
	Port       int    `envconfig:"API_PORT" default:"80"`
	Version    string `envconfig:"VERSION"`
	LogChannel string `envconfig:"LOG_CHANNEL" default:"go-papyrus-api"`
	LogLevel   string `envconfig:"LOG_LEVEL" default:"error"`
}

APIConfig API InternalConfig - InternalConfigSource specifies the source for internal configs - file or datastore nolint: lll

func New

func New() *APIConfig

New bare API config struct

func (*APIConfig) LoadConfigFromEnv

func (ac *APIConfig) LoadConfigFromEnv() error

LoadConfigFromEnv Loads configuration from OS.Env

Jump to

Keyboard shortcuts

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