Documentation
¶
Overview ¶
Package cli implements printing functionality for CLI output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type In ¶ added in v0.0.9
type In struct {
// contains filtered or unexported fields
}
In is an input stream used by the DockerCli to read user input
func NewIn ¶ added in v0.0.9
func NewIn(in io.ReadCloser) *In
NewIn returns a new In object from a ReadCloser
func (*In) CheckTty ¶ added in v0.0.9
CheckTty checks if we are trying to attach to a container tty from a non-tty client input stream, and if so, returns an error.
func (*In) FD ¶ added in v0.0.9
func (s *In) FD() uintptr
FD returns the file descriptor number for this stream
func (*In) IsTerminal ¶ added in v0.0.9
func (s *In) IsTerminal() bool
IsTerminal returns true if this stream is connected to a terminal
func (*In) RestoreTerminal ¶ added in v0.0.9
func (s *In) RestoreTerminal()
RestoreTerminal restores normal mode to the terminal
func (*In) SetIsTerminal ¶ added in v0.0.9
func (s *In) SetIsTerminal(isTerminal bool)
SetIsTerminal sets the boolean used for isTerminal
func (*In) SetRawTerminal ¶ added in v0.0.9
SetRawTerminal sets raw mode on the input terminal
type Out ¶ added in v0.0.9
type Out struct {
// contains filtered or unexported fields
}
Out is an output stream used by the DockerCli to write normal program output.
func (*Out) FD ¶ added in v0.0.9
func (s *Out) FD() uintptr
FD returns the file descriptor number for this stream
func (*Out) GetTtySize ¶ added in v0.0.9
GetTtySize returns the height and width in characters of the tty
func (*Out) IsTerminal ¶ added in v0.0.9
func (s *Out) IsTerminal() bool
IsTerminal returns true if this stream is connected to a terminal
func (*Out) RestoreTerminal ¶ added in v0.0.9
func (s *Out) RestoreTerminal()
RestoreTerminal restores normal mode to the terminal
func (*Out) SetIsTerminal ¶ added in v0.0.9
func (s *Out) SetIsTerminal(isTerminal bool)
SetIsTerminal sets the boolean used for isTerminal
func (*Out) SetRawTerminal ¶ added in v0.0.9
SetRawTerminal sets raw mode on the input terminal
type Streams ¶
type Streams interface { // In returns the reader used for stdin In() *In // Out returns the writer used for stdout Out() *Out // Err returns the writer used for stderr Err() io.Writer }
Streams is an interface which exposes the standard input and output streams
func NoopStreams ¶ added in v0.2.4
func NoopStreams() Streams
NoopStreams provides streams like /dev/null.
func StandardStreams ¶ added in v0.0.9
func StandardStreams() Streams
StandardStreams sets a cli in, out and err streams with the standard streams.