parse actions json into structs
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package internal
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type OptionMissingError struct {
|
||||
OptionName string
|
||||
@@ -10,12 +13,10 @@ func (o OptionMissingError) Error() string {
|
||||
return fmt.Sprintf("Error during config parsing: option %s could not be parsed.", o.OptionName)
|
||||
}
|
||||
|
||||
type Options map[string]interface{}
|
||||
|
||||
type ActionConfig struct {
|
||||
Type string `json:"type"`
|
||||
Options Options `json:"options"`
|
||||
Stage int `json:"stage"`
|
||||
Type string `json:"type"`
|
||||
Options json.RawMessage `json:"options"`
|
||||
Stage int `json:"stage"`
|
||||
}
|
||||
|
||||
type KillSwitchConfig struct {
|
||||
|
||||
Reference in New Issue
Block a user