diff options
Diffstat (limited to 'plugins/config/plugin.go')
-rwxr-xr-x | plugins/config/plugin.go | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/plugins/config/plugin.go b/plugins/config/plugin.go index 58647eb8..918381c4 100755 --- a/plugins/config/plugin.go +++ b/plugins/config/plugin.go @@ -10,6 +10,8 @@ import ( "github.com/spiral/errors" ) +const PluginName string = "config" + type Viper struct { viper *viper.Viper Path string @@ -113,11 +115,27 @@ func (v *Viper) Has(name string) bool { return v.viper.IsSet(name) } -// Returns common config parameters +// GetCommonConfig Returns common config parameters func (v *Viper) GetCommonConfig() *General { return v.CommonConfig } +func (v *Viper) Serve() chan error { + return make(chan error, 1) +} + +func (v *Viper) Stop() error { + return nil +} + +// Name returns user-friendly plugin name +func (v *Viper) Name() string { + return PluginName +} + +// Available interface implementation +func (v *Viper) Available() {} + func parseFlag(flag string) (string, string, error) { const op = errors.Op("parse_flag") if !strings.Contains(flag, "=") { |