cmd

package
v0.11.6 Latest Latest
Warning

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

Go to latest
Published: May 21, 2019 License: AGPL-3.0 Imports: 25 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Error is the default uplink setup errs class
	Error = errs.Class("uplink setup error")
)
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
}

UplinkFlags configuration flags

func (*UplinkFlags) GetProject added in v0.11.0

func (c *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 (c *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 (c *UplinkFlags) NewUplink(ctx context.Context, config *libuplink.Config) (*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