2017-08-24 18:43:55 -04:00
|
|
|
package trust
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/docker/cli/cli"
|
|
|
|
"github.com/docker/cli/cli/command"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
// NewTrustCommand returns a cobra command for `trust` subcommands
|
|
|
|
func NewTrustCommand(dockerCli command.Cli) *cobra.Command {
|
|
|
|
cmd := &cobra.Command{
|
2017-12-20 09:04:41 -05:00
|
|
|
Use: "trust",
|
|
|
|
Short: "Manage trust on Docker images (experimental)",
|
|
|
|
Args: cli.NoArgs,
|
|
|
|
RunE: command.ShowHelp(dockerCli.Err()),
|
|
|
|
Annotations: map[string]string{"experimentalCLI": ""},
|
2017-08-24 18:43:55 -04:00
|
|
|
}
|
|
|
|
cmd.AddCommand(
|
|
|
|
newRevokeCommand(dockerCli),
|
|
|
|
newSignCommand(dockerCli),
|
2017-10-09 13:44:52 -04:00
|
|
|
newTrustKeyCommand(dockerCli),
|
|
|
|
newTrustSignerCommand(dockerCli),
|
2017-11-15 14:50:33 -05:00
|
|
|
newInspectCommand(dockerCli),
|
2017-08-24 18:43:55 -04:00
|
|
|
)
|
|
|
|
return cmd
|
|
|
|
}
|