Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadCredentials ¶
func ReadCredentials(c *Cli, registryAuth *types.AuthConfig)
ReadCredentials ask the user to enter his login and password and stores the value in the given registryAuth
func ReadPassword ¶
ReadPassword reads from the terminal without echoing input
Types ¶
type Cli ¶
type Cli struct { In io.Reader Out io.WriteCloser Err io.WriteCloser }
Cli holds reader and writer to interact wih user
type InputReader ¶
InputReader defines a method that can read into a string
type TabPrinter ¶
type TabPrinter struct { Separator byte Width int Wait bool Template string // contains filtered or unexported fields }
TabPrinter prints data in tabular format. It computes column width and support incremental data population
func NewTabPrinter ¶
func NewTabPrinter(writer io.Writer, reader io.Reader, options ...TabPrinterOption) *TabPrinter
NewTabPrinter returns a TabPrinter with sane defaults
func (*TabPrinter) Append ¶
func (t *TabPrinter) Append(row []string)
Append adds a row of data to the collection of data to print
func (*TabPrinter) BulkAppend ¶
func (t *TabPrinter) BulkAppend(rows [][]string)
BulkAppend adds a serie of rows of data to the collection of data to print
func (*TabPrinter) PrintAll ¶
func (t *TabPrinter) PrintAll(wait bool) error
PrintAll will print all the remaining data. Passing true will make the printer wait for the user to press enter between each rows
type TabPrinterOption ¶
type TabPrinterOption func(printer *TabPrinter)
TabPrinterOption lets you customize your TabPrinter instance
func WithSeparator ¶
func WithSeparator(sep byte) TabPrinterOption
WithSeparator returns a TabPrinterOption to set the printer separator character
func WithTemplate ¶
func WithTemplate(t string) TabPrinterOption
WithTemplate returns a TabPrinterOption to set the printer template
func WithWidth ¶
func WithWidth(w int) TabPrinterOption
WithWidth returns a TabPrinterOption to set the printer width
type TemplatePrinter ¶
TemplatePrinter prints data according to a template.
func NewTemplatePrinter ¶
NewTemplatePrinter returns a TemplatePrinter initialised with given options
func (*TemplatePrinter) Append ¶
func (t *TemplatePrinter) Append(row interface{})
Append adds a row of data to the collection of data to print
func (*TemplatePrinter) BulkAppend ¶
func (t *TemplatePrinter) BulkAppend(rows []interface{})
BulkAppend adds a serie of rows of data to the collection of data to print
func (*TemplatePrinter) PrintAll ¶
func (t *TemplatePrinter) PrintAll(wait bool) error
PrintAll will print all the remaining data. Passing true will make the printer wait for the user to press enter between each rows