cmd

package
v1.16.0-rc Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: AGPL-3.0 Imports: 35 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")
	// ErrAccessFlag is used where the `--access` flag is registered but not supported.
	ErrAccessFlag = Error.New("--access flag not supported with `setup` and `import` subcommands")
)
View Source
var RootCmd = &cobra.Command{
	Use:                "uplink",
	Short:              "The Storj client-side CLI",
	Args:               cobra.OnlyValidArgs,
	PersistentPreRunE:  combineCobraFuncs(startCPUProfile, modifyFlagDefaults),
	PersistentPostRunE: stopAndWriteProfile,
}

RootCmd represents the base CLI command when called without any subcommands.

Functions

func IsSerializedAccess added in v0.31.0

func IsSerializedAccess(access string) bool

IsSerializedAccess returns whether the passed access is a serialized access string or not.

Types

type AccessConfig added in v0.30.0

type AccessConfig struct {
	Accesses map[string]string `internal:"true"`
	Access   string            `help:"the serialized access, or name of the access to use" default:"" basic-help:"true"`

	// used for backward compatibility
	Scopes map[string]string `internal:"true"` // deprecated
	Scope  string            `internal:"true"` // deprecated
}

AccessConfig holds information about which accesses exist and are selected.

func (AccessConfig) GetAccess added in v0.30.0

func (a AccessConfig) GetAccess() (_ *uplink.Access, err error)

GetAccess returns the appropriate access for the config.

func (AccessConfig) GetNamedAccess added in v0.30.0

func (a AccessConfig) GetNamedAccess(name string) (_ *uplink.Access, err error)

GetNamedAccess returns named access if exists.

type ClientConfig added in v0.29.0

type ClientConfig struct {
	UserAgent   string        `help:"User-Agent used for connecting to the satellite" default:""`
	DialTimeout time.Duration `help:"timeout for dials" default:"0h2m00s"`
}

ClientConfig is a configuration struct for the uplink that controls how to talk to the rest of the network.

type Config added in v0.29.0

type Config struct {
	AccessConfig
	Client ClientConfig
}

Config uplink configuration.

type UplinkFlags

type UplinkFlags struct {
	Config

	Version checker.Config

	PBKDFConcurrency int `` /* 373-byte string literal not displayed */
}

UplinkFlags configuration flags.

Jump to

Keyboard shortcuts

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