mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-05 08:18:17 +00:00
21 lines
400 B
Go
21 lines
400 B
Go
package policy
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/TecharoHQ/anubis/internal"
|
|
"github.com/TecharoHQ/anubis/lib/policy/checker"
|
|
"github.com/TecharoHQ/anubis/lib/policy/config"
|
|
)
|
|
|
|
type Bot struct {
|
|
Rules checker.Impl
|
|
Challenge *config.ChallengeRules
|
|
Name string
|
|
Action config.Rule
|
|
}
|
|
|
|
func (b Bot) Hash() string {
|
|
return internal.SHA256sum(fmt.Sprintf("%s::%s", b.Name, b.Rules.Hash()))
|
|
}
|