Skip to content

Commit

Permalink
feat(config): interface
Browse files Browse the repository at this point in the history
  • Loading branch information
StanGirard committed Sep 9, 2022
1 parent 5ce88a8 commit 098090d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions plugins/commons/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
)

type Config struct {
Plugins []Plugin `yaml:"plugins"`
AWS []AWS_Account `yaml:"aws"`
Ignore []Ignore `yaml:"ignore"`
PluginConfig []interface{} `yaml:"pluginsConfiguration"`
Plugins []Plugin `yaml:"plugins"`
AWS []AWS_Account `yaml:"aws"`
Ignore []Ignore `yaml:"ignore"`
PluginConfig []map[string]interface{} `yaml:"pluginsConfiguration"`
}

func ParseConfig(configFile string) (*Config, error) {
Expand Down
4 changes: 3 additions & 1 deletion plugins/manager/manager.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package manager

import (
"encoding/gob"
"log"
"os"
"os/exec"
Expand All @@ -13,10 +14,11 @@ import (

func RunPlugin(pluginInput commons.Plugin, c *commons.Config) []commons.Tests {
// Create an hclog.Logger
gob.Register(map[string]interface{}{})
logger := hclog.New(&hclog.LoggerOptions{
Name: "plugin",
Output: os.Stdout,
Level: hclog.Off,
Level: hclog.Debug,
})

// We're a host! Start by launching the plugin process.
Expand Down

0 comments on commit 098090d

Please sign in to comment.