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
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 (*Config) PushEnabled ¶
func (*Config) StatsEnabled ¶
Click to show internal directories.
Click to hide internal directories.