Documentation ¶
Index ¶
- Variables
- type CommandLine
- func (c *CommandLine) Connect(cmd string) error
- func (c *CommandLine) DatabaseToken() (string, error)
- func (c *CommandLine) ExecuteQuery(query string) error
- func (c *CommandLine) FormatResponse(response *client.Response, w io.Writer)
- func (c *CommandLine) Insert(stmt string) error
- func (c *CommandLine) ParseCommand(cmd string) error
- func (c *CommandLine) Run() error
- func (c *CommandLine) SetAuth(cmd string)
- func (c *CommandLine) SetFormat(cmd string)
- func (c *CommandLine) SetPrecision(cmd string)
- func (c *CommandLine) SetWriteConsistency(cmd string)
- func (c *CommandLine) Settings()
- func (c *CommandLine) Version()
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBlankCommand = errors.New("empty input")
ErrBlankCommand is returned when a parsed command is empty.
Functions ¶
This section is empty.
Types ¶
type CommandLine ¶
type CommandLine struct { Client *client.Client Line *liner.State Host string Port int UnixSocket string Username string Password string Database string Ssl bool UnsafeSsl bool RetentionPolicy string ClientVersion string ServerVersion string Pretty bool // controls pretty print for json Format string // controls the output format. Valid values are json, csv, or column Precision string WriteConsistency string Execute string ShowVersion bool Import bool PPS int // Controls how many points per second the import will allow via throttling Path string Compressed bool Chunked bool Quit chan struct{} IgnoreSignals bool // Ignore signals normally caught by this process (used primarily for testing) ForceTTY bool // Force the CLI to act as if it were connected to a TTY // contains filtered or unexported fields }
CommandLine holds CLI configuration and state
func (*CommandLine) Connect ¶
func (c *CommandLine) Connect(cmd string) error
Connect connects client to a server
func (*CommandLine) DatabaseToken ¶
func (c *CommandLine) DatabaseToken() (string, error)
DatabaseToken retrieves database token
func (*CommandLine) ExecuteQuery ¶
func (c *CommandLine) ExecuteQuery(query string) error
ExecuteQuery runs any query statement
func (*CommandLine) FormatResponse ¶
func (c *CommandLine) FormatResponse(response *client.Response, w io.Writer)
FormatResponse formats output to previsouly chosen format
func (*CommandLine) Insert ¶
func (c *CommandLine) Insert(stmt string) error
Insert runs an INSERT statement
func (*CommandLine) ParseCommand ¶
func (c *CommandLine) ParseCommand(cmd string) error
ParseCommand parses an instruction and calls related method, if any
func (*CommandLine) SetAuth ¶
func (c *CommandLine) SetAuth(cmd string)
SetAuth sets client authentication credentials
func (*CommandLine) SetFormat ¶
func (c *CommandLine) SetFormat(cmd string)
SetFormat sets output format
func (*CommandLine) SetPrecision ¶
func (c *CommandLine) SetPrecision(cmd string)
SetPrecision sets client precision
func (*CommandLine) SetWriteConsistency ¶
func (c *CommandLine) SetWriteConsistency(cmd string)
SetWriteConsistency sets cluster consistency level
Click to show internal directories.
Click to hide internal directories.