@@ -11,9 +11,9 @@ import (
1111)
1212
1313type ResultSet struct {
14- RVQ * []RefValQuad `cbor:"0,keyasint,omitempty"`
15- AKQ * []AKQuad `cbor:"3 ,keyasint,omitempty"`
16- // TODO(tho) add endorsed values
14+ RVQ * []RefValQuad `cbor:"0,keyasint,omitempty"`
15+ EVQ * []EndorsedValQuad `cbor:"1 ,keyasint,omitempty"`
16+ AKQ * [] AKQuad `cbor:"3,keyasint,omitempty"`
1717 // TODO(tho) add CoTS
1818 Expiry * time.Time `cbor:"10,keyasint"`
1919 SourceArtifacts * []cmw.CMW `cbor:"11,keyasint,omitempty"`
@@ -35,6 +35,17 @@ func (o *ResultSet) AddReferenceValues(v RefValQuad) *ResultSet {
3535 return o
3636}
3737
38+ // AddEndorsedValues adds the supplied endorsed-values quad to the target ResultSet
39+ func (o * ResultSet ) AddEndorsedValues (v EndorsedValQuad ) * ResultSet {
40+ if o .EVQ == nil {
41+ o .EVQ = new ([]EndorsedValQuad )
42+ }
43+
44+ * o .EVQ = append (* o .EVQ , v )
45+
46+ return o
47+ }
48+
3849// AddAttestationKeys adds the supplied ak quad to the target ResultSet
3950func (o * ResultSet ) AddAttestationKeys (v AKQuad ) * ResultSet {
4051 if o .AKQ == nil {
@@ -68,6 +79,7 @@ func (o ResultSet) Valid() error {
6879 if o .Expiry == nil {
6980 return errors .New ("missing mandatory expiry" )
7081 }
82+ // Nothing else to validate structurally here; combinations are checked at Coserv level
7183 // The coherency between query and results must be checked by the Coserv's
7284 // Valid()
7385 return nil
0 commit comments