iface

package
v2.13.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PoliciesRoot - path in config and status registry for policies results.
	PoliciesRoot = "policies"
)

Variables

View Source
var FxOptionsFuncTag = config.GroupTag("policy-fx-funcs")

FxOptionsFuncTag allows sub-modules to provide their options to per policy apps independently.

Functions

func GetSelectorsShortDescription

func GetSelectorsShortDescription(selectors []*policylangv1.Selector) string

GetSelectorsShortDescription returns a short description of the selectors.

Types

type Policy

type Policy interface {
	PolicyBase
	GetEvaluationInterval() time.Duration
	GetStatusRegistry() status.Registry
}

Policy is for read only access to full policy state.

type PolicyBase

type PolicyBase interface {
	GetPolicyName() string
	GetPolicyHash() string
}

PolicyBase is for read only access to base policy info.

type PolicyMessage added in v2.3.1

type PolicyMessage struct {
	*policylangv1.Policy
}

PolicyMessage is used for passing policies to be wrapped.

func (*PolicyMessage) MarshalJSON added in v2.3.1

func (m *PolicyMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*PolicyMessage) UnmarshalJSON added in v2.3.1

func (m *PolicyMessage) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

Jump to

Keyboard shortcuts

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