@@ -99,6 +99,7 @@ type Root struct {
9999 Expires time.Time `json:"expires"`
100100 Keys map [string ]* PublicKey `json:"keys"`
101101 Roles map [string ]* Role `json:"roles"`
102+ Custom * json.RawMessage `json:"custom,omitempty"`
102103
103104 ConsistentSnapshot bool `json:"consistent_snapshot"`
104105}
@@ -171,11 +172,12 @@ type SnapshotFileMeta struct {
171172type SnapshotFiles map [string ]SnapshotFileMeta
172173
173174type Snapshot struct {
174- Type string `json:"_type"`
175- SpecVersion string `json:"spec_version"`
176- Version int `json:"version"`
177- Expires time.Time `json:"expires"`
178- Meta SnapshotFiles `json:"meta"`
175+ Type string `json:"_type"`
176+ SpecVersion string `json:"spec_version"`
177+ Version int `json:"version"`
178+ Expires time.Time `json:"expires"`
179+ Meta SnapshotFiles `json:"meta"`
180+ Custom * json.RawMessage `json:"custom,omitempty"`
179181}
180182
181183func NewSnapshot () * Snapshot {
@@ -198,12 +200,13 @@ func (f TargetFileMeta) HashAlgorithms() []string {
198200}
199201
200202type Targets struct {
201- Type string `json:"_type"`
202- SpecVersion string `json:"spec_version"`
203- Version int `json:"version"`
204- Expires time.Time `json:"expires"`
205- Targets TargetFiles `json:"targets"`
206- Delegations * Delegations `json:"delegations,omitempty"`
203+ Type string `json:"_type"`
204+ SpecVersion string `json:"spec_version"`
205+ Version int `json:"version"`
206+ Expires time.Time `json:"expires"`
207+ Targets TargetFiles `json:"targets"`
208+ Delegations * Delegations `json:"delegations,omitempty"`
209+ Custom * json.RawMessage `json:"custom,omitempty"`
207210}
208211
209212// Delegations represents the edges from a parent Targets role to one or more
@@ -304,11 +307,12 @@ type TimestampFileMeta struct {
304307type TimestampFiles map [string ]TimestampFileMeta
305308
306309type Timestamp struct {
307- Type string `json:"_type"`
308- SpecVersion string `json:"spec_version"`
309- Version int `json:"version"`
310- Expires time.Time `json:"expires"`
311- Meta TimestampFiles `json:"meta"`
310+ Type string `json:"_type"`
311+ SpecVersion string `json:"spec_version"`
312+ Version int `json:"version"`
313+ Expires time.Time `json:"expires"`
314+ Meta TimestampFiles `json:"meta"`
315+ Custom * json.RawMessage `json:"custom,omitempty"`
312316}
313317
314318func NewTimestamp () * Timestamp {
0 commit comments