equivalence

package
v0.8.32 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EquivalenceChecker

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

EquivalenceChecker determines whether two EnterpriseContractPolicy specs produce the same evaluation result for a given image at a specific time.

func NewEquivalenceChecker

func NewEquivalenceChecker(effectiveTime time.Time, imageInfo *ImageInfo) *EquivalenceChecker

NewEquivalenceChecker creates a new equivalence checker with the given effective time and optional image information.

func (*EquivalenceChecker) AreEquivalent

func (ec *EquivalenceChecker) AreEquivalent(spec1, spec2 ecc.EnterpriseContractPolicySpec) (bool, error)

AreEquivalent determines if two EnterpriseContractPolicy specs are equivalent for the given effective time and image.

type ImageInfo

type ImageInfo struct {
	Digest string
	Ref    string
	URL    string
}

ImageInfo represents information about an image for volatile config matching

type NormalizedPolicy

type NormalizedPolicy struct {
	Buckets []PolicyBucket
}

NormalizedPolicy represents a policy spec after normalization

type PolicyBucket

type PolicyBucket struct {
	PolicyURIs []string
	DataURIs   []string
	RuleData   map[string]interface{}
	Include    []string
	Exclude    []string
}

PolicyBucket represents a group of sources with identical policy and data sets

Jump to

Keyboard shortcuts

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