(config *firewallconfigs.FirewallActionConfig)
| 26 | } |
| 27 | |
| 28 | func (this *HTTPAPIAction) Init(config *firewallconfigs.FirewallActionConfig) error { |
| 29 | this.config = &firewallconfigs.FirewallActionHTTPAPIConfig{} |
| 30 | err := this.convertParams(config.Params, this.config) |
| 31 | if err != nil { |
| 32 | return err |
| 33 | } |
| 34 | |
| 35 | if len(this.config.URL) == 0 { |
| 36 | return NewFataError("'url' should not be empty") |
| 37 | } |
| 38 | |
| 39 | return nil |
| 40 | } |
| 41 | |
| 42 | func (this *HTTPAPIAction) AddItem(listType IPListType, item *pb.IPItem) error { |
| 43 | return this.runAction("addItem", listType, item) |
nothing calls this directly
no test coverage detected