backups

package
v0.0.0-...-298751d Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: AGPL-3.0 Imports: 16 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateCommand

func NewCreateCommand() cmd.Command

NewCreateCommand returns a command used to create backups.

func NewDownloadCommand

func NewDownloadCommand() cmd.Command

NewDownloadCommand returns a commant used to download backups.

Types

type APIClient

type APIClient interface {
	io.Closer
	// Create sends an RPC request to create a new backup.
	Create(notes string, noDownload bool) (*params.BackupsMetadataResult, error)
	// Download pulls the backup archive file.
	Download(filename string) (io.ReadCloser, error)
}

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

type CommandBase

type CommandBase struct {
	modelcmd.ModelCommandBase
	// contains filtered or unexported fields
}

CommandBase is the base type for backups sub-commands.

func (*CommandBase) Init

func (c *CommandBase) Init(args []string) error

Init implements Command.SetFlags.

func (*CommandBase) NewAPIClient

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

NewAPIClient returns a client for the backups api endpoint.

func (*CommandBase) NewGetAPI

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

NewGetAPI returns a client for the backups api endpoint.

func (*CommandBase) SetFlags

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

SetFlags implements Command.SetFlags.

type MetadataParams

type MetadataParams struct {
	FormatVersion  int64
	Checksum       string
	ChecksumFormat string
	Size           int64
	Stored         time.Time
	Started        time.Time
	Finished       time.Time
	Notes          string
	ControllerUUID string
	HANodes        int64
	ModelUUID      string
	MachineID      string
	Hostname       string
	JujuVersion    version.Number
	Base           string
}

Jump to

Keyboard shortcuts

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