rest

package
v0.0.74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL