Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GinMiddleware ¶
func GinMiddleware(agent *Agent) gin.HandlerFunc
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) CheckRequest ¶
func (a *Agent) CheckRequest(r *http.Request) ThreatResult
func (*Agent) SendTelemetry ¶
func (a *Agent) SendTelemetry(r *http.Request, result ThreatResult)
type Rule ¶
type Rule struct {
ID string `json:"id"`
Type string `json:"type"` // "ip", "user_agent", "path", "header"
Pattern string `json:"pattern"` // Value to match
Action string `json:"action"` // "block", "challenge", "allow"
Condition string `json:"condition"` // "equals", "contains", "regex"
Score int `json:"score"`
}
type RuleResponse ¶
type RuleResponse struct {
Rules []Rule `json:"rules"`
}
type ThreatResult ¶
Click to show internal directories.
Click to hide internal directories.