MCPcopy
hub / github.com/evilsocket/opensnitch / NewOperator

Function NewOperator

daemon/rule/operator.go:97–106  ·  view source on GitHub ↗

NewOperator returns a new operator object

(t Type, s Sensitive, o Operand, data string, list []Operator)

Source from the content-addressed store, hash-verified

95
96// NewOperator returns a new operator object
97func NewOperator(t Type, s Sensitive, o Operand, data string, list []Operator) (*Operator, error) {
98 op := Operator{
99 Type: t,
100 Sensitive: s,
101 Operand: o,
102 Data: data,
103 List: list,
104 }
105 return &op, nil
106}
107
108// Compile translates the operator type field to its callback counterpart
109func (o *Operator) Compile() error {

Callers 15

DeserializeFunction · 0.70
TestNewOperatorSimpleFunction · 0.70
TestNewOperatorNetworkFunction · 0.70
TestNewOperatorRegexpFunction · 0.70
TestNewOperatorListFunction · 0.70
TestNewOperatorListsIPsFunction · 0.70
TestNewOperatorListsNETsFunction · 0.70

Calls

no outgoing calls