config

package
v0.0.1-rc4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 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"`
	DatabaseURL string `json:"database_url" envconfig:"DATABASE_URL" required:"true"`
	Address     string `json:"address" envconfig:"ADDRESS" default:"127.0.0.1:8085"`

	// Embedded Scheduler
	EnableScheduler        bool   `json:"enable_scheduler" envconfig:"ENABLE_SCHEDULER"`
	SchedulerInitialConfig string `json:"scheduler_initial_config_path" envconfig:"SCHEDULER_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