workspace

package
v0.5.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Workspace

type Workspace struct {
	Path string
	Mod  *modconfig.Mod

	// maps of mod resources from this mod and ALL DEPENDENCIES, keyed by long and short names
	QueryMap     map[string]*modconfig.Query
	ControlMap   map[string]*modconfig.Control
	BenchmarkMap map[string]*modconfig.Benchmark
	ModMap       map[string]*modconfig.Mod
	// contains filtered or unexported fields
}

func Load

func Load(workspacePath string) (*Workspace, error)

Load creates a Workspace and loads the workdspace mod

func (*Workspace) Close

func (w *Workspace) Close()

func (*Workspace) GetChildControls added in v0.5.0

func (w *Workspace) GetChildControls() []*modconfig.Control

GetChildControls builds a flat list of all controls in the worlspace, including dependencies

func (*Workspace) GetMod added in v0.5.0

func (w *Workspace) GetMod(modName string) *modconfig.Mod

GetMod attempts to return the mod with a name matching 'modName' It first checks the workspace mod, then checks all mod dependencies

func (*Workspace) GetNamedQuery

func (w *Workspace) GetNamedQuery(queryName string) (*modconfig.Query, bool)

func (*Workspace) GetNamedQueryMap

func (w *Workspace) GetNamedQueryMap() map[string]*modconfig.Query

func (*Workspace) GetResourceMaps added in v0.5.0

func (w *Workspace) GetResourceMaps() *modconfig.WorkspaceResourceMaps

func (*Workspace) LoadExclusions

func (w *Workspace) LoadExclusions() error

func (*Workspace) Mods added in v0.5.0

func (w *Workspace) Mods() []*modconfig.Mod

Mods returns a flat list of all mods - the workspace mod and depdnency mods

func (*Workspace) SetupWatcher

func (w *Workspace) SetupWatcher(client *db.Client) error

Jump to

Keyboard shortcuts

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