cmd

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: AGPL-3.0 Imports: 28 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Error is the class of errors returned by this package
	Error = errs.Class("uplink")
)
View Source
var RootCmd = &cobra.Command{
	Use:                "uplink",
	Short:              "The Storj client-side CLI",
	Args:               cobra.OnlyValidArgs,
	PersistentPreRunE:  startCPUProfile,
	PersistentPostRunE: stopAndWriteProfile,
}

RootCmd represents the base CLI command when called without any subcommands

Functions

func ApplyDefaultHostAndPortToAddr added in v0.10.0

func ApplyDefaultHostAndPortToAddr(address, defaultAddress string) (string, error)

ApplyDefaultHostAndPortToAddr applies the default host and/or port if either is missing in the specified address.

func ApplyDefaultHostAndPortToAddrFlag added in v0.9.2

func ApplyDefaultHostAndPortToAddrFlag(cmd *cobra.Command, flagName string) error

ApplyDefaultHostAndPortToAddrFlag applies the default host and/or port if either is missing in the specified flag name.

Types

type UplinkFlags

type UplinkFlags struct {
	NonInteractive bool `help:"disable interactive mode" default:"false" setup:"true"`
	uplink.Config

	Version version.Config
}

UplinkFlags configuration flags

func (*UplinkFlags) GetProject added in v0.11.0

func (cliCfg *UplinkFlags) GetProject(ctx context.Context) (*libuplink.Project, error)

GetProject returns a *libuplink.Project for interacting with a specific project

func (*UplinkFlags) GetProjectAndBucket added in v0.11.0

func (cliCfg *UplinkFlags) GetProjectAndBucket(ctx context.Context, bucketName string, access *libuplink.EncryptionAccess) (project *libuplink.Project, bucket *libuplink.Bucket, err error)

GetProjectAndBucket returns a *libuplink.Bucket for interacting with a specific project's bucket

func (cliCfg *UplinkFlags) NewUplink(ctx context.Context) (*libuplink.Uplink, error)

NewUplink returns a pointer to a new Client with a Config and Uplink pointer on it and an error.

Jump to

Keyboard shortcuts

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