config

package
v0.0.0-...-094c5f7 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoEnv = os.Getenv("GO_ENV")

Functions

This section is empty.

Types

type AwsConfig

type AwsConfig struct {
	AccessKeyId     string `json:"accesskeyid"`
	SecretAccessKey string `json:"secretaccesskey"`
	Region          string `json:"region"`
	BucketName      string `json:"bucketname"`
	BucketAcl       string `json:"bucketacl"`
	Enabled         bool   `json:"enabled"`
}

type CassandraConfig

type CassandraConfig struct {
	Hosts        string `json:"hosts"`
	Keyspace     string `json:"keyspace"`
	ProtoVersion int    `json:"ProtoVersion"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	Enabled      bool   `json:"enabled"`
}

type Configuration

type Configuration struct {
	Listen       string           `json:"listen"`
	Host         string           `json:"host"`
	UrlContext   string           `json:"url_context"`
	ContentPath  string           `json:"content_path"`
	Cert         string           `json:"cert"`
	Key          string           `json:"key"`
	Scheme       string           `json:"scheme"`
	Public       bool             `json:"public"`
	MetaDB       string           `json:"metadb"`
	BackingStore string           `json:"backing_store"`
	ContentStore string           `json:"content_store"`
	LogFile      string           `json:"logfile"`
	NumProcs     int              `json:"numprocs"`
	Aws          *AwsConfig       `json:"aws"`
	Cassandra    *CassandraConfig `json:"cassandra"`
	Ldap         *LdapConfig      `json:"ldap"`
	MySQL        *MySQLConfig     `json:"mysql"`
	Graphite     *GraphiteConfig  `json:"graphite"`
}

Configuration holds application configuration. Values will be pulled from environment variables, prefixed by keyPrefix. Default values can be added via tags.

func NewFromFile

func NewFromFile(configFile string) (*Configuration, error)

func (*Configuration) DumpConfig

func (c *Configuration) DumpConfig() map[string]interface{}

func (*Configuration) IsHTTPS

func (c *Configuration) IsHTTPS() bool

func (*Configuration) IsPublic

func (c *Configuration) IsPublic() bool

func (*Configuration) UseTLS

func (c *Configuration) UseTLS() bool

type GraphiteConfig

type GraphiteConfig struct {
	Endpoint       string `json:"endpoint"`
	Prefix         string `json:"prefix"`
	AppendHostname bool   `json:"append_hostname"`
	Enabled        bool   `json:"enabled"`
	Interval       string `json:"interval"`
	Timeout        string `json:"timeout"`
}

type LdapConfig

type LdapConfig struct {
	Enabled         bool   `json:"enabled"`
	Server          string `json:"server"`
	Base            string `json:"base"`
	UserObjectClass string `json:"userobjectclass"`
	UserCn          string `json:"usercn"`
	BindDn          string `json:"binddn"`
	BindPass        string `json:"bindpass"`
}

type MySQLConfig

type MySQLConfig struct {
	Host     string `json:"host"`
	Database string `json:"database"`
	Username string `json:"username"`
	Password string `json:"password"`
	Enabled  bool   `json:"enabled"`
}

Jump to

Keyboard shortcuts

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