Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockedError ¶
type BlockedError struct {
Score float64
Threshold float64
Families []string
Rules []string
Source string
}
func (*BlockedError) Error ¶
func (e *BlockedError) Error() string
type Evaluation ¶
type Evaluation struct {
Decision Decision `json:"decision"`
Score float64 `json:"score"`
PositiveScore float64 `json:"positive_score,omitempty"`
DampenScore float64 `json:"dampen_score,omitempty"`
Hits []Match `json:"hits"`
Threshold float64 `json:"threshold"`
ReviewThreshold float64 `json:"review_threshold,omitempty"`
DistinctFamilies int `json:"distinct_families,omitempty"`
Source string `json:"source,omitempty"`
OversizeBlocked bool `json:"oversize_blocked,omitempty"`
}
func (*Evaluation) Malicious ¶
func (e *Evaluation) Malicious() bool
type Guard ¶
type Guard struct {
// contains filtered or unexported fields
}
func (*Guard) EnsureSafe ¶
EnsureSafe는 입력이 악의적이면 에러를 반환한다.
func (*Guard) EnsureSafeFrom ¶
EnsureSafeFrom은 입력을 검사하고 리뷰 로깅용 source 태그를 부여한다.
func (*Guard) Evaluate ¶
func (g *Guard) Evaluate(input string) Evaluation
type TTLCache ¶
type TTLCache[K comparable, V any] struct { // contains filtered or unexported fields }
func NewTTLCache ¶
Click to show internal directories.
Click to hide internal directories.