config

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2018 License: Apache-2.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 {
	Storage  string `flag:"storage" default:"s3" description:"Storage engine to use"`
	BaseURL  string `flag:"baseurl" env:"BASE_URL" description:"The Base-URL the application is running on for example https://mondash.org"`
	APIToken string `flag:"api-token" env:"API_TOKEN" description:"API Token used for the /welcome dashboard (you can choose your own)"`

	Listen string `flag:"listen" default:":3000" description:"Address to listen on"`

	S3 struct {
		Bucket string `flag:"s3Bucket" env:"S3Bucket" "Bucket to use for S3 storage"`
	}

	FileStorage struct {
		Directory string `flag:"fileDirectory" default:"./" description:"Directory to use for plain text storage"`
	}
}

Config is a storage struct for configuration parameters

func Load

func Load() *Config

Load parses arguments / ENV variable to load configuration

Jump to

Keyboard shortcuts

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