commands

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BashCompletionCommand

type BashCompletionCommand struct {
}

func (*BashCompletionCommand) Execute

func (c *BashCompletionCommand) Execute(args []string) error

type BoshCommand

type BoshCommand struct {
	TargetConfig    string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"`
	EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"`
	File            bool   `short:"f" long:"file" description:"write a script file but do not run it"`

	Env        EnvReader
	UI         UI
	BoshRunner ToolRunner
}

func (*BoshCommand) Execute

func (c *BoshCommand) Execute(args []string) error

type CFLoginCommand

type CFLoginCommand struct {
	TargetConfig    string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"`
	EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"`
	File            bool   `short:"f" long:"file" description:"write a script file but do not run it"`

	Env           EnvReader
	UI            UI
	CFLoginRunner ToolRunner
}

func (*CFLoginCommand) Execute

func (c *CFLoginCommand) Execute(args []string) error

type CompletionCommand

type CompletionCommand struct {
	Bash BashCompletionCommand `command:"bash" description:"bash completion script"`
}

type EnvReader

type EnvReader interface {
	Read(targetConfigPath, environmentName string) (environment.Config, error)
}

type OMCommand

type OMCommand struct {
	TargetConfig    string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"`
	EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"`
	File            bool   `short:"f" long:"file" description:"write a script file but do not run it"`

	Env      EnvReader
	UI       UI
	OMRunner ToolRunner
}

func (*OMCommand) Execute

func (c *OMCommand) Execute(args []string) error

type OpenCommand

type OpenCommand struct {
	TargetConfig    string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"`
	EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"`
	File            bool   `short:"f" long:"file" description:"write a script file but do not run it"`
	Show            bool   `short:"s" long:"show" description:"only show the credentials"`

	Env        EnvReader
	UI         UI
	OpenRunner ToolRunner
}

func (*OpenCommand) Execute

func (c *OpenCommand) Execute(args []string) error

type PKSLoginCommand added in v0.6.0

type PKSLoginCommand struct {
	TargetConfig    string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"`
	EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"`
	File            bool   `short:"f" long:"file" description:"write a script file but do not run it"`

	Env            EnvReader
	UI             UI
	PKSLoginRunner ToolRunner
}

func (*PKSLoginCommand) Execute added in v0.6.0

func (c *PKSLoginCommand) Execute(args []string) error

type SSHCommand

type SSHCommand struct {
	TargetConfig    targetConfigPath     `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"`
	EnvironmentName environmentName      `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"`
	Director        SSHDirectorCommand   `command:"director"`
	OpsManager      SSHOpsManagerCommand `command:"opsman"`
}

type SSHDirectorCommand

type SSHDirectorCommand struct {
	TargetConfig    string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"`
	EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"`
	File            bool   `short:"f" long:"file" description:"write a script file but do not run it"`

	Env       EnvReader
	UI        UI
	SSHRunner ToolRunner
}

func (*SSHDirectorCommand) Execute

func (c *SSHDirectorCommand) Execute(args []string) error

type SSHOpsManagerCommand

type SSHOpsManagerCommand struct {
	TargetConfig    string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"`
	EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"`
	File            bool   `short:"f" long:"file" description:"write a script file but do not run it"`

	Env       EnvReader
	UI        UI
	SSHRunner ToolRunner
}

func (*SSHOpsManagerCommand) Execute

func (c *SSHOpsManagerCommand) Execute(args []string) error

type SshuttleCommand

type SshuttleCommand struct {
	TargetConfig    string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"`
	EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"`
	File            bool   `short:"f" long:"file" description:"write a script file but do not run it"`

	Env            EnvReader
	UI             UI
	SshuttleRunner ToolRunner
}

func (*SshuttleCommand) Execute

func (c *SshuttleCommand) Execute(args []string) error

type ToolRunner

type ToolRunner interface {
	Run(data environment.Config, dryRun bool, args ...string) error
}

type UI

type UI interface {
	DisplayText(text string)
	DisplayError(err error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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