command

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute main func

func RequiresMinArgs

func RequiresMinArgs(min int) cobra.PositionalArgs

RequiresMinArgs returns an error if there is not at least min args

Types

type Cli

type Cli interface {
	Client() client.APIClient
	Out() *stream.OutStream
	Err() io.Writer
	In() *stream.InStream
	SetIn(in *stream.InStream)
	PullImage(image string) error
	FindImage(image string) error
	Config() *config.Config
}

Cli interface

type DebugCli

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

DebugCli cli struct

func NewDebugCli

func NewDebugCli(ops ...DebugCliOption) (*DebugCli, error)

NewDebugCli new DebugCli

func (*DebugCli) Apply

func (cli *DebugCli) Apply(ops ...DebugCliOption) error

Apply all the operation on the cli

func (*DebugCli) Client

func (cli *DebugCli) Client() client.APIClient

Client returns the APIClient

func (*DebugCli) Close

func (cli *DebugCli) Close() error

Close cli close

func (*DebugCli) Config

func (cli *DebugCli) Config() *config.Config

Config config

func (*DebugCli) ContainerClean

func (cli *DebugCli) ContainerClean(ctx context.Context, id string) error

ContainerClean stop and remove container

func (*DebugCli) CreateContainer

func (cli *DebugCli) CreateContainer(attachContainer string, options execOptions) (string, error)

CreateContainer create new container and attach target container resource

func (*DebugCli) Err

func (cli *DebugCli) Err() io.Writer

Err returns the writer used for stderr

func (*DebugCli) ExecCreate

func (cli *DebugCli) ExecCreate(options execOptions, container string) (types.IDResponse, error)

ExecCreate exec create

func (*DebugCli) ExecStart

func (cli *DebugCli) ExecStart(_ execOptions, execID string) error

ExecStart exec start

func (*DebugCli) FindContainer

func (cli *DebugCli) FindContainer(name string) (string, error)

FindContainer find container

func (*DebugCli) FindImage

func (cli *DebugCli) FindImage(image string) ([]types.ImageSummary, error)

FindImage find image

func (*DebugCli) In

func (cli *DebugCli) In() *stream.InStream

In returns the reader used for stdin

func (*DebugCli) Out

func (cli *DebugCli) Out() *stream.OutStream

Out returns the writer used for stdout

func (*DebugCli) Ping

func (cli *DebugCli) Ping() (types.Ping, error)

Ping ping docker

func (*DebugCli) PullImage

func (cli *DebugCli) PullImage(image string) error

PullImage pull docker image

func (*DebugCli) SetIn

func (cli *DebugCli) SetIn(in *stream.InStream)

SetIn sets the reader used for stdin

type DebugCliOption

type DebugCliOption func(cli *DebugCli) error

DebugCliOption cli option

func WithClientConfig

func WithClientConfig(dockerConfig *config.DockerConfig) DebugCliOption

WithClientConfig set docker config

func WithConfig

func WithConfig(config *config.Config) DebugCliOption

WithConfig set config

Jump to

Keyboard shortcuts

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