nuke/lib/policy/bot.go
fucksophie 02b9aebbe5
Some checks failed
Docker image builds / build (push) Failing after 4m22s
NUKE
2026-02-07 14:27:38 +02:00

21 lines
406 B
Go

package policy
import (
"fmt"
"git.sad.ovh/sophie/nuke/internal"
"git.sad.ovh/sophie/nuke/lib/config"
"git.sad.ovh/sophie/nuke/lib/policy/checker"
)
type Bot struct {
Rules checker.Impl
Challenge *config.ChallengeRules
Weight *config.Weight
Name string
Action config.Rule
}
func (b Bot) Hash() string {
return internal.FastHash(fmt.Sprintf("%s::%s", b.Name, b.Rules.Hash()))
}