aboutsummaryrefslogtreecommitdiff
path: root/lib/checkresult.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/checkresult.go')
-rw-r--r--lib/checkresult.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/checkresult.go b/lib/checkresult.go
new file mode 100644
index 0000000..3803df2
--- /dev/null
+++ b/lib/checkresult.go
@@ -0,0 +1,25 @@
+package lib
+
+import (
+ "log/slog"
+
+ "github.com/TecharoHQ/anubis/lib/policy/config"
+)
+
+type CheckResult struct {
+ Name string
+ Rule config.Rule
+}
+
+func (cr CheckResult) LogValue() slog.Value {
+ return slog.GroupValue(
+ slog.String("name", cr.Name),
+ slog.String("rule", string(cr.Rule)))
+}
+
+func cr(name string, rule config.Rule) CheckResult {
+ return CheckResult{
+ Name: name,
+ Rule: rule,
+ }
+}