Documentation
¶
Index ¶
Constants ¶
View Source
const ( JSON = "json" YAML = "yaml" YML = "yml" TOML = "toml" )
View Source
const WRITE_SUCCESS = "File successfully written to: %s"
Variables ¶
View Source
var WriteDetailsToFile = cmdutil.WriteDetailsToFile
Functions ¶
func Print ¶
func Print(out TypeOutputInterface) error
Types ¶
type DescribeOutput ¶
type DescribeOutput struct {
GeneralOutput `json:"-" yaml:"-" toml:"-"`
Fields map[string]string
Values interface{}
Field string // Used for large character values like codes or scripts that break the table.
}
func (*DescribeOutput) Format ¶
func (d *DescribeOutput) Format() (bool, error)
func (*DescribeOutput) Output ¶
func (c *DescribeOutput) Output()
type ErrorOutput ¶
type ErrorOutput struct {
GeneralOutput `json:"-" yaml:"-" toml:"-"`
Err error `json:"error"`
}
func (*ErrorOutput) Format ¶
func (e *ErrorOutput) Format() (bool, error)
func (*ErrorOutput) Output ¶
func (e *ErrorOutput) Output()
type GeneralOutput ¶
type GeneralOutput struct {
Msg string `json:"message,omitempty" yaml:"message,omitempty" toml:"message,omitempty"`
Out io.Writer `json:"-" yaml:"-" toml:"-"`
Flags cmdutil.Flags `json:"-" yaml:"-" toml:"-"`
}
func (*GeneralOutput) Format ¶
func (g *GeneralOutput) Format() (bool, error)
func (*GeneralOutput) Output ¶
func (g *GeneralOutput) Output()
type ListOutput ¶
type ListOutput struct {
GeneralOutput `json:"-" yaml:"-" toml:"-"`
Columns []string `json:"columns" yaml:"columns" toml:"columns"`
Lines [][]string `json:"lines" yaml:"lines" toml:"lines"`
}
func (*ListOutput) Format ¶
func (l *ListOutput) Format() (bool, error)
func (*ListOutput) Output ¶
func (c *ListOutput) Output()
type MockTypeOutputInterface ¶
type MockTypeOutputInterface struct {
// contains filtered or unexported fields
}
func (*MockTypeOutputInterface) Format ¶
func (m *MockTypeOutputInterface) Format() (bool, error)
func (*MockTypeOutputInterface) Output ¶
func (m *MockTypeOutputInterface) Output()
type Output ¶
type Output struct {
Output TypeOutputInterface
}
type SliceOutput ¶
type SliceOutput struct {
Messages []string `json:"messages" yaml:"messages" toml:"messages"`
GeneralOutput
}
func (*SliceOutput) Format ¶
func (i *SliceOutput) Format() (bool, error)
func (*SliceOutput) Output ¶
func (i *SliceOutput) Output()
type TypeOutputInterface ¶
Click to show internal directories.
Click to hide internal directories.