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

Function removeSigner

cmd/docker-trust/trust/signer_remove.go:42–55  ·  view source on GitHub ↗
(ctx context.Context, dockerCLI command.Cli, options signerRemoveOptions)

Source from the content-addressed store, hash-verified

40}
41
42func removeSigner(ctx context.Context, dockerCLI command.Cli, options signerRemoveOptions) error {
43 var errRepos []string
44 for _, repo := range options.repos {
45 _, _ = fmt.Fprintf(dockerCLI.Out(), "Removing signer \"%s\" from %s...\n", options.signer, repo)
46 if _, err := removeSingleSigner(ctx, dockerCLI, repo, options.signer, options.forceYes); err != nil {
47 _, _ = fmt.Fprintln(dockerCLI.Err(), err.Error()+"\n")
48 errRepos = append(errRepos, repo)
49 }
50 }
51 if len(errRepos) > 0 {
52 return fmt.Errorf("error removing signer from: %s", strings.Join(errRepos, ", "))
53 }
54 return nil
55}
56
57func isLastSignerForReleases(roleWithSig data.Role, allRoles []client.RoleWithSignatures) (bool, error) {
58 var releasesRoleWithSigs client.RoleWithSignatures

Callers 3

newSignerRemoveCommandFunction · 0.85

Calls 4

removeSingleSignerFunction · 0.85
OutMethod · 0.65
ErrMethod · 0.65
ErrorMethod · 0.45

Tested by 2

Used in the wild real call sites across dependent graphs

searching dependent graphs…