workspace

package
v0.1.0-beta.202310160236 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNoModDefinition = fmt.Errorf("This command requires a mod definition file (mod.sp) - could not find in the current directory tree.\n\nYou can either clone a mod repository or install a mod using %s and run this command from the cloned/installed mod directory.\nPlease refer to: https://steampipe.io/docs/mods/overview", constants.Bold("steampipe mod install"))
)
View Source
var EventCount int64 = 0

Functions

func LoadResourceNames

func LoadResourceNames(ctx context.Context, workspacePath string) (*modconfig.WorkspaceResources, error)

LoadResourceNames builds lists of all workspace resource names

func LoadVariables

func LoadVariables(ctx context.Context, workspacePath string, fileInclusions []string) ([]*modconfig.Variable, *error_helpers.ErrorAndWarnings)

LoadVariables creates a Workspace and uses it to load all variables, ignoring any value resolution errors this is use for the variable list command

Types

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

	// source snapshot paths
	// if this is set, no other mod resources are loaded and
	// the ResourceMaps returned by GetModResources will contain only the snapshots
	SourceSnapshots []string

	// should we load/watch files recursively
	ListFlag       filehelpers.ListFlag
	FileInclusions []string
	// contains filtered or unexported fields
}

func Load

func Load(ctx context.Context, workspacePath string) (*Workspace, *error_helpers.ErrorAndWarnings)

Load creates a Workspace and loads the workspace mod

func LoadWithParams

func LoadWithParams(ctx context.Context, workspacePath string, fileInclusions []string) (*Workspace, *error_helpers.ErrorAndWarnings)

func LoadWorkspacePromptingForVariables

func LoadWorkspacePromptingForVariables(ctx context.Context) (*Workspace, *error_helpers.ErrorAndWarnings)

func (*Workspace) Close

func (w *Workspace) Close()

func (*Workspace) ModfileExists

func (w *Workspace) ModfileExists() bool

func (*Workspace) SetOnFileWatcherEventMessages

func (w *Workspace) SetOnFileWatcherEventMessages(f func())

func (*Workspace) SetupWatcher

func (w *Workspace) SetupWatcher(ctx context.Context, errorHandler func(context.Context, error)) error

func (*Workspace) UnregisterDashboardEventHandlers

func (w *Workspace) 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