Give ban causes, limit kinds, alert events, actions and dispositions named types (closes #428)
check / check (push) Failing after 5m25s
check / check (push) Failing after 5m25s
Each fixed set of string constants becomes a named string type in the package that owns it, and the fields and parameters that carry it use the type: bans.Cause, ratelimit.LimitKind, alerts.Event, alerts.DestinationName, rules.Action, requestlog.Action, requestlog.Offence, requestlog.WAFLineKind and waf.Disposition. Every value keeps its string, so the logs, state files, alerts and metrics do not change. The switches exhaustive now checks list their missing cases. Model: opus-5-5
This commit is contained in:
1 parent
40386dce6e
commit
d0264ff6a7
41 files changed
+358
-248
No files matched your search
@@ -184,7 +184,7 @@ func TestRateLimitExemptNetsAreNeitherCountedNorRefused(t *testing.T) {
|
||||
type sentRequest struct {
|
||||
client string
|
||||
status int
|
||||
action string
|
||||
action requestlog.Action
|
||||
}
|
||||
|
||||
// wantAnswers sends requests to sww at addr one after another and
|
||||
|
||||
Reference in new issue
Block a user