cli

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: Apache-2.0 Imports: 109 Imported by: 2

Documentation

Overview

Package cli implements command-line commands for the Kopia.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	AdvancedCommands string
	// contains filtered or unexported fields
}

App contains per-invocation flags and state of Kopia CLI.

func NewApp added in v0.9.0

func NewApp() *App

NewApp creates a new instance of App.

func (*App) Attach added in v0.9.0

func (c *App) Attach(app *kingpin.Application)

Attach attaches the CLI parser to the application.

func (*App) RunSubcommand added in v0.9.0

func (c *App) RunSubcommand(ctx context.Context, kpapp *kingpin.Application, argsAndFlags []string) (stdout, stderr io.Reader, wait func() error, kill func())

RunSubcommand executes the subcommand asynchronously in current process with flags in an isolated CLI environment and returns standard output and standard error.

func (*App) SetLoggerFactory added in v0.9.1

func (c *App) SetLoggerFactory(loggerForModule logging.LoggerFactory)

SetLoggerFactory sets the logger factory to be used throughout the app.

func (*App) Stderr added in v0.9.1

func (c *App) Stderr() io.Writer

Stderr returns the stderr writer.

type MaintenanceInfo added in v0.9.0

type MaintenanceInfo struct {
	maintenance.Params
	maintenance.Schedule `json:"schedule"`
}

MaintenanceInfo is used to display the maintenance info in JSON format.

Source Files

Jump to

Keyboard shortcuts

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