2017-10-09 13:44:52 -04:00
|
|
|
package trust
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/docker/cli/cli"
|
|
|
|
"github.com/docker/cli/cli/command"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
// newTrustKeyCommand returns a cobra command for `trust key` subcommands
|
|
|
|
func newTrustKeyCommand(dockerCli command.Streams) *cobra.Command {
|
|
|
|
cmd := &cobra.Command{
|
|
|
|
Use: "key",
|
2018-03-09 15:10:23 -05:00
|
|
|
Short: "Manage keys for signing Docker images",
|
2017-10-09 13:44:52 -04:00
|
|
|
Args: cli.NoArgs,
|
|
|
|
RunE: command.ShowHelp(dockerCli.Err()),
|
|
|
|
}
|
|
|
|
cmd.AddCommand(
|
|
|
|
newKeyGenerateCommand(dockerCli),
|
|
|
|
newKeyLoadCommand(dockerCli),
|
|
|
|
)
|
|
|
|
return cmd
|
|
|
|
}
|