config

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromEnv

func FromEnv(config *Config) error

FromEnv reads the config from environment variables

func FromFile

func FromFile(path string, config *Config) error

FromFile reads the config from a file

func VersionString

func VersionString() string

VersionString returns the full app version string

Types

type Config

type Config struct {
	AppEnv  string `json:"app_env" envconfig:"APP_ENV" default:"development"`
	Address string `json:"address" envconfig:"ADDRESS" default:"0.0.0.0"`
	Port    string `json:"port" envconfig:"PORT" default:"3000"`

	Managers string `json:"managers" envconfig:"MANAGERS" default:"127.0.0.1:8085"`
	Hostname string `json:"hostname" envconfig:"HOSTNAME"`

	DatabaseURL string `json:"database_url" envconfig:"DATABASE_URL" required:"true"`

	InitialConfig string `json:"initial_config_path" envconfig:"INITIAL_CONFIG"`
}

Config holds the configuration data

Jump to

Keyboard shortcuts

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