This commit is contained in:
@@ -1,7 +1,19 @@
|
||||
package actions
|
||||
|
||||
type Action struct {
|
||||
Name string
|
||||
Type string
|
||||
Args []string
|
||||
import "github.com/d3m0k1d/BanForge/internal/config"
|
||||
|
||||
type Executor struct {
|
||||
Action config.Action
|
||||
}
|
||||
|
||||
func (e *Executor) Execute() error {
|
||||
switch e.Action.Type {
|
||||
case "email":
|
||||
return SendEmail(e.Action)
|
||||
case "webhook":
|
||||
return SendWebhook(e.Action)
|
||||
case "script":
|
||||
return RunScript(e.Action)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user