Add mod time to registry blob descriptor
This commit is contained in:
parent
39142f49ff
commit
0b6fdcfe1c
2 changed files with 5 additions and 0 deletions
4
blobs.go
4
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"`
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue