mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-28 11:46:20 -04:00
15 lines
440 B
Go
15 lines
440 B
Go
package registry
|
|
|
|
// NotaryTimestamp returns a notary timestamp for a specific repository:tag.
|
|
func (r *Registry) NotaryTimestamp(repository, ref string) (interface{}, error) {
|
|
url := r.url("/v2/%s/%s/_trust/tuf/timestamp.json", r.Domain, repository)
|
|
r.Logf("registry.manifests url=%s repository=%s ref=%s", url, repository, ref)
|
|
|
|
var ts interface{}
|
|
_, err := r.getJSON(url, &ts)
|
|
if err != nil {
|
|
return ts, err
|
|
}
|
|
|
|
return ts, nil
|
|
}
|