cmd

package
v0.1.3-0...-0b0730e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Root is the top-level cobra.Command for crane.
	Root = &cobra.Command{
		Use:               "crane",
		Short:             "Crane is a tool for managing container images",
		Run:               func(cmd *cobra.Command, _ []string) { cmd.Usage() },
		DisableAutoGenTag: true,
		PersistentPreRun: func(cmd *cobra.Command, args []string) {
			if verbose {
				logs.Debug.SetOutput(os.Stderr)
			}
			if insecure {
				options = append(options, crane.Insecure)
			}

			cf, err := config.Load(os.Getenv("DOCKER_CONFIG"))
			if err != nil {
				logs.Debug.Printf("failed to read config file: %v", err)
			} else if len(cf.HTTPHeaders) != 0 {
				options = append(options, crane.WithTransport(&headerTransport{
					inner:       http.DefaultTransport,
					httpHeaders: cf.HTTPHeaders,
				}))
			}
		},
	}
)
View Source
var Version string

Version can be set via: -ldflags="-X 'github.com/google/go-containerregistry/cmd/crane/cmd.Version=$TAG'"

Functions

func NewCmdAppend

func NewCmdAppend() *cobra.Command

NewCmdAppend creates a new cobra.Command for the append subcommand.

func NewCmdAuth

func NewCmdAuth() *cobra.Command

NewCmdAuth creates a new cobra.Command for the auth subcommand.

func NewCmdAuthGet

func NewCmdAuthGet() *cobra.Command

NewCmdAuthGet creates a new `crane auth get` command.

func NewCmdAuthLogin

func NewCmdAuthLogin() *cobra.Command

NewCmdAuthLogin creates a new `crane auth login` command.

func NewCmdBlob

func NewCmdBlob() *cobra.Command

NewCmdBlob creates a new cobra.Command for the blob subcommand.

func NewCmdCatalog

func NewCmdCatalog() *cobra.Command

NewCmdCatalog creates a new cobra.Command for the repos subcommand.

func NewCmdConfig

func NewCmdConfig() *cobra.Command

NewCmdConfig creates a new cobra.Command for the config subcommand.

func NewCmdCopy

func NewCmdCopy() *cobra.Command

NewCmdCopy creates a new cobra.Command for the copy subcommand.

func NewCmdDelete

func NewCmdDelete() *cobra.Command

NewCmdDelete creates a new cobra.Command for the delete subcommand.

func NewCmdDigest

func NewCmdDigest() *cobra.Command

NewCmdDigest creates a new cobra.Command for the digest subcommand.

func NewCmdExport

func NewCmdExport() *cobra.Command

NewCmdExport creates a new cobra.Command for the export subcommand.

func NewCmdList

func NewCmdList() *cobra.Command

NewCmdList creates a new cobra.Command for the ls subcommand.

func NewCmdManifest

func NewCmdManifest() *cobra.Command

NewCmdManifest creates a new cobra.Command for the manifest subcommand.

func NewCmdPull

func NewCmdPull() *cobra.Command

NewCmdPull creates a new cobra.Command for the pull subcommand.

func NewCmdPush

func NewCmdPush() *cobra.Command

NewCmdPush creates a new cobra.Command for the push subcommand.

func NewCmdRebase

func NewCmdRebase() *cobra.Command

NewCmdRebase creates a new cobra.Command for the rebase subcommand.

func NewCmdTag

func NewCmdTag() *cobra.Command

NewCmdTag creates a new cobra.Command for the tag subcommand.

func NewCmdValidate

func NewCmdValidate() *cobra.Command

NewCmdValidate creates a new cobra.Command for the validate subcommand.

func NewCmdVersion

func NewCmdVersion() *cobra.Command

NewCmdVersion creates a new cobra.Command for the version subcommand.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL