Documentation
¶
Index ¶
- Constants
- type Policy
- func (p *Policy) GetData() []byte
- func (p *Policy) GetOrigin() attestation.Subject
- func (p *Policy) GetParsed() any
- func (p *Policy) GetType() attestation.PredicateType
- func (p *Policy) GetVerification() attestation.Verification
- func (p *Policy) MarshalJSON() ([]byte, error)
- func (p *Policy) SetOrigin(origin attestation.Subject)
- func (p *Policy) SetType(attestation.PredicateType) error
- func (p *Policy) SetVerification(verification attestation.Verification)
- type PolicyGroup
- func (grp *PolicyGroup) GetData() []byte
- func (grp *PolicyGroup) GetOrigin() attestation.Subject
- func (grp *PolicyGroup) GetParsed() any
- func (grp *PolicyGroup) GetType() attestation.PredicateType
- func (grp *PolicyGroup) GetVerification() attestation.Verification
- func (grp *PolicyGroup) MarshalJSON() ([]byte, error)
- func (grp *PolicyGroup) SetOrigin(origin attestation.Subject)
- func (grp *PolicyGroup) SetType(attestation.PredicateType) error
- func (grp *PolicyGroup) SetVerification(verification attestation.Verification)
- type PolicySet
- func (set *PolicySet) GetData() []byte
- func (set *PolicySet) GetOrigin() attestation.Subject
- func (set *PolicySet) GetParsed() any
- func (set *PolicySet) GetType() attestation.PredicateType
- func (set *PolicySet) GetVerification() attestation.Verification
- func (set *PolicySet) MarshalJSON() ([]byte, error)
- func (set *PolicySet) SetOrigin(origin attestation.Subject)
- func (set *PolicySet) SetType(attestation.PredicateType) error
- func (set *PolicySet) SetVerification(verification attestation.Verification)
Constants ¶
const PolicyGroupPredicateType attestation.PredicateType = "https://carabiner.dev/ampel/policygroup/v0"
const PolicyPredicateType attestation.PredicateType = "https://carabiner.dev/ampel/policy/v0"
const PolicySetPredicateType attestation.PredicateType = "https://carabiner.dev/ampel/policyset/v0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
Policy (or rather predicate.Policy) is a wrapper around the policy proto message that implements the ampel attestation predicate interface.
func (*Policy) GetOrigin ¶
func (p *Policy) GetOrigin() attestation.Subject
GetOrigin calls the underlying method of the same name
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
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 (grp *PolicyGroup) SetType(attestation.PredicateType) error
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) GetOrigin ¶
func (set *PolicySet) GetOrigin() attestation.Subject
GetOrigin calls the underlying method of the same name
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
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.