split actions/trigggers into seperate files
This commit is contained in:
26
internal/config.go
Normal file
26
internal/config.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package internal
|
||||
|
||||
import "fmt"
|
||||
|
||||
type OptionMissingError struct {
|
||||
OptionName string
|
||||
}
|
||||
|
||||
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 KillSwitchConfig struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Options Options `json:"options"`
|
||||
Actions []ActionConfig `json:"actions"`
|
||||
}
|
||||
Reference in New Issue
Block a user