config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigFileName       = "config.hcl"
	OutputFileName       = "decider.json"
	DefaultNamespace     = "dcdr"
	DefaultInfoNamespace = DefaultNamespace + "/" + "info"
	DefaultUsername      = "unknown"
	EnvConfigDirOverride = "DCDR_CONFIG_DIR"
	DefaultEndpoint      = "/dcdr.json"
	DefaultHost          = ":8000"
)

Variables

View Source
var ConfigDir = "/etc/dcdr"
View Source
var ExampleConfig = []byte(`
// Username = "dcdr admin"
// Namespace = "dcdr"

// Watcher {
//   OutputPath = "/etc/dcdr/decider.json"
// }

// Server {
//   JsonRoot = "dcdr"
//   Endpoint = "/dcdr.json"
// }

// Git {
//   RepoURL = "git@github.com:vsco/decider-test-config.git"
//   RepoPath = "/etc/dcdr/audit"
// }

// Stats {
//   Namespace = "decider"
//   Host = "127.0.0.1"
//   Port = 8126
// }`)

Functions

func OutputPath

func OutputPath() string

func Path

func Path() string

Types

type Config

type Config struct {
	Username  string
	Namespace string
	Watcher   Watcher
	Git       Git
	Stats     Stats
	Server    Server
}

func DefaultConfig

func DefaultConfig() *Config

func LoadConfig

func LoadConfig() *Config

func TestConfig

func TestConfig() *Config

func (*Config) GitEnabled

func (c *Config) GitEnabled() bool

func (*Config) PushEnabled

func (c *Config) PushEnabled() bool

func (*Config) StatsEnabled

func (c *Config) StatsEnabled() bool

type Git

type Git struct {
	RepoPath string
	RepoURL  string
}

type Server

type Server struct {
	Endpoint string
	Host     string
	JSONRoot string
}

type Stats

type Stats struct {
	Namespace string
	Host      string
	Port      int
}

type Watcher

type Watcher struct {
	OutputPath string
}

Jump to

Keyboard shortcuts

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