mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-08-03 01:38:14 -04:00

* refactor: reorder import statements in fetch.go and fetch_test.go Signed-off-by: Jason Cameron <git@jasoncameron.dev> * fix: optimize struct field alignment to reduce memory usage Signed-off-by: Jason Cameron <git@jasoncameron.dev> --------- Signed-off-by: Jason Cameron <git@jasoncameron.dev>
20 lines
345 B
Go
20 lines
345 B
Go
package policy
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/TecharoHQ/anubis/internal"
|
|
"github.com/TecharoHQ/anubis/lib/policy/config"
|
|
)
|
|
|
|
type Bot struct {
|
|
Rules Checker
|
|
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()))
|
|
}
|