feat(aa): add a string method to all rule struct.
This commit is contained in:
parent
e9fa0660f8
commit
5483668574
20 changed files with 337 additions and 34 deletions
|
|
@ -4,6 +4,9 @@
|
|||
|
||||
package aa
|
||||
|
||||
const tokNETWORK = "network"
|
||||
|
||||
|
||||
type AddressExpr struct {
|
||||
Source string
|
||||
Destination string
|
||||
|
|
@ -76,3 +79,7 @@ func (r *Network) Equals(other any) bool {
|
|||
r.Protocol == o.Protocol && r.AddressExpr.Equals(o.AddressExpr) &&
|
||||
r.Qualifier.Equals(o.Qualifier)
|
||||
}
|
||||
|
||||
func (r *Network) String() string {
|
||||
return renderTemplate(tokNETWORK, r)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue