config

package
v0.0.0-...-e3979bd Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2014 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DefaultConfigFileName = "crucible.conf"
)

Variables

View Source
var DefaultConfigPaths = [...]string{
	"/etc/crucible/",
	"/usr/local/etc/crucible/",
	"~/",
	"~/Dev/",
	"./"}

Functions

func LoadConfig

func LoadConfig(path string) error

func LoadDefaultConfig

func LoadDefaultConfig() error

Types

type ConfigError

type ConfigError struct {
	ConfigFile string
	What       string
	Err        string
}

func (*ConfigError) Error

func (e *ConfigError) Error() string

type CrucibleConfiguration

type CrucibleConfiguration struct {
	HttpPort      int
	HttpsPort     int
	WorkerThreads int
	RootContext   string
	CoreLogger    *LoggerConfig
	DataSources   map[string]*DataSourceConfiguration
	Services      map[string]*ServiceConfiguration
}

func (*CrucibleConfiguration) String

func (c *CrucibleConfiguration) String() (s string)

type DataSourceConfiguration

type DataSourceConfiguration struct {
	ServerName   string
	ServerPort   int
	DatabaseName string
}

func (*DataSourceConfiguration) String

func (d *DataSourceConfiguration) String() (s string)

type LoggerConfig

type LoggerConfig struct {
	Level    logging.LogLevel
	FileName string
}

type ServiceConfiguration

type ServiceConfiguration struct {
	Location       string
	AllowedOrigins map[string]bool
	AllowedMethods map[string]bool
}

func (*ServiceConfiguration) String

func (c *ServiceConfiguration) String() (s string)

Jump to

Keyboard shortcuts

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