github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/pkg/interactive/metaquery/handler_input.go (about)

     1  package metaquery
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/c-bata/go-prompt"
     7  	"github.com/turbot/steampipe/pkg/db/db_common"
     8  	"github.com/turbot/steampipe/pkg/steampipeconfig"
     9  )
    10  
    11  type ConnectionStateGetter func(context.Context) (steampipeconfig.ConnectionStateMap, error)
    12  
    13  // HandlerInput defines input data for the metaquery handler
    14  type HandlerInput struct {
    15  	Client db_common.Client
    16  	Schema *db_common.SchemaMetadata
    17  
    18  	Prompt                *prompt.Prompt
    19  	ClosePrompt           func()
    20  	Query                 string
    21  	GetConnectionStateMap ConnectionStateGetter
    22  	SearchPath            []string
    23  }
    24  
    25  func (h *HandlerInput) args() []string {
    26  	return getArguments(h.Query)
    27  }