chore: add comments back to Challenge struct. (#1419)

See #1284
and https://github.com/TecharoHQ/anubis/pull/1284#issuecomment-3784096905
This commit is contained in:
Jason Cameron 2026-01-22 09:52:15 -05:00 committed by GitHub
parent d622675edc
commit 23ec1b82a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,12 +4,12 @@ import "time"
// Challenge is the metadata about a single challenge issuance. // Challenge is the metadata about a single challenge issuance.
type Challenge struct { type Challenge struct {
IssuedAt time.Time `json:"issuedAt"` IssuedAt time.Time `json:"issuedAt"` // When the challenge was issued
Metadata map[string]string `json:"metadata"` Metadata map[string]string `json:"metadata"` // Challenge metadata such as IP address and user agent
ID string `json:"id"` ID string `json:"id"` // UUID identifying the challenge
Method string `json:"method"` Method string `json:"method"` // Challenge method
RandomData string `json:"randomData"` RandomData string `json:"randomData"` // The random data the client processes
PolicyRuleHash string `json:"policyRuleHash,omitempty"` PolicyRuleHash string `json:"policyRuleHash,omitempty"` // Hash of the policy rule that issued this challenge
Difficulty int `json:"difficulty,omitempty"` Difficulty int `json:"difficulty,omitempty"` // Difficulty that was in effect when issued
Spent bool `json:"spent"` Spent bool `json:"spent"` // Has the challenge already been solved?
} }