config

package
v0.0.0-...-3de1da0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2017 License: Apache-2.0 Imports: 5 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 {
	Version bool `short:"V" long:"version" description:"Display version."`

	Port int `short:"p" long:"port" description:"Port to listen on." default:"8080"`

	Log struct {
		Level  string `` /* 150-byte string literal not displayed */
		Format string `long:"log-format" description:"Set log format ('plain', 'json')." env:"TERRABOARD_LOG_FORMAT" default:"plain"`
	} `group:"Logging Options"`

	DB struct {
		Host     string `long:"db-host" env:"DB_HOST" description:"Database host." default:"db"`
		User     string `long:"db-user" env:"DB_USER" description:"Database user." default:"gorm"`
		Password string `long:"db-password" env:"DB_PASSWORD" description:"Database password."`
		Name     string `long:"db-name" env:"DB_NAME" description:"Database name." default:"gorm"`
		NoSync   bool   `long:"no-sync" description:"Do not sync database."`
	} `group:"Database Options"`

	S3 struct {
		Bucket        string `long:"s3-bucket" env:"AWS_BUCKET" description:"AWS S3 bucket."`
		DynamoDBTable string `long:"dynamodb-table" env:"AWS_DYNAMODB_TABLE" description:"AWS DynamoDB table for locks."`
		KeyPrefix     string `long:"key-prefix" env:"AWS_KEY_PREFIX" description:"AWS Key Prefix."`
	} `group:"AWS S3 Options"`

	Authentication struct {
		LogoutURL string `long:"logout-url" env:"TERRABOARD_LOGOUT_URL" description:"Logout URL."`
	} `group:"Authentication"`
}

Config stores the handler's configuration and UI interface parameters

func LoadConfig

func LoadConfig(version string) *Config

LoadConfig loads the config from flags & environment

func (Config) SetupLogging

func (c Config) SetupLogging() (err error)

SetupLogging sets up logging for Terraboard

Jump to

Keyboard shortcuts

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