command

package
v0.0.0-...-b1d3944 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2016 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFactory

func GetFactory() func() (cmd cli.Command, err error)

GetFactory returns a factory method for the join command

func MvFactory

func MvFactory() func() (cmd cli.Command, err error)

MvFactory returns a factory method for the split command

func PutFactory

func PutFactory() func() (cmd cli.Command, err error)

PutFactory returns a factory method for the split command

Types

type ChunkOpts

type ChunkOpts struct {
	ChunkerType string `` /* 154-byte string literal not displayed */
}

ChunkOpts configures how we will receive chunks

func (*ChunkOpts) CreateChunkReader

func (opts *ChunkOpts) CreateChunkReader(r io.Reader, secret bits.Secret) (cr bits.ChunkReader, err error)

CreateChunkReader will setup a chunk reader based on the cli options

func (*ChunkOpts) CreateChunkWriter

func (opts *ChunkOpts) CreateChunkWriter(w io.Writer) (cw bits.ChunkWriter, err error)

CreateChunkWriter will setup a chunk writer based on the cli options

type Get

type Get struct {
	// contains filtered or unexported fields
}

Get command

func (*Get) DoRun

func (cmd *Get) DoRun(args []string) (err error)

DoRun is called by run and allows an error to be returned

func (*Get) Help

func (cmd *Get) Help() string

Help returns long-form help text that includes the command-line usage, a brief few sentences explaining the function of the command, and the complete list of flags the command accepts.

func (*Get) Run

func (cmd *Get) Run(args []string) int

Run runs the actual command with the given CLI instance and command-line arguments. It returns the exit status when it is finished.

func (*Get) Synopsis

func (cmd *Get) Synopsis() string

Synopsis returns a one-line, short synopsis of the command. This should be less than 50 characters ideally.

type GetOpts

type GetOpts struct {
	KeyOpts
	ChunkOpts
	SecretOpts
}

GetOpts describes command options

type KeyOpts

type KeyOpts struct {
	KeyFormat string `long:"key-fmt" default:"b64-textlines" value-name:"b64-textlines" description:"DOC ME"`
}

KeyOpts configures how keys are handled

func (*KeyOpts) CreateKeyReader

func (opts *KeyOpts) CreateKeyReader(r io.Reader) (kr bits.KeyReader, err error)

CreateKeyReader will setup a way of writing keys using cli options

func (*KeyOpts) CreateKeyWriter

func (opts *KeyOpts) CreateKeyWriter(w io.Writer) (kw bits.KeyWriter, err error)

CreateKeyWriter will setup a way of writing keys using cli options

type Mv

type Mv struct {
	// contains filtered or unexported fields
}

Mv command

func (*Mv) DoRun

func (cmd *Mv) DoRun(args []string) error

DoRun is called by run and allows an error to be returned

func (*Mv) Help

func (cmd *Mv) Help() string

Help returns long-form help text that includes the command-line usage, a brief few sentences explaining the function of the command, and the complete list of flags the command accepts.

func (*Mv) Run

func (cmd *Mv) Run(args []string) int

Run runs the actual command with the given CLI instance and command-line arguments. It returns the exit status when it is finished.

func (*Mv) Synopsis

func (cmd *Mv) Synopsis() string

Synopsis returns a one-line, short synopsis of the command. This should be less than 50 characters ideally.

type MvOpts

type MvOpts struct {
	KeyOpts
	SecretOpts
}

MvOpts describes command options

type Put

type Put struct {
	// contains filtered or unexported fields
}

Put command

func (*Put) DoRun

func (cmd *Put) DoRun(args []string) (err error)

DoRun is called by run and allows an error to be returned

func (*Put) Help

func (cmd *Put) Help() string

Help returns long-form help text that includes the command-line usage, a brief few sentences explaining the function of the command, and the complete list of flags the command accepts.

func (*Put) Run

func (cmd *Put) Run(args []string) int

Run runs the actual command with the given CLI instance and command-line arguments. It returns the exit status when it is finished.

func (*Put) Synopsis

func (cmd *Put) Synopsis() string

Synopsis returns a one-line, short synopsis of the command. This should be less than 50 characters ideally.

type PutOpts

type PutOpts struct {
	SecretOpts
	ChunkOpts
	KeyOpts
}

PutOpts describes command options

type SecretOpts

type SecretOpts struct {
	Secret string `` /* 141-byte string literal not displayed */
}

SecretOpts documents the secret option used by various commands

func (*SecretOpts) CreateSecret

func (opt *SecretOpts) CreateSecret(ui cli.Ui) (secret bits.Secret, err error)

CreateSecret uses the command line options to setup a secret for the bits library and checks validity. Errors should focus on usability

Jump to

Keyboard shortcuts

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