MCPcopy Create free account
hub / github.com/docker/cli / getReleasedTargetHashAndSize

Function getReleasedTargetHashAndSize

cmd/docker-trust/trust/sign.go:170–177  ·  view source on GitHub ↗
(targets []notaryclient.TargetSignedStruct, tag string)

Source from the content-addressed store, hash-verified

168}
169
170func getReleasedTargetHashAndSize(targets []notaryclient.TargetSignedStruct, tag string) (data.Hashes, int64, error) {
171 for _, tgt := range targets {
172 if isReleasedTarget(tgt.Role.Name) {
173 return tgt.Target.Hashes, tgt.Target.Length, nil
174 }
175 }
176 return nil, 0, notaryclient.ErrNoSuchTarget(tag)
177}
178
179func getExistingSignatureInfoForReleasedTag(notaryRepo notaryclient.Repository, tag string) (trustTagRow, error) {
180 targets, err := notaryRepo.GetAllTargetMetadataByName(tag)

Callers 2

Calls 1

isReleasedTargetFunction · 0.85

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…