workspace

package
v1.1.0-alpha.202411240806 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventCount int64 = 0

Functions

func ResolveResourceAndArgsFromSQLString

func ResolveResourceAndArgsFromSQLString[T modconfig.ModTreeItem](sqlString string, w *workspace.Workspace) (modconfig.ModTreeItem, *resources.QueryArgs, error)

ResolveResourceAndArgsFromSQLString attempts to resolve 'arg' to a resource of type T and (optionally) query args

func SqlLooksLikeExecutableResource

func SqlLooksLikeExecutableResource(input string) (string, bool)

Types

type LoadPowerpipeWorkspaceConfig

type LoadPowerpipeWorkspaceConfig struct {
	// contains filtered or unexported fields
}

type LoadPowerpipeWorkspaceOption

type LoadPowerpipeWorkspaceOption func(*LoadPowerpipeWorkspaceConfig)

func WithBlockType

func WithBlockType(blockTypeInclusions []string) LoadPowerpipeWorkspaceOption

func WithLateBinding

func WithLateBinding(enabled bool) LoadPowerpipeWorkspaceOption

func WithPipelingConnections

func WithPipelingConnections(pipelingConnections map[string]connection.PipelingConnection) LoadPowerpipeWorkspaceOption

func WithSkipResourceLoadIfNoModfile

func WithSkipResourceLoadIfNoModfile(enabled bool) LoadPowerpipeWorkspaceOption

TODO this is only needed as Pipe fittings tests rely on loading workspaces without modfiles

func WithVariableValidation

func WithVariableValidation(enabled bool) LoadPowerpipeWorkspaceOption

type PowerpipeWorkspace

type PowerpipeWorkspace struct {
	workspace.Workspace
	// contains filtered or unexported fields
}

func LoadWorkspacePromptingForVariables

func LoadWorkspacePromptingForVariables(ctx context.Context, workspacePath string, opts ...LoadPowerpipeWorkspaceOption) (*PowerpipeWorkspace, error_helpers.ErrorAndWarnings)

func NewPowerpipeWorkspace

func NewPowerpipeWorkspace(workspacePath string) *PowerpipeWorkspace

func (*PowerpipeWorkspace) Close

func (w *PowerpipeWorkspace) Close()

func (*PowerpipeWorkspace) GetPowerpipeModResources

func (w *PowerpipeWorkspace) GetPowerpipeModResources() *resources.PowerpipeModResources

GetPowerpipeModResources returns the powerpipe PowerpipeModResources from the workspace, cast to the correct type

func (*PowerpipeWorkspace) GetQueryProvider

func (w *PowerpipeWorkspace) GetQueryProvider(queryName string) (resources.QueryProvider, bool)

func (*PowerpipeWorkspace) PublishDashboardEvent

func (w *PowerpipeWorkspace) PublishDashboardEvent(ctx context.Context, e dashboardevents.DashboardEvent)

func (*PowerpipeWorkspace) RegisterDashboardEventHandler

func (w *PowerpipeWorkspace) RegisterDashboardEventHandler(ctx context.Context, handler dashboardevents.DashboardEventHandler)

RegisterDashboardEventHandler starts the event handler goroutine if necessary and adds the event handler to our list

func (*PowerpipeWorkspace) ResolveQueryFromQueryProvider

func (w *PowerpipeWorkspace) ResolveQueryFromQueryProvider(queryProvider resources.QueryProvider, runtimeArgs *resources.QueryArgs) (*modconfig.ResolvedQuery, error)

ResolveQueryFromQueryProvider resolves the query for the given QueryProvider

func (*PowerpipeWorkspace) UnregisterDashboardEventHandlers

func (w *PowerpipeWorkspace) UnregisterDashboardEventHandlers()

UnregisterDashboardEventHandlers clears all event handlers used when generating multiple snapshots

Jump to

Keyboard shortcuts

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