cmd

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRoot

func BuildRoot() *cobra.Command

BuildRoot creates a new root command from the

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func NewCommandCmd

func NewCommandCmd() *cobra.Command

NewCommandCmd defines a command

func NewCreateCmd

func NewCreateCmd() *cobra.Command

NewCreateCmd defines a command

func NewDeleteCmd

func NewDeleteCmd() *cobra.Command

NewDeleteCmd defines a command

func NewDescribeCmd

func NewDescribeCmd() *cobra.Command

NewDescribeCmd defines a command.

func NewInitCmd

func NewInitCmd() *cobra.Command

NewInitCmd defines a init

func NewRootCmd

func NewRootCmd() *cobra.Command

NewRootCmd returns a new root command

func NewStartCmd

func NewStartCmd() *cobra.Command

NewStartCmd defines a command

func NewStatusCmd

func NewStatusCmd() *cobra.Command

NewStatusCmd defines a command

func NewStopCmd

func NewStopCmd() *cobra.Command

NewStopCmd defines a command

Types

type CommandCmd

type CommandCmd struct{}

CommandCmd holds the cmd flags

func (*CommandCmd) Run

func (cmd *CommandCmd) Run(ctx context.Context, providerAws *aws.AwsProvider) error

Run runs the command logic

type ConnectionStrategy

type ConnectionStrategy interface {
	Connect(ctx context.Context, instance *aws.Machine, privateKey []byte) (*gossh.Client, error)
	Close() error
	Name() string
}

ConnectionStrategy defines how to connect to an EC2 instance

type CreateCmd

type CreateCmd struct{}

CreateCmd holds the cmd flags

func (*CreateCmd) Run

func (cmd *CreateCmd) Run(ctx context.Context, providerAws *aws.AwsProvider) error

Run runs the command logic.

type DeleteCmd

type DeleteCmd struct{}

DeleteCmd holds the cmd flags

func (*DeleteCmd) Run

func (cmd *DeleteCmd) Run(ctx context.Context, providerAws *aws.AwsProvider) error

Run runs the command logic

type DescribeCmd

type DescribeCmd struct{}

DescribeCmd holds the cmd flags.

func (*DescribeCmd) Run

func (cmd *DescribeCmd) Run(ctx context.Context, providerAws *aws.AwsProvider) error

Run runs the command logic.

type DirectSSHStrategy

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

DirectSSHStrategy connects via direct SSH

func (*DirectSSHStrategy) Close

func (s *DirectSSHStrategy) Close() error

func (*DirectSSHStrategy) Connect

func (s *DirectSSHStrategy) Connect(
	ctx context.Context,
	instance *aws.Machine,
	privateKey []byte,
) (*gossh.Client, error)

func (*DirectSSHStrategy) Name

func (s *DirectSSHStrategy) Name() string

type InitCmd

type InitCmd struct{}

InitCmd holds the cmd flags

func (*InitCmd) Run

func (cmd *InitCmd) Run(ctx context.Context) error

Run runs the init logic

type InstanceConnectStrategy

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

InstanceConnectStrategy connects via EC2 Instance Connect

func (*InstanceConnectStrategy) Close

func (s *InstanceConnectStrategy) Close() error

func (*InstanceConnectStrategy) Connect

func (s *InstanceConnectStrategy) Connect(
	ctx context.Context,
	instance *aws.Machine,
	privateKey []byte,
) (*gossh.Client, error)

func (*InstanceConnectStrategy) Name

func (s *InstanceConnectStrategy) Name() string

type InstanceStatus

type InstanceStatus struct {
	NetworkInterfaces []InstanceStatusNetworkInterface `json:"networkInterfaces,omitempty"`
	Status            string                           `json:"status,omitempty"`
}

type InstanceStatusAccessConfig

type InstanceStatusAccessConfig struct {
	NatIP string `json:"natIP,omitempty"`
}

type InstanceStatusNetworkInterface

type InstanceStatusNetworkInterface struct {
	AccessConfigs []InstanceStatusAccessConfig `json:"accessConfigs,omitempty"`
}

type SessionManagerStrategy

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

SessionManagerStrategy connects via AWS Session Manager

func (*SessionManagerStrategy) Close

func (s *SessionManagerStrategy) Close() error

func (*SessionManagerStrategy) Connect

func (s *SessionManagerStrategy) Connect(
	ctx context.Context,
	instance *aws.Machine,
	privateKey []byte,
) (*gossh.Client, error)

func (*SessionManagerStrategy) Name

func (s *SessionManagerStrategy) Name() string

type StartCmd

type StartCmd struct{}

StartCmd holds the cmd flags

func (*StartCmd) Run

func (cmd *StartCmd) Run(ctx context.Context, providerAws *aws.AwsProvider) error

Run runs the command logic

type StatusCmd

type StatusCmd struct{}

StatusCmd holds the cmd flags

func (*StatusCmd) Run

func (cmd *StatusCmd) Run(ctx context.Context, providerAws *aws.AwsProvider) error

Run runs the command logic

type StopCmd

type StopCmd struct{}

StopCmd holds the cmd flags

func (*StopCmd) Run

func (cmd *StopCmd) Run(ctx context.Context, providerAws *aws.AwsProvider) error

Run runs the command logic

type TunnelManager

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

TunnelManager manages AWS CLI tunnel processes

func (*TunnelManager) Address

func (t *TunnelManager) Address() string

func (*TunnelManager) Close

func (t *TunnelManager) Close() error

func (*TunnelManager) Start

func (t *TunnelManager) Start(ctx context.Context, args []string) error

Jump to

Keyboard shortcuts

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