(config *firewallconfigs.FirewallActionConfig)
| 21 | } |
| 22 | |
| 23 | func (this *ScriptAction) Init(config *firewallconfigs.FirewallActionConfig) error { |
| 24 | this.config = &firewallconfigs.FirewallActionScriptConfig{} |
| 25 | err := this.convertParams(config.Params, this.config) |
| 26 | if err != nil { |
| 27 | return err |
| 28 | } |
| 29 | |
| 30 | if len(this.config.Path) == 0 { |
| 31 | return NewFataError("'path' should not be empty") |
| 32 | } |
| 33 | |
| 34 | return nil |
| 35 | } |
| 36 | |
| 37 | func (this *ScriptAction) AddItem(listType IPListType, item *pb.IPItem) error { |
| 38 | return this.runAction("addItem", listType, item) |
nothing calls this directly
no test coverage detected