Documentation
¶
Index ¶
- Constants
- type GuardAttachment
- type GuardAttributes
- type GuardFinding
- type GuardInput
- type GuardModel
- type GuardRequest
- type GuardResponse
- type Plugin
- func (p *Plugin) Execute(ctx context.Context, in appplugins.ExecInput) (*appplugins.Result, error)
- func (p *Plugin) MandatoryStages() []policy.Stage
- func (p *Plugin) MutatesMetadata() bool
- func (p *Plugin) MutatesRequestBody() bool
- func (p *Plugin) MutatesResponseBody() bool
- func (p *Plugin) Name() string
- func (p *Plugin) SupportedModes() []policy.Mode
- func (p *Plugin) SupportedStages() []policy.Stage
- func (p *Plugin) ValidateConfig(settings map[string]any) error
- type Settings
Constants ¶
View Source
const PluginName = "trustguard"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GuardAttachment ¶
type GuardAttributes ¶
type GuardAttributes struct {
ContentType string `json:"content_type"`
Model GuardModel `json:"model"`
}
type GuardFinding ¶
type GuardFinding struct {
DetectionType string `json:"detection_type,omitempty"`
Confidence float64 `json:"confidence,omitempty"`
RuleName string `json:"rule_name,omitempty"`
Status string `json:"status,omitempty"`
PolicyID string `json:"policy_id,omitempty"`
DetectorID string `json:"detector_id,omitempty"`
Action string `json:"action,omitempty"`
Details any `json:"details,omitempty"`
}
type GuardInput ¶
type GuardInput struct {
Input string `json:"input"`
Attachments []GuardAttachment `json:"attachments,omitempty"`
}
type GuardModel ¶
type GuardRequest ¶
type GuardRequest struct {
Input GuardInput `json:"input"`
Direction string `json:"direction"`
Protocol string `json:"protocol"`
GatewayID string `json:"gateway_id"`
SessionID string `json:"session_id"`
ConsumerID string `json:"consumer_id"`
Attributes GuardAttributes `json:"attributes"`
}
type GuardResponse ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) Execute ¶
func (p *Plugin) Execute(ctx context.Context, in appplugins.ExecInput) (*appplugins.Result, error)
func (*Plugin) MandatoryStages ¶
func (*Plugin) MutatesMetadata ¶
func (*Plugin) MutatesRequestBody ¶
func (*Plugin) MutatesResponseBody ¶
func (*Plugin) SupportedModes ¶
func (*Plugin) SupportedStages ¶
Click to show internal directories.
Click to hide internal directories.