From fbd5adde5abae6f7adb7fcdafc226bcd3480d498 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 17 Dec 2020 18:23:19 +0300 Subject: Move config interface to the interfaces folder. Initial redis plugin structure --- interfaces/config/interface.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 interfaces/config/interface.go (limited to 'interfaces/config/interface.go') diff --git a/interfaces/config/interface.go b/interfaces/config/interface.go new file mode 100755 index 00000000..00010eae --- /dev/null +++ b/interfaces/config/interface.go @@ -0,0 +1,19 @@ +package config + +type Configurer interface { + // UnmarshalKey reads configuration section into configuration object. + // + // func (h *HttpService) Init(cp config.Configurer) error { + // h.config := &HttpConfig{} + // if err := configProvider.UnmarshalKey("http", h.config); err != nil { + // return err + // } + // } + UnmarshalKey(name string, out interface{}) error + + // Get used to get config section + Get(name string) interface{} + + // Has checks if config section exists. + Has(name string) bool +} -- cgit v1.2.3