Documentation
¶
Index ¶
- func Execute(args []string) error
- func ExitCode(err error) int
- func VersionString() string
- type CLI
- type CountCmd
- type DoctorCmd
- type ExitError
- type FieldsCmd
- type FieldsListCmd
- type IndicesCmd
- type IndicesListCmd
- type MappingsCmd
- type MappingsGetCmd
- type ProfileCmd
- type ProfileListCmd
- type ProfilePathCmd
- type ProfileShowCmd
- type ProfileTestCmd
- type RawCmd
- type RootFlags
- type SampleCmd
- type SchemaCmd
- type SearchCmd
- type TargetCmd
- type TargetListCmd
- type TargetShowCmd
- type VersionCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VersionString ¶
func VersionString() string
Types ¶
type CLI ¶
type CLI struct {
RootFlags `embed:""`
Version kong.VersionFlag `help:"Print version and exit"`
Profile ProfileCmd `cmd:"" help:"Inspect configured profiles"`
Doctor DoctorCmd `cmd:"" help:"Validate config, auth, connectivity, and engine detection"`
Search SearchCmd `cmd:"" help:"Search logs/documents using query_string or raw body"`
Sample SampleCmd `cmd:"" help:"Fetch one or a few sample documents"`
Count CountCmd `cmd:"" help:"Count matching documents"`
Raw RawCmd `cmd:"" help:"Run an arbitrary HTTP request against the cluster"`
Indices IndicesCmd `cmd:"" aliases:"index" help:"Index discovery helpers"`
Fields FieldsCmd `cmd:"" aliases:"field" help:"Field discovery helpers"`
Mappings MappingsCmd `cmd:"" aliases:"mapping" help:"Mapping inspection helpers"`
Target TargetCmd `cmd:"" help:"Inspect configured targets in the selected profile"`
Schema SchemaCmd `cmd:"" help:"Machine-readable command schema"`
VersionCmd VersionCmd `cmd:"" name:"version" help:"Print version/build info"`
}
type CountCmd ¶
type CountCmd struct {
Query string `arg:"" optional:"" name:"query" help:"query_string query"`
QueryFlag string `name:"query" short:"q" help:"query_string query (alternative to positional arg)"`
Index []string `name:"index" short:"i" help:"Index pattern to count (repeatable)"`
Target string `help:"Target name from selected profile"`
From string `help:"Start timestamp (RFC3339)"`
To string `help:"End timestamp (RFC3339)"`
Last string `help:"Relative lookback duration like 30m, 4h, 24h" default:"1h"`
TimeField string `name:"time-field" help:"Override time field"`
Body string `help:"Inline JSON body or @path/to/file.json"`
}
type FieldsCmd ¶
type FieldsCmd struct {
List FieldsListCmd `cmd:"" help:"List fields using _field_caps"`
}
type FieldsListCmd ¶
type IndicesCmd ¶
type IndicesCmd struct {
List IndicesListCmd `cmd:"" help:"List indices"`
}
type IndicesListCmd ¶
type IndicesListCmd struct {
Index []string `name:"index" short:"i" help:"Optional index pattern filter (repeatable)"`
}
type MappingsCmd ¶
type MappingsCmd struct {
Get MappingsGetCmd `cmd:"" help:"Get mappings for indices"`
}
type MappingsGetCmd ¶
type ProfileCmd ¶
type ProfileCmd struct {
List ProfileListCmd `cmd:"" help:"List configured profiles"`
Show ProfileShowCmd `cmd:"" help:"Show one configured profile"`
Path ProfilePathCmd `cmd:"" help:"Print config file path"`
Test ProfileTestCmd `cmd:"" help:"Test connectivity using a configured profile"`
}
type ProfileListCmd ¶
type ProfileListCmd struct{}
type ProfilePathCmd ¶
type ProfilePathCmd struct{}
type ProfileShowCmd ¶
type ProfileShowCmd struct {
Name string `arg:"" help:"Profile name"`
}
type ProfileTestCmd ¶
type ProfileTestCmd struct {
Name string `arg:"" optional:"" help:"Profile name (defaults to selected/default profile)"`
}
type RawCmd ¶
type RootFlags ¶
type RootFlags struct {
Profile string `help:"Profile name from config" short:"p"`
Endpoint string `help:"Override cluster endpoint URL" env:"ESQ_ENDPOINT"`
Color string `help:"Color output: auto|always|never" default:"auto" enum:"auto,always,never"`
JSON bool `help:"Output JSON to stdout" short:"j" aliases:"machine"`
Plain bool `help:"Output stable parseable text to stdout" aliases:"tsv"`
ResultsOnly bool `name:"results-only" help:"In JSON mode, emit only primary result data where possible"`
Select string `help:"In JSON mode, select comma-separated fields" aliases:"pick,project"`
NoInput bool `help:"Never prompt; fail instead"`
Verbose bool `help:"Enable verbose logging" short:"v"`
}
type SampleCmd ¶
type SampleCmd struct {
Query string `arg:"" optional:"" name:"query" help:"query_string query"`
QueryFlag string `name:"query" short:"q" help:"query_string query (alternative to positional arg)"`
Index []string `name:"index" short:"i" help:"Index pattern to sample (repeatable)"`
Target string `help:"Target name from selected profile"`
From string `help:"Start timestamp (RFC3339)"`
To string `help:"End timestamp (RFC3339)"`
Last string `help:"Relative lookback duration like 30m, 4h, 24h" default:"1h"`
Size int `help:"Number of sample hits to return" default:"3"`
Sort string `help:"Sort order for time field" enum:"asc,desc" default:"desc"`
TimeField string `name:"time-field" help:"Override time field"`
Columns string `help:"Comma-separated fields to render in human output"`
Source string `help:"Comma-separated _source fields to request"`
Body string `help:"Inline JSON body or @path/to/file.json"`
}
type SchemaCmd ¶
type SearchCmd ¶
type SearchCmd struct {
Query string `arg:"" optional:"" name:"query" help:"query_string query"`
QueryFlag string `name:"query" short:"q" help:"query_string query (alternative to positional arg)"`
Index []string `name:"index" short:"i" help:"Index pattern to search (repeatable)"`
Target string `help:"Target name from selected profile"`
From string `help:"Start timestamp (RFC3339)"`
To string `help:"End timestamp (RFC3339)"`
Last string `help:"Relative lookback duration like 30m, 4h, 24h" default:"1h"`
Size int `help:"Number of hits to return" default:"50"`
Sort string `help:"Sort order for time field" enum:"asc,desc" default:"desc"`
TimeField string `name:"time-field" help:"Override time field"`
Columns string `help:"Comma-separated fields to render in human output"`
Source string `help:"Comma-separated _source fields to request"`
Body string `help:"Inline JSON body or @path/to/file.json"`
}
type TargetCmd ¶
type TargetCmd struct {
List TargetListCmd `cmd:"" help:"List targets in the selected profile"`
Show TargetShowCmd `cmd:"" help:"Show one target from the selected profile"`
}
type TargetListCmd ¶
type TargetListCmd struct{}
type TargetShowCmd ¶
type TargetShowCmd struct {
Name string `arg:"" help:"Target name"`
}
type VersionCmd ¶
type VersionCmd struct{}
Click to show internal directories.
Click to hide internal directories.