MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Init

Method Init

internal/iplibrary/action_http_api.go:28–40  ·  view source on GitHub ↗
(config *firewallconfigs.FirewallActionConfig)

Source from the content-addressed store, hash-verified

26}
27
28func (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
42func (this *HTTPAPIAction) AddItem(listType IPListType, item *pb.IPItem) error {
43 return this.runAction("addItem", listType, item)

Callers

nothing calls this directly

Calls 2

NewFataErrorFunction · 0.85
convertParamsMethod · 0.80

Tested by

no test coverage detected