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

Function createTarget

cmd/docker-trust/trust/sign.go:151–160  ·  view source on GitHub ↗
(notaryRepo notaryclient.Repository, tag string)

Source from the content-addressed store, hash-verified

149}
150
151func createTarget(notaryRepo notaryclient.Repository, tag string) (notaryclient.Target, error) {
152 target := &notaryclient.Target{}
153 var err error
154 if tag == "" {
155 return *target, errors.New("no tag specified")
156 }
157 target.Name = tag
158 target.Hashes, target.Length, err = getSignedManifestHashAndSize(notaryRepo, tag)
159 return *target, err
160}
161
162func getSignedManifestHashAndSize(notaryRepo notaryclient.Repository, tag string) (data.Hashes, int64, error) {
163 targets, err := notaryRepo.GetAllTargetMetadataByName(tag)

Callers 2

runSignImageFunction · 0.85
TestCreateTargetFunction · 0.85

Calls 1

Tested by 1

TestCreateTargetFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…