Documentation ¶
Overview ¶
Package rest provides the REST remediation engine
Index ¶
Constants ¶
View Source
const ( // RemediateType is the type of the REST remediation engine RemediateType = "rest" // EndpointBytesLimit is the maximum number of bytes for the endpoint EndpointBytesLimit = 1024 // BodyBytesLimit is the maximum number of bytes for the body BodyBytesLimit = 5120 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointTemplateParams ¶
type EndpointTemplateParams struct { // Entity is the entity to be evaluated Entity any // Profile is the parameters to be used in the template Profile map[string]any // Params are the rule instance parameters Params map[string]any }
EndpointTemplateParams is the parameters for the REST endpoint template
type Remediator ¶
type Remediator struct {
// contains filtered or unexported fields
}
Remediator keeps the status for a rule type that uses REST remediation
func NewRestRemediate ¶
func NewRestRemediate(actionType interfaces.ActionType, restCfg *pb.RestType, cli provifv1.REST) (*Remediator, error)
NewRestRemediate creates a new REST rule data ingest engine
func (*Remediator) Class ¶
func (r *Remediator) Class() interfaces.ActionType
Class returns the action type of the remediation engine
func (*Remediator) Do ¶
func (r *Remediator) Do( ctx context.Context, cmd interfaces.ActionCmd, setting models.ActionOpt, entity protoreflect.ProtoMessage, params interfaces.ActionsParams, _ *json.RawMessage, ) (json.RawMessage, error)
Do perform the remediation
func (*Remediator) GetOnOffState ¶
func (_ *Remediator) GetOnOffState(actionOpt models.ActionOpt) models.ActionOpt
GetOnOffState returns the alert action state read from the profile
func (*Remediator) Type ¶
func (_ *Remediator) Type() string
Type returns the action subtype of the remediation engine
Click to show internal directories.
Click to hide internal directories.