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

Method Init

internal/iplibrary/action_script.go:23–35  ·  view source on GitHub ↗
(config *firewallconfigs.FirewallActionConfig)

Source from the content-addressed store, hash-verified

21}
22
23func (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
37func (this *ScriptAction) AddItem(listType IPListType, item *pb.IPItem) error {
38 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