Documentation ¶
Index ¶
- func AddDI(dimensionInfo string) (map[string]string, error)
- func AddFile(file string) error
- func AddKeyValue(key string, value interface{}) error
- func DeleteKeyValue(key string, value interface{}) error
- func Exist(key string) bool
- func Get(key string) interface{}
- func GetBool(key string, defaultValue bool) bool
- func GetConfigs() map[string]interface{}
- func GetConfigsByDI(dimensionInfo string) map[string]interface{}
- func GetFloat64(key string, defaultValue float64) float64
- func GetInt(key string, defaultValue int) int
- func GetString(key string, defaultValue string) string
- func GetStringByDI(dimensionInfo, key string, defaultValue string) string
- func Init() error
- func PathExist(_path string) bool
- func RegisterListener(listenerObj core.EventListener, key ...string) error
- func UnRegisterListener(listenerObj core.EventListener, key ...string) error
- func UnmarshalConfig(obj interface{}) error
- type Config
- type ConfigListener
- type EventListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddKeyValue ¶
AddKeyValue is for to add the configuration key, value pairs into the configfactory at run time
func DeleteKeyValue ¶
DeleteKeyValue is for to delete the configuration key, value pairs into the configfactory at run time
func GetConfigs ¶
func GetConfigs() map[string]interface{}
GetConfigs gives the information about all configurations
func GetConfigsByDI ¶
GetConfigsByDI is for to get the all configurations received dimensionInfo
func GetFloat64 ¶
GetFloat64 gives the key value in the form of float64
func GetStringByDI ¶
GetStringByDI is for to get the value of configuration key based on dimension info
func RegisterListener ¶
func RegisterListener(listenerObj core.EventListener, key ...string) error
RegisterListener to Register all listener for different key changes, each key could be a regular expression
func UnRegisterListener ¶
func UnRegisterListener(listenerObj core.EventListener, key ...string) error
UnRegisterListener is to remove the listener
func UnmarshalConfig ¶
func UnmarshalConfig(obj interface{}) error
UnmarshalConfig is for unmarshalling the configuraions of receiving object
Types ¶
type Config ¶
type Config struct { ConfigFiles []string ConfigFactory goarchaius.ConfigurationFactory }
Config is the struct of configuration files, and configuration factory
var DefaultConf *Config
DefaultConf is the variable having information about configuration files, and configuration factory
type ConfigListener ¶
type ConfigListener struct{}
ConfigListener is provides the object to listen the events
func (*ConfigListener) Event ¶
func (cl *ConfigListener) Event(e *core.Event)
Event is for to receive the events based on registered key and object pairs
type EventListener ¶
type EventListener struct { Name string Factory goarchaius.ConfigurationFactory }
EventListener is a struct having information about registering key and object
func (EventListener) Event ¶
func (e EventListener) Event(event *core.Event)
Event is invoked while generating events at run time