@@ -99,6 +99,7 @@ type Root struct {
99
99
Expires time.Time `json:"expires"`
100
100
Keys map [string ]* PublicKey `json:"keys"`
101
101
Roles map [string ]* Role `json:"roles"`
102
+ Custom * json.RawMessage `json:"custom,omitempty"`
102
103
103
104
ConsistentSnapshot bool `json:"consistent_snapshot"`
104
105
}
@@ -171,11 +172,12 @@ type SnapshotFileMeta struct {
171
172
type SnapshotFiles map [string ]SnapshotFileMeta
172
173
173
174
type 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"`
179
181
}
180
182
181
183
func NewSnapshot () * Snapshot {
@@ -198,12 +200,13 @@ func (f TargetFileMeta) HashAlgorithms() []string {
198
200
}
199
201
200
202
type 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"`
207
210
}
208
211
209
212
// Delegations represents the edges from a parent Targets role to one or more
@@ -304,11 +307,12 @@ type TimestampFileMeta struct {
304
307
type TimestampFiles map [string ]TimestampFileMeta
305
308
306
309
type 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"`
312
316
}
313
317
314
318
func NewTimestamp () * Timestamp {
0 commit comments