INNER CODE UNIT · Go
auditEvent
alcideio/rbac-tool · cmd/auditgen_cmd.go:190
auditEvent := result.Obj.(*audit.Event)
klog.V(7).Infof("[%v]processing [eventId=%v]", auditEvent.User.Username, auditEvent.AuditID)
attrs := auditutil.EventToAttributes(auditEvent)
attributes, exist := attributesByUser[attrs.User.GetName()]
if !exist {
attributes = []authorizer.AttributesRecord{}
}
attributes = append(attributes, attrs)
attributesByUser[attrs.User.GetName()] = attributes
}
if len(attributesByUser) == 0 {
message := fmt.Sprintf("No audit events matched user %s", a.UserRegexFilter)
return fmt.Errorf(message)
}