diff options
Diffstat (limited to 'plugins/config/interface.go')
-rw-r--r-- | plugins/config/interface.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/config/interface.go b/plugins/config/interface.go index 2a7c67ce..23279f53 100644 --- a/plugins/config/interface.go +++ b/plugins/config/interface.go @@ -1,7 +1,7 @@ package config type Configurer interface { - // UnmarshalKey reads configuration section into configuration object. + // // UnmarshalKey takes a single key and unmarshals it into a Struct. // // func (h *HttpService) Init(cp config.Configurer) error { // h.config := &HttpConfig{} @@ -11,6 +11,10 @@ type Configurer interface { // } UnmarshalKey(name string, out interface{}) error + // Unmarshal unmarshals the config into a Struct. Make sure that the tags + // on the fields of the structure are properly set. + Unmarshal(out interface{}) error + // Get used to get config section Get(name string) interface{} |