Documentation ¶
Index ¶
- Variables
- func EnsureSessionData(ctx context.Context, source *SessionDataSource, ...) (err error, warnings []string)
- func LoadResourceNames(workspacePath string) (*modconfig.WorkspaceResources, error)
- func LoadVariables(ctx context.Context, workspacePath string) ([]*modconfig.Variable, error)
- type SessionDataSource
- type Workspace
- func (w *Workspace) CheckRequiredPluginsInstalled() error
- func (w *Workspace) Close()
- func (w *Workspace) GetControl(controlName string) (*modconfig.Control, bool)
- func (w *Workspace) GetQueriesFromArgs(args []string) ([]string, *modconfig.ModResources, error)
- func (w *Workspace) GetQuery(queryName string) (*modconfig.Query, bool)
- func (w *Workspace) GetResourceMaps() *modconfig.ModResources
- func (w *Workspace) ModfileExists() bool
- func (w *Workspace) PublishDashboardEvent(e dashboardevents.DashboardEvent)
- func (w *Workspace) RegisterDashboardEventHandler(handler dashboardevents.DashboardEventHandler)
- func (w *Workspace) ResolveQueryAndArgsFromSQLString(sqlString string) (string, modconfig.QueryProvider, error)
- func (w *Workspace) ResolveQueryFromQueryProvider(queryProvider modconfig.QueryProvider, runtimeArgs *modconfig.QueryArgs) (*modconfig.ResolvedQuery, error)
- func (w *Workspace) SetOnFileWatcherEventMessages(f func())
- func (w *Workspace) SetupWatcher(ctx context.Context, client db_common.Client, ...) error
- func (w *Workspace) ValidateSteampipeVersion() error
Constants ¶
This section is empty.
Variables ¶
var (
ErrorNoModDefinition = errors.New("this command requires a mod definition file - could not find in the current directory tree")
)
Functions ¶
func EnsureSessionData ¶ added in v0.8.3
func EnsureSessionData(ctx context.Context, source *SessionDataSource, session *db_common.DatabaseSession) (err error, warnings []string)
EnsureSessionData determines whether session scoped data (introspection tables and prepared statements) exists for this session, and if not, creates it
func LoadResourceNames ¶ added in v0.8.0
func LoadResourceNames(workspacePath string) (*modconfig.WorkspaceResources, error)
LoadResourceNames builds lists of all workspace resource names
Types ¶
type SessionDataSource ¶ added in v0.8.3
type SessionDataSource struct { PreparedStatementSource func() *modconfig.ModResources IntrospectionTableSource func() *modconfig.ModResources }
func NewSessionDataSource ¶ added in v0.8.3
func NewSessionDataSource(w *Workspace, preparedStatementSource *modconfig.ModResources) *SessionDataSource
NewSessionDataSource uses the workspace and (optionally) a separate the prepared statemeot source and returns a SessionDataSource NOTE: preparedStatementSource is only set if specific queries have ben passed to the query command it allows us to only create the prepared statements me need
type Workspace ¶
type Workspace struct { Path string ModInstallationPath string Mod *modconfig.Mod Mods map[string]*modconfig.Mod // the input variables used in the parse VariableValues map[string]string CloudMetadata *steampipeconfig.CloudMetadata // contains filtered or unexported fields }
func (*Workspace) CheckRequiredPluginsInstalled ¶ added in v0.6.0
func (*Workspace) GetControl ¶ added in v0.6.1
func (*Workspace) GetQueriesFromArgs ¶ added in v0.8.0
GetQueriesFromArgs retrieves queries from args
For each arg check if it is a named query or a file, before falling back to treating it as sql
func (*Workspace) GetResourceMaps ¶ added in v0.5.0
func (w *Workspace) GetResourceMaps() *modconfig.ModResources
GetResourceMaps implements ModResourcesProvider
func (*Workspace) ModfileExists ¶ added in v0.13.0
func (*Workspace) PublishDashboardEvent ¶ added in v0.13.0
func (w *Workspace) PublishDashboardEvent(e dashboardevents.DashboardEvent)
func (*Workspace) RegisterDashboardEventHandler ¶ added in v0.13.0
func (w *Workspace) RegisterDashboardEventHandler(handler dashboardevents.DashboardEventHandler)
RegisterDashboardEventHandler starts the event handler goroutine if necessary and adds the event handler to our list
func (*Workspace) ResolveQueryAndArgsFromSQLString ¶ added in v0.13.0
func (w *Workspace) ResolveQueryAndArgsFromSQLString(sqlString string) (string, modconfig.QueryProvider, error)
ResolveQueryAndArgsFromSQLString attempts to resolve 'arg' to a query and query args
func (*Workspace) ResolveQueryFromQueryProvider ¶ added in v0.13.0
func (w *Workspace) ResolveQueryFromQueryProvider(queryProvider modconfig.QueryProvider, runtimeArgs *modconfig.QueryArgs) (*modconfig.ResolvedQuery, error)
ResolveQueryFromQueryProvider resolves the query for the given QueryProvider
func (*Workspace) SetOnFileWatcherEventMessages ¶ added in v0.10.0
func (w *Workspace) SetOnFileWatcherEventMessages(f func())