Documentation
¶
Overview ¶
Package cli contains a FeatureBase command line interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CloudAuthConfig ¶ added in v3.33.0
type Command ¶ added in v3.33.0
type Command struct {
Queryer Queryer `json:"-"`
Stdin io.ReadCloser `json:"-"`
Stdout io.Writer `json:"-"`
Stderr io.Writer `json:"-"`
Config *Config `json:"config"`
// Commands contains optional commands provided via one or more `-c` (or
// `--command`) flags. If this is non-empty, the cli will run in
// non-interactive mode; i.e. it will quit after the command is complete.
Commands []string `json:"commands"`
// Files contains optional files provided via one or more `-f` (or `--file`)
// flags. If this is non-empty, the cli will run in non-interactive mode;
// i.e. it will quit after the command is complete.
Files []string `json:"files"`
// contains filtered or unexported fields
}
func NewCommand ¶ added in v3.33.0
func (*Command) Errorf ¶ added in v3.33.0
Errorf is a helper method which sends the given payload to stderr.
func (*Command) Outputf ¶ added in v3.33.0
Outputf is a helper method which sends the given payload to output.
type Config ¶ added in v3.33.0
type Config struct {
Host string `json:"host"`
Port string `json:"port"`
OrganizationID string `json:"org-id"`
Database string `json:"db"`
// CloudAuth
CloudAuth CloudAuthConfig `json:"cloud-auth"`
HistoryPath string `json:"history-path"`
}
Config represents the configuration for the command.
type Queryer ¶
type Queryer interface {
Query(org string, db string, sql io.Reader) (*featurebase.WireQueryResponse, error)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.