checkresult.go 340 B

123456789101112131415161718192021
  1. package policy
  2. import (
  3. "log/slog"
  4. "github.com/TecharoHQ/anubis/lib/config"
  5. )
  6. type CheckResult struct {
  7. Name string
  8. Rule config.Rule
  9. Weight int
  10. }
  11. func (cr CheckResult) LogValue() slog.Value {
  12. return slog.GroupValue(
  13. slog.String("name", cr.Name),
  14. slog.String("rule", string(cr.Rule)),
  15. slog.Int("weight", cr.Weight),
  16. )
  17. }