commands

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any

func Any(msg string, steps []*ProgressBarStep, wcc ...decor.WC) decor.Decorator

func OnComplete

func OnComplete(msg string, steps []*ProgressBarStep, wcc ...decor.WC) decor.Decorator

Types

type ExportAll

type ExportAll struct {
}

func (*ExportAll) Run

func (e *ExportAll) Run(ctx *context.Context) error

type ExportApp

type ExportApp struct {
	ExportSpace
	Sequence Sequence
	AppName  string `help:"the app to export" short:"a" env:"CF_APP_NAME"`
}

func (*ExportApp) Run

func (e *ExportApp) Run(ctx *context.Context, orgName, spaceName string) error

func (*ExportApp) SetAppName

func (e *ExportApp) SetAppName(name string)

type ExportAppResult

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

func (ExportAppResult) GetApp

func (r ExportAppResult) GetApp() cfclient.App

func (ExportAppResult) GetOrg

func (r ExportAppResult) GetOrg() cfclient.Org

func (ExportAppResult) GetSpace

func (r ExportAppResult) GetSpace() cfclient.Space

type ExportIncremental

type ExportIncremental struct {
}

func (*ExportIncremental) Run

func (e *ExportIncremental) Run(ctx *context.Context) error

type ExportOrg

type ExportOrg struct {
	Org string `help:"the org to export" short:"o" env:"CF_ORG"`
}

func (*ExportOrg) Run

func (e *ExportOrg) Run(ctx *context.Context, orgName string) error

type ExportSpace

type ExportSpace struct {
	ExportOrg
	Space string `help:"the space to export" short:"s" env:"CF_SPACE"`
}

func (*ExportSpace) Run

func (e *ExportSpace) Run(ctx *context.Context, orgName, spaceName string) error

type ImportAll

type ImportAll struct {
}

func (*ImportAll) Run

func (i *ImportAll) Run(ctx *context.Context) error

type ImportApp

type ImportApp struct {
	ImportSpace
	Sequence Sequence
	AppName  string `help:"the app to import" short:"a" env:"CF_APP_NAME"`

	AppCount int
	// contains filtered or unexported fields
}

func (*ImportApp) Run

func (i *ImportApp) Run(ctx *appcontext.Context) error

func (*ImportApp) SetAppName

func (i *ImportApp) SetAppName(name string)

func (*ImportApp) SetOrgName

func (i *ImportApp) SetOrgName(name string)

func (*ImportApp) SetSpaceName

func (i *ImportApp) SetSpaceName(name string)

type ImportIncremental

type ImportIncremental struct {
}

func (*ImportIncremental) Run

func (i *ImportIncremental) Run(ctx *context.Context) error

type ImportOrg

type ImportOrg struct {
	Org string `help:"the org to import" short:"o" env:"CF_ORG"`
}

func (*ImportOrg) Run

func (i *ImportOrg) Run(ctx *context.Context) error

type ImportSpace

type ImportSpace struct {
	ImportOrg
	Space string `help:"the space to import" short:"s" env:"CF_SPACE"`
}

func (*ImportSpace) Run

func (i *ImportSpace) Run(ctx *context.Context) error

Run ranges over apps in the export directory and imports all the apps it finds in a given space

type ProgressBarStep

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

func StepWithProgressBar

func StepWithProgressBar(step StepFunc, display string) *ProgressBarStep

func (ProgressBarStep) String

func (p ProgressBarStep) String() string

type Result

type Result interface {
	GetOrg() cfclient.Org
	GetSpace() cfclient.Space
	GetApp() cfclient.App
}

type Sequence

type Sequence interface {
	Run(ctx *context.Context, r Result) (Result, error)
}

func NewExportAppSequence

func NewExportAppSequence(orgName, spaceName, appName string, exportDir string) Sequence

func NewImportAppSequence

func NewImportAppSequence(i *ImportApp) Sequence

func RunSequence

func RunSequence(msg string, completeMessage string, steps ...*ProgressBarStep) Sequence

type StepFunc

type StepFunc func(ctx *context.Context, r Result) (Result, error)

func (StepFunc) Run

func (fn StepFunc) Run(ctx *context.Context, r Result) (Result, error)

Jump to

Keyboard shortcuts

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