cli/pkg/cmd/attestation/attestation.go
Meredith Lancaster 56261d7bcb rename command
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-03-05 16:20:45 -07:00

40 lines
1.1 KiB
Go

package attestation
import (
"github.com/cli/cli/v2/pkg/cmd/attestation/artifact/oci"
"github.com/cli/cli/v2/pkg/cmd/attestation/download"
"github.com/cli/cli/v2/pkg/cmd/attestation/inspect"
"github.com/cli/cli/v2/pkg/cmd/attestation/tufrootverify"
"github.com/cli/cli/v2/pkg/cmd/attestation/verify"
"github.com/cli/cli/v2/pkg/cmdutil"
"github.com/MakeNowJust/heredoc"
"github.com/spf13/cobra"
)
func NewCmdAttestation(f *cmdutil.Factory) *cobra.Command {
root := &cobra.Command{
Use: "attestation [subcommand]",
Short: "Work with attestations",
Aliases: []string{"at"},
Long: heredoc.Docf(`
Work with attestations that represent trusted metadata about artifacts and images.
The %[1]sattestation%[1]s command and all subcommands support the following account types:
* Free tier
* Pro tier
* Team tier
* GHEC
* GHEC EMU
`, "`"),
}
ociClient := oci.NewLiveClient()
root.AddCommand(download.NewDownloadCmd(f, ociClient))
root.AddCommand(inspect.NewInspectCmd(f, ociClient))
root.AddCommand(verify.NewVerifyCmd(f, ociClient))
root.AddCommand(tufrootverify.NewTUFRootVerifyCmd(f))
return root
}