Documentation
¶
Index ¶
- type GuardrailEngine
- func (e *GuardrailEngine) AddRequestRule(rule GuardrailRule)
- func (e *GuardrailEngine) AddResponseRule(rule GuardrailRule)
- func (e *GuardrailEngine) CheckRequest(input string) []GuardrailRule
- func (e *GuardrailEngine) CheckResponse(input string) []GuardrailRule
- func (e *GuardrailEngine) ListRequestRules() []GuardrailRule
- func (e *GuardrailEngine) ListResponseRules() []GuardrailRule
- func (e *GuardrailEngine) RedactTriggered(input string, triggered []GuardrailRule) string
- func (e *GuardrailEngine) StripRedundantLines(input string) string
- type GuardrailRule
- type GuardrailType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GuardrailEngine ¶
type GuardrailEngine struct {
// contains filtered or unexported fields
}
func NewGuardrailEngine ¶
func NewGuardrailEngine() *GuardrailEngine
func (*GuardrailEngine) AddRequestRule ¶
func (e *GuardrailEngine) AddRequestRule(rule GuardrailRule)
func (*GuardrailEngine) AddResponseRule ¶
func (e *GuardrailEngine) AddResponseRule(rule GuardrailRule)
func (*GuardrailEngine) CheckRequest ¶
func (e *GuardrailEngine) CheckRequest(input string) []GuardrailRule
func (*GuardrailEngine) CheckResponse ¶
func (e *GuardrailEngine) CheckResponse(input string) []GuardrailRule
func (*GuardrailEngine) ListRequestRules ¶
func (e *GuardrailEngine) ListRequestRules() []GuardrailRule
func (*GuardrailEngine) ListResponseRules ¶
func (e *GuardrailEngine) ListResponseRules() []GuardrailRule
func (*GuardrailEngine) RedactTriggered ¶
func (e *GuardrailEngine) RedactTriggered(input string, triggered []GuardrailRule) string
func (*GuardrailEngine) StripRedundantLines ¶
func (e *GuardrailEngine) StripRedundantLines(input string) string
type GuardrailRule ¶
type GuardrailRule struct {
ID string `json:"id"`
Type GuardrailType `json:"type"`
Pattern string `json:"pattern"`
Action string `json:"action"`
// contains filtered or unexported fields
}
type GuardrailType ¶
type GuardrailType string
const ( GuardrailRegex GuardrailType = "regex" GuardrailPII GuardrailType = "pii" GuardrailInject GuardrailType = "injection" GuardrailCustom GuardrailType = "custom" )
Click to show internal directories.
Click to hide internal directories.