Versions in this module Expand all Collapse all v0 v0.0.1 Nov 11, 2013 Changes in this version + var NoSource = Source + type Conf interface + Get func(key string) string + Keys func() []string + Set func(key, val string) (oldval string) + type ConfSourcer interface + Source func() string + SourceGet func(key string) (value string, src Source) + func ConfFromJar(jar string, file string) (ConfSourcer, error) + func ConfsFromJar(jar string, files ...string) ([]ConfSourcer, error) + type ConfWithDefault struct + Conf ConfSourcer + Default ConfSourcer + func (cwd *ConfWithDefault) Get(key string) (value string) + func (cwd *ConfWithDefault) Keys() []string + func (cwd *ConfWithDefault) Set(key, value string) (oldval string) + func (cwd *ConfWithDefault) Source() string + func (cwd *ConfWithDefault) SourceGet(key string) (value string, src Source) + type Configuration struct + Property []*Property + XMLName xml.Name + func NewConfigurationFromByte(b []byte) (*Configuration, error) + func NewConfigurationFromFile(path string) (*Configuration, error) + func NewConfigurationFromString(txt string) (*Configuration, error) + func (c *Configuration) Bytes() []byte + func (c *Configuration) Get(key string) string + func (c *Configuration) Set(key, val string) (oldval string) + func (c *Configuration) String() string + type Env struct + Path string + Vars []*Var + func NewEnvFromFile(path string) (*Env, error) + func (env *Env) Get(name string) *Var + func (env *Env) GetValue(name string) string + func (env *Env) Keys() []string + func (env *Env) Save() error + type Envs []*Env + func NewEnv(path string) (Envs, error) + func (envs Envs) Get(name string) *Var + func (envs Envs) Keys() []string + func (envs Envs) Save() error + type FileConfiguration struct + Path string + func NewFileConfiguration(path string) (*FileConfiguration, error) + func (fc *FileConfiguration) Keys() []string + func (fc *FileConfiguration) Save() error + func (fc *FileConfiguration) Set(key, val string) (oldval string) + func (fc *FileConfiguration) Source() string + func (fc *FileConfiguration) SourceGet(key string) (value string, source Source) + type GeneratedConf struct + ConfSource Source + func NewGeneratedConf(source Source, conf *Configuration) *GeneratedConf + func NewGeneratedConfFromBytes(source Source, b []byte) (*GeneratedConf, error) + func NewGeneratedConfFromString(source Source, s string) (*GeneratedConf, error) + func (gc *GeneratedConf) Keys() []string + func (gc *GeneratedConf) Source() string + func (gc *GeneratedConf) SourceGet(key string) (value string, source Source) + type HadoopConf struct + CoreSite *ConfWithDefault + HdfsSite *ConfWithDefault + MapredSite *ConfWithDefault + YarnSite *ConfWithDefault + func FromConf(coreSite *ConfWithDefault, hdfsSite *ConfWithDefault, ...) *HadoopConf + func New(basedir string, defaultConf *HadoopDefaultConf) (conf *HadoopConf, err error) + func (c *HadoopConf) Save() error + func (msc HadoopConf) Keys() []string + func (msc HadoopConf) SetIfExist(key, value string) (oldval string, src ConfSourcer) + func (msc HadoopConf) SourceGet(key string) (string, Source) + type HadoopDefaultConf struct + CoreSite ConfSourcer + HdfsSite ConfSourcer + MapredSite ConfSourcer + YarnSite ConfSourcer + func Jars(basedir string) (*HadoopDefaultConf, error) + type Property struct + Description string + Name string + Value string + type Source struct + Source string + SourceType SourceType + type SourceType int + const FileFromJar + const Generated + const LocalFile + type Var struct + Name string + Source string + Val string + func (v *Var) Append(tok string) + func (v *Var) Del(val string) + func (v *Var) Prepend(tok string) + func (v *Var) Update(update, newval string)