Documentation ¶
Overview ¶
Package cli provides a client SDK for outputting data to a terminal in multiple formats
Index ¶
Constants ¶
View Source
const ( OutputStyleJSON = "json" OutputStyleJSONPretty = "json_pretty" OutputStyleTabby = "tabby" // Default )
Variables ¶
This section is empty.
Functions ¶
func FetchAndOutput
deprecated
added in
v0.36.0
func FetchAndOutput(f func() (models.TabbyPrinter, error)) error
Deprecated: Use (*CLIClient).FetchAndOutput instead
Types ¶
type CLIClient ¶ added in v0.58.0
func (*CLIClient) FetchAndOutput ¶ added in v0.60.0
func (c *CLIClient) FetchAndOutput(f func() (apiresponse.TabbyPrinter, error)) error
func (*CLIClient) OutputObject ¶ added in v0.58.0
func (c *CLIClient) OutputObject(tabby_printer apiresponse.TabbyPrinter) error
OutputObject prints indented or unindented json, or an ascii table (tabby) (depending on *CLIClient#OutputStyle) to stdout
type Client
deprecated
type Client struct {
TabbyHeaders []string // e.g. ["id", "name"]
}
Deprecated: Use CLIClient instead
func NewCliClient
deprecated
added in
v0.31.0
func NewCliClientFromViper
deprecated
added in
v0.50.2
func (*Client) OutputObject
deprecated
func (c *Client) OutputObject(tabby_printer models.TabbyPrinter) error
Deprecated: Use (*CLIClient).OutputObject instead
OutputObject prints indented or unindented json, or an ascii table (tabby) (depending on *Client#OutputStyle) to stdout
Click to show internal directories.
Click to hide internal directories.