Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alert ¶
type Alert struct {
Provider string `json:"provider"`
MatchedRules []string `json:"matched_rules"`
}
Alert holds the result of a content-safety scan that detected issues.
type Provider ¶
type Provider interface {
Name() string
Scan(ctx context.Context, req ScanRequest) (*Alert, error)
}
Provider scans parsed response data for content-safety issues. Implementations must be safe for concurrent use.
func GetProvider ¶
func GetProvider() Provider
GetProvider returns the currently registered Provider. Returns nil if no provider has been registered.
Click to show internal directories.
Click to hide internal directories.