docker

package
v0.0.0-...-d13921b Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExactArgs

func ExactArgs(number int) cobra.PositionalArgs

ExactArgs returns an error if there is not the exact number of args

func NoArgs

func NoArgs(cmd *cobra.Command, args []string) error

NoArgs validates args and returns an error if there are any args

func RequiresMaxArgs

func RequiresMaxArgs(max int) cobra.PositionalArgs

RequiresMaxArgs returns an error if there is not at most max args

func RequiresMinArgs

func RequiresMinArgs(min int) cobra.PositionalArgs

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

func RequiresRangeArgs

func RequiresRangeArgs(min int, max int) cobra.PositionalArgs

RequiresRangeArgs returns an error if there is not at least min args and at most max args

Types

type Cli

type Cli interface {
	Client() client.APIClient
	Streams
	SetIn(in *streams.In)
}

Cli represents the docker command line client.

type DockerCli

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

DockerCli is an instance the docker command line client. Instances of the client can be returned from NewDockerCli.

func NewDockerCli

func NewDockerCli() *DockerCli

NewDockerCli returns a DockerCli instance with all operators applied on it. It applies by default the standard streams, and the content trust from environment.

func (*DockerCli) Client

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

Client returns the APIClient

func (*DockerCli) Err

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

Err returns the writer used for stderr

func (*DockerCli) In

func (cli *DockerCli) In() *streams.In

In returns the reader used for stdin

func (*DockerCli) Out

func (cli *DockerCli) Out() *streams.Out

Out returns the writer used for stdout

func (*DockerCli) SetIn

func (cli *DockerCli) SetIn(in *streams.In)

SetIn sets the reader used for stdin

type Streams

type Streams interface {
	In() *streams.In
	Out() *streams.Out
	Err() io.Writer
}

Streams is an interface which exposes the standard input and output streams

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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