cmd

package
v0.0.0-...-73df0bb Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const VersionLabel = "[DEV BUILD]"

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicDeps

type BasicDeps struct {
	FS     boshsys.FileSystem
	UI     *boshui.ConfUI
	Logger boshlog.Logger

	UUIDGen    boshuuid.Generator
	CmdRunner  boshsys.CmdRunner
	Compressor boshcmd.Compressor

	DigestCreationAlgorithms []boshcrypto.Algorithm
	DigestCalculator         bicrypto.DigestCalculator

	Time clock.Clock
}

func NewBasicDeps

func NewBasicDeps(ui *boshui.ConfUI, logger boshlog.Logger) BasicDeps

func NewBasicDepsWithFS

func NewBasicDepsWithFS(ui *boshui.ConfUI, fs boshsys.FileSystem, logger boshlog.Logger) BasicDeps

type BoshOpts

type BoshOpts struct {
	VersionOpt func() error `long:"version" short:"v" description:"Show CLI version"`

	JSONOpt    bool `long:"json"     description:"Output as JSON"`
	TTYOpt     bool `long:"tty"      description:"Force TTY-like output"`
	NoColorOpt bool `long:"no-color" description:"Toggle colorized output"`

	Help HelpOpts `command:"help" description:"Show this help message"`

	LintRelease       LintReleaseOpts       `command:"lint-release"        alias:"r"   alias:"release"                      description:"Lint release"`
	LintCPIConfig     LintCPIConfigOpts     `command:"lint-cpi-config"     alias:"cpi" alias:"cpi-config"     hidden:"true" description:"Lint CPI config"`
	LintRuntimeConfig LintRuntimeConfigOpts `command:"lint-runtime-config" alias:"rc"  alias:"runtime-config" hidden:"true" description:"Lint runtime config"`
	LintCloudConfig   LintCloudConfigOpts   `command:"lint-cloud-config"   alias:"cc"  alias:"cloud-config"   hidden:"true" description:"Lint cloud config"`
	LintManifest      LintManifestOpts      `command:"lint-manifest"       alias:"m"   alias:"manifest"                     description:"Lint deployment manifest"`

	DebugTask DebugTaskOpts `command:"debug-task" description:"Interpret task debug log"`

	Web WebOpts `command:"web" description:"Browser based CLI experience"`
}

type ChecksTable

type ChecksTable struct {
	Descriptions []check.Description
	Suggestions  []check.Suggestion

	UI boshui.UI
}

func (ChecksTable) Print

func (t ChecksTable) Print(verbose int)

type Cmd

type Cmd struct {
	BoshOpts BoshOpts
	Opts     interface{}
	// contains filtered or unexported fields
}

func NewCmd

func NewCmd(boshOpts BoshOpts, opts interface{}, deps BasicDeps) Cmd

func (Cmd) Execute

func (c Cmd) Execute() (cmdErr error)

type DebugTaskCmd

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

func NewDebugTaskCmd

func NewDebugTaskCmd(ui boshui.UI) DebugTaskCmd

func (DebugTaskCmd) Run

func (c DebugTaskCmd) Run(opts DebugTaskOpts) error

type DebugTaskOpts

type DebugTaskOpts struct {
	Args FileArgs `positional-args:"true" required:"true"`

	Actions bool `long:"actions" short:"a" description:"Show all actions"`
	Lines   bool `long:"lines"   short:"l" description:"Show all log lines"`

	DB     bool `long:"db"   description:"Show DB statements log lines"`
	Errors bool `long:"errs" description:"Show error log lines"`

	SortBy string `long:"sort-by" short:"s" description:"Sort by column [duration]"`
	// contains filtered or unexported fields
}

func (DebugTaskOpts) Execute

func (c DebugTaskOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type Factory

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

func NewFactory

func NewFactory(deps BasicDeps) Factory

func (Factory) New

func (f Factory) New(args []string) (Cmd, error)

type FileArgs

type FileArgs struct {
	File boshcmd.FileBytesArg `positional-arg-name:"PATH" description:"Path to a file"`
}

type HelpOpts

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

func (HelpOpts) Execute

func (c HelpOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type LintCPIConfigOpts

type LintCPIConfigOpts struct {
	Args    FileArgs `positional-args:"true" required:"true"`
	Verbose int      `long:"verbose" value-name:"LEVEL" description:"Show more details [0,1,2]"`
	// contains filtered or unexported fields
}

func (LintCPIConfigOpts) Execute

func (c LintCPIConfigOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type LintCloudConfigOpts

type LintCloudConfigOpts struct {
	Args    FileArgs `positional-args:"true" required:"true"`
	Verbose int      `long:"verbose" value-name:"LEVEL" description:"Show more details [0,1,2]"`
	// contains filtered or unexported fields
}

func (LintCloudConfigOpts) Execute

func (c LintCloudConfigOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type LintManifestCmd

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

func NewLintManifestCmd

func NewLintManifestCmd(ui boshui.UI) LintManifestCmd

func (LintManifestCmd) Run

type LintManifestOpts

type LintManifestOpts struct {
	Args    FileArgs             `positional-args:"true" required:"true"`
	Verbose int                  `long:"verbose" value-name:"LEVEL" description:"Show more details [0,1,2]"`
	Config  boshcmd.FileBytesArg `long:"config" short:"c" description:"Path to config file"`
	// contains filtered or unexported fields
}

func (LintManifestOpts) Execute

func (c LintManifestOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type LintReleaseCmd

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

func NewLintReleaseCmd

func NewLintReleaseCmd(
	releaseDirFactory func(boshcmd.DirOrCWDArg) (boshrel.Reader, boshreldir.ReleaseDir),
	fs boshsys.FileSystem,
	ui boshui.UI,
) LintReleaseCmd

func (LintReleaseCmd) Run

func (c LintReleaseCmd) Run(opts LintReleaseOpts) error

type LintReleaseOpts

type LintReleaseOpts struct {
	Directory boshcmd.DirOrCWDArg  `long:"dir" description:"Release directory path if not current working directory" default:"."`
	Verbose   int                  `long:"verbose" value-name:"LEVEL" description:"Show all checks [0,1,2]"`
	Config    boshcmd.FileBytesArg `long:"config" short:"c" description:"Path to config file"`
	// contains filtered or unexported fields
}

func (LintReleaseOpts) Execute

func (c LintReleaseOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type LintRuntimeConfigOpts

type LintRuntimeConfigOpts struct {
	Args    FileArgs `positional-args:"true" required:"true"`
	Verbose int      `long:"verbose" value-name:"LEVEL" description:"Show more details [0,1,2]"`
	// contains filtered or unexported fields
}

func (LintRuntimeConfigOpts) Execute

func (c LintRuntimeConfigOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type MessageOpts

type MessageOpts struct {
	Message string
}

MessageOpts is used for version and help flags

type WebCmd

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

func NewWebCmd

func NewWebCmd(cmdRunner boshsys.CmdRunner, ui boshui.UI, logger boshlog.Logger) WebCmd

func (WebCmd) Run

func (c WebCmd) Run(opts WebOpts) error

type WebOpts

type WebOpts struct {
	ListenPort int    `long:"port" description:"Port to listen on"    default:"9090"`
	ListenAddr string `long:"addr" description:"Address to listen on" default:"127.0.0.1"`
	// contains filtered or unexported fields
}

func (WebOpts) Execute

func (c WebOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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