backups

package
v0.0.0-...-0000000 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2016 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSuperCommand

func NewSuperCommand() cmd.Command

NewSuperCommand returns a new backups super-command.

Types

type APIClient

type APIClient interface {
	io.Closer
	// Create sends an RPC request to create a new backup.
	Create(notes string) (*params.BackupsMetadataResult, error)
	// Info gets the backup's metadata.
	Info(id string) (*params.BackupsMetadataResult, error)
	// List gets all stored metadata.
	List() (*params.BackupsListResult, error)
	// Download pulls the backup archive file.
	Download(id string) (io.ReadCloser, error)
	// Upload pushes a backup archive to storage.
	Upload(ar io.ReadSeeker, meta params.BackupsMetadataResult) (string, error)
	// Remove removes the stored backup.
	Remove(id string) error
	// Restore will restore a backup with the given id into the controller.
	Restore(string, backups.ClientConnection) error
	// RestoreReader will restore a backup file into the controller.
	RestoreReader(io.ReadSeeker, *params.BackupsMetadataResult, backups.ClientConnection) error
}

APIClient represents the backups API client functionality used by the backups command.

type CommandBase

type CommandBase struct {
	// TODO(wallyworld) - remove Log when backup command is flattened.
	Log *cmd.Log
	modelcmd.ModelCommandBase
}

CommandBase is the base type for backups sub-commands.

func (*CommandBase) NewAPIClient

func (c *CommandBase) NewAPIClient() (APIClient, error)

NewAPIClient returns a client for the backups api endpoint.

func (*CommandBase) SetFlags

func (c *CommandBase) SetFlags(f *gnuflag.FlagSet)

SetFlags implements Command.SetFlags.

Source Files

  • backups.go
  • create.go
  • download.go
  • info.go
  • list.go
  • remove.go
  • restore.go
  • upload.go

Jump to

Keyboard shortcuts

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