feat(aa): add rule constructors from internal parser.

This commit is contained in:
Alexandre Pujol 2024-06-19 23:22:49 +01:00
parent ac9d6d859f
commit 163c5be61c
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
19 changed files with 456 additions and 75 deletions

View file

@ -23,6 +23,19 @@ type IOUring struct {
Label string
}
func newIOUring(q Qualifier, rule rule) (Rule, error) {
accesses, err := toAccess(IOURING, rule.GetString())
if err != nil {
return nil, err
}
return &IOUring{
RuleBase: newBase(rule),
Qualifier: q,
Access: accesses,
Label: rule.GetValuesAsString("label"),
}, nil
}
func newIOUringFromLog(log map[string]string) Rule {
return &IOUring{
RuleBase: newBaseFromLog(log),