rest

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 17 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"
)

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,
	pbuild *providers.ProviderBuilder,
) (*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(p *pb.Profile) interfaces.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