metaquery

package
v0.22.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Complete

func Complete(input *CompleterInput) []prompt.Suggest

Complete returns completions for metaqueries.

func Handle

func Handle(ctx context.Context, input *HandlerInput) error

Handle handles a metaquery execution from the interactive client

func IsMetaQuery

func IsMetaQuery(query string) bool

IsMetaQuery returns whether the query is a metaquery

func PromptSuggestions

func PromptSuggestions() []prompt.Suggest

PromptSuggestions returns a list of the metaquery suggestions for go-prompt

Types

type CompleterInput

type CompleterInput struct {
	Query            string
	TableSuggestions []prompt.Suggest
}

CompleterInput is a struct defining input data for the metaquery completer

type ConnectionStateGetter added in v0.21.4

type ConnectionStateGetter func(context.Context) (steampipeconfig.ConnectionStateMap, error)

type HandlerInput

type HandlerInput struct {
	Client db_common.Client
	Schema *db_common.SchemaMetadata

	Prompt                *prompt.Prompt
	ClosePrompt           func()
	Query                 string
	GetConnectionStateMap ConnectionStateGetter
	SearchPath            []string
}

HandlerInput defines input data for the metaquery handler

type ValidationResult

type ValidationResult struct {
	Err       error
	Message   string
	ShouldRun bool
}

ValidationResult :: response for Validate

func Validate

func Validate(query string) ValidationResult

Validate :: validate a full metaquery along with arguments - we can return err & validationResult

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL