internal

package
v0.0.0-...-13432a3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringAddressed

func StringAddressed(str string) *string

Types

type DataFetcher

type DataFetcher struct {
	// contains filtered or unexported fields
}

func NewDataFetcher

func NewDataFetcher(logger hclog.Logger, config map[string]string) *DataFetcher

func (DataFetcher) FetchData

func (df DataFetcher) FetchData() (map[string]any, []*proto.Step, error)

type PolicyEvaluator

type PolicyEvaluator struct {
	// contains filtered or unexported fields
}

func NewPolicyEvaluator

func NewPolicyEvaluator(ctx context.Context, logger hclog.Logger, stepActivities []*proto.Activity) *PolicyEvaluator

func (*PolicyEvaluator) Eval

func (pe *PolicyEvaluator) Eval(data map[string]interface{}, policyPaths []string) (proto.ExecutionStatus, error)

Eval is used to run policies against the data you've collected. You could also consider an `EvalAndSend` by passing in the `apiHelper` that sends the observations directly to the API.

func (*PolicyEvaluator) GetFindings

func (pe *PolicyEvaluator) GetFindings() []*proto.Finding

func (*PolicyEvaluator) GetObservations

func (pe *PolicyEvaluator) GetObservations() []*proto.Observation

Jump to

Keyboard shortcuts

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