File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ type Descriptor struct {
3535 // Size specifies the size in bytes of the blob.
3636 Size int64 `json:"size"`
3737
38+ // Data specifies the data of the object described by the descriptor.
39+ Data []byte `json:"data"`
40+
3841 // NewUnspecifiedField is not covered by image-spec.
3942 // Registry implementations should still successfully store and serve
4043 // manifests containing this data.
Original file line number Diff line number Diff line change @@ -228,7 +228,8 @@ func init() {
228228 MediaType : "application/vnd.oci.image.config.v1+json" ,
229229 Digest : godigest .Digest (configs [i ].Digest ),
230230 Size : int64 (len (configs [i ].Content )),
231- NewUnspecifiedField : configs [i ].Content ,
231+ Data : configs [i ].Content , // must be the config content.
232+ NewUnspecifiedField : []byte ("hello world" ), // content doesn't matter.
232233 },
233234 Layers : layers ,
234235 }
@@ -258,7 +259,8 @@ func init() {
258259 MediaType : "application/vnd.oci.image.config.v1+json" ,
259260 Digest : godigest .Digest (configs [1 ].Digest ),
260261 Size : int64 (len (configs [1 ].Content )),
261- NewUnspecifiedField : configs [1 ].Content ,
262+ Data : configs [1 ].Content , // must be the config content.
263+ NewUnspecifiedField : []byte ("hello world" ), // content doesn't matter.
262264 },
263265 Layers : []Descriptor {},
264266 }
You can’t perform that action at this time.
0 commit comments