diff --git a/blobs.go b/blobs.go index b7583cc7b..a2718b02c 100644 --- a/blobs.go +++ b/blobs.go @@ -63,6 +63,10 @@ type Descriptor struct { // encoded as utf-8. MediaType string `json:"mediaType,omitempty"` + // ModTime modification time for the file. For backends that + // don't have a modification time this may represent the creation time + ModTime time.Time + // Digest uniquely identifies the content. A byte stream can be verified // against this digest. Digest digest.Digest `json:"digest,omitempty"` diff --git a/registry/storage/blobstore.go b/registry/storage/blobstore.go index 5f4344d08..b5daf32ee 100644 --- a/registry/storage/blobstore.go +++ b/registry/storage/blobstore.go @@ -199,6 +199,7 @@ func (bs *blobStatter) Stat(ctx context.Context, dgst digest.Digest) (distributi // for the specific repository. MediaType: "application/octet-stream", Digest: dgst, + ModTime: fi.ModTime(), }, nil }