Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CLI struct { Debug bool `help:"Enable debug mode."` Configure ConfigureCmd `cmd help:"Init ES server configs"` List ListCmd `cmd help:"Show the current server configs"` Search SearchCmd `cmd help:"Search for data"` Use UseCmd `cmd help:"Switch between configured server/role"` }
CLI represents possible CLI options.
Functions ¶
This section is empty.
Types ¶
type ConfigureCmd ¶
type ConfigureCmd struct { Server bool `optional help:"Add a new server definition"` Role bool `optional help:"Add a new role definition"` Reset bool `optional help:"Reset the whole configuration"` }
ConfigureCmd represents CLI arguments for configure option.
func (*ConfigureCmd) Run ¶
func (c *ConfigureCmd) Run(ctx *Context) error
Run the configure option. It can configure both server and role definitions. Saves each definition in the config file.
type Context ¶
type Context struct { Debug bool Configuration config.Configuration }
Context configuration.
type Option ¶
type Option struct { Context *kong.Context ConfigFile config.Configuration }
Option represents a common configuration for all options.
type ResponseData ¶
type ResponseData struct {
Payload map[string]interface{}
}
ResponseData represents the response payload.
type SearchCmd ¶
type SearchCmd struct { Query string `optional help:"Text input to query data. Use the same format as you would use in Kibana"` Older string `` /* 155-byte string literal not displayed */ Newer string `` /* 146-byte string literal not displayed */ Limit int32 `optional default:"50" help:"Limit the number of messages fetched"` Server string `optional help:"Which server to query against. Used to override the current server config"` // contains filtered or unexported fields }
SearchCmd represents CLI arguments for search option.
func (*SearchCmd) AfterApply ¶
func (s *SearchCmd) AfterApply(h *utils.DefaultHTTPClient) error
AfterApply defines the http client instance to used once search option is identified to take execution.
func (*SearchCmd) NewerAsTimestamp ¶
NewerAsTimestamp converts a ISO-8601 period as string in timestamp.
func (*SearchCmd) OlderAsTimestamp ¶
OlderAsTimestamp converts a ISO-8601 period as string in timestamp.
type SearchParams ¶
type SearchParams struct { Index string Size int32 WindowFilter string Zone string Clause string Older int64 Newer int64 }
SearchParams represents attributes used to query for data.
type UseCmd ¶
type UseCmd struct { Server string `optional help:"Set what server to use when querying ES"` Role string `optional help:"Set what role to use when querying ES"` }
UseCmd represents CLI arguments for use option.