Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateCommand ¶
NewCreateCommand returns a command used to create backups.
func NewDownloadCommand ¶
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(nctx context.Context, otes string, noDownload bool) (*params.BackupsMetadataResult, error)
// Download pulls the backup archive file.
Download(ctx context.Context, 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(ctx context.Context) (APIClient, error)
NewAPIClient returns a client for the backups api endpoint.
func (*CommandBase) NewGetAPI ¶
func (c *CommandBase) NewGetAPI(ctx context.Context) (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 ¶
Click to show internal directories.
Click to hide internal directories.