predicate

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const PolicyGroupPredicateType attestation.PredicateType = "https://carabiner.dev/ampel/policygroup/v0"
View Source
const PolicyPredicateType attestation.PredicateType = "https://carabiner.dev/ampel/policy/v0"
View Source
const PolicySetPredicateType attestation.PredicateType = "https://carabiner.dev/ampel/policyset/v0"

Variables

This section is empty.

Functions

This section is empty.

Types

type Policy

type Policy struct {
	Parsed *v1.Policy
	Data   []byte
	// contains filtered or unexported fields
}

Policy (or rather predicate.Policy) is a wrapper around the policy proto message that implements the ampel attestation predicate interface.

func (*Policy) GetData

func (p *Policy) GetData() []byte

GetData returns the policy data serialized as JSON.

func (*Policy) GetOrigin

func (p *Policy) GetOrigin() attestation.Subject

GetOrigin calls the underlying method of the same name

func (*Policy) GetParsed

func (p *Policy) GetParsed() any

GetParsed returns the Go policy object.

func (*Policy) GetType

func (p *Policy) GetType() attestation.PredicateType

func (*Policy) GetVerification

func (p *Policy) GetVerification() attestation.Verification

GetVerification returns the signature verification generated from the envelope parser. The verification may contain details about the integrity, identity and signature guarding the PolicySet.

func (*Policy) MarshalJSON added in v0.1.1

func (p *Policy) MarshalJSON() ([]byte, error)

MarshalJSON implements the JSON marshaler interface. It reuses any pre parsed data already stored in the predicate.

func (*Policy) SetOrigin

func (p *Policy) SetOrigin(origin attestation.Subject)

SetOrigin calls the underlting method of the same name

func (*Policy) SetType

func (p *Policy) SetType(attestation.PredicateType) error

func (*Policy) SetVerification

func (p *Policy) SetVerification(verification attestation.Verification)

SetVerification gets the signature verification data from the envelope parser before discarding the envelope. This is supposed the be stored for later retrieval.

type PolicyGroup added in v0.4.1

type PolicyGroup struct {
	Parsed *v1.PolicyGroup
	Data   []byte
	// contains filtered or unexported fields
}

Policy (or rather predicate.Policy) is a wrapper around the policy proto message that implements the ampel attestation predicate interface.

func (*PolicyGroup) GetData added in v0.4.1

func (grp *PolicyGroup) GetData() []byte

GetData returns the policy data serialized as JSON.

func (*PolicyGroup) GetOrigin added in v0.4.1

func (grp *PolicyGroup) GetOrigin() attestation.Subject

GetOrigin calls the underlying method of the same name

func (*PolicyGroup) GetParsed added in v0.4.1

func (grp *PolicyGroup) GetParsed() any

GetParsed returns the Go policy object.

func (*PolicyGroup) GetType added in v0.4.1

func (grp *PolicyGroup) GetType() attestation.PredicateType

func (*PolicyGroup) GetVerification added in v0.4.1

func (grp *PolicyGroup) GetVerification() attestation.Verification

GetVerification returns the signature verification generated from the envelope parser. The verification may contain details about the integrity, identity and signature guarding the PolicyGroup.

func (*PolicyGroup) MarshalJSON added in v0.4.1

func (grp *PolicyGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the JSON marshaler interface. It reuses any pre parsed data already stored in the predicate.

func (*PolicyGroup) SetOrigin added in v0.4.1

func (grp *PolicyGroup) SetOrigin(origin attestation.Subject)

SetOrigin calls the underlying method of the same name

func (*PolicyGroup) SetType added in v0.4.1

func (*PolicyGroup) SetVerification added in v0.4.1

func (grp *PolicyGroup) SetVerification(verification attestation.Verification)

SetVerification gets the signature verification data from the envelope parser before discarding the envelope. This is supposed the be stored for later retrieval.

type PolicySet

type PolicySet struct {
	Parsed *v1.PolicySet
	Data   []byte
	// contains filtered or unexported fields
}

PolicySet (predicate.Policy) is a wrapper around the policySet proto message that implements the ampel attestation predicate interface.

func (*PolicySet) GetData

func (set *PolicySet) GetData() []byte

GetData returns the PolicySet data serialized as JSON.

func (*PolicySet) GetOrigin

func (set *PolicySet) GetOrigin() attestation.Subject

GetOrigin calls the underlying method of the same name

func (*PolicySet) GetParsed

func (set *PolicySet) GetParsed() any

GetParsed returns the Go PolicySet object.

func (*PolicySet) GetType

func (set *PolicySet) GetType() attestation.PredicateType

func (*PolicySet) GetVerification

func (set *PolicySet) GetVerification() attestation.Verification

GetVerification returns the signature verification generated from the envelope parser. The verification may contain details about the integrity, identity and signature guarding the PolicySet.

func (*PolicySet) MarshalJSON added in v0.1.1

func (set *PolicySet) MarshalJSON() ([]byte, error)

MarshalJSON implements the JSON marshaler interface. It reuses any pre parsed data already stored in the predicate.

func (*PolicySet) SetOrigin

func (set *PolicySet) SetOrigin(origin attestation.Subject)

SetOrigin calls the underlting method of the same name

func (*PolicySet) SetType

func (set *PolicySet) SetType(attestation.PredicateType) error

func (*PolicySet) SetVerification

func (set *PolicySet) SetVerification(verification attestation.Verification)

SetVerification gets the signature verification data from the envelope parser before discarding the envelope. This is supposed the be stored for later retrieval.

Jump to

Keyboard shortcuts

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