internal

package
v0.0.0-...-6426190 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeMaps

func MergeMaps(maps ...map[string]string) map[string]string

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 *PluginConfig) *DataFetcher

func (DataFetcher) FetchData

func (df DataFetcher) FetchData() (map[string]any, error)

type PluginConfig

type PluginConfig struct {
	PolicyLabels map[string]string
}

func ParseConfig

func ParseConfig(raw map[string]string) (*PluginConfig, 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(ctx context.Context, input map[string]interface{}, policyPaths []string, policyData map[string]interface{}, labels map[string]string) ([]*proto.Evidence, 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.

Jump to

Keyboard shortcuts

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