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

Function newSecretCommand

cli/command/secret/cmd.go:17–36  ·  view source on GitHub ↗

newSecretCommand returns a cobra command for `secret` subcommands.

(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

15
16// newSecretCommand returns a cobra command for `secret` subcommands.
17func newSecretCommand(dockerCLI command.Cli) *cobra.Command {
18 cmd := &cobra.Command{
19 Use: "secret",
20 Short: "Manage Swarm secrets",
21 Args: cli.NoArgs,
22 RunE: command.ShowHelp(dockerCLI.Err()),
23 Annotations: map[string]string{
24 "version": "1.25",
25 "swarm": "manager",
26 },
27 DisableFlagsInUseLine: true,
28 }
29 cmd.AddCommand(
30 newSecretListCommand(dockerCLI),
31 newSecretCreateCommand(dockerCLI),
32 newSecretInspectCommand(dockerCLI),
33 newSecretRemoveCommand(dockerCLI),
34 )
35 return cmd
36}
37
38// completeNames offers completion for swarm secrets
39func completeNames(dockerCLI completion.APIClientProvider) cobra.CompletionFunc {

Callers

nothing calls this directly

Calls 5

newSecretListCommandFunction · 0.85
newSecretCreateCommandFunction · 0.85
newSecretInspectCommandFunction · 0.85
newSecretRemoveCommandFunction · 0.85
ErrMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…