workspace

package
v0.7.1-debug.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: AGPL-3.0 Imports: 21 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
	ReportMap    map[string]*modconfig.Report
	PanelMap     map[string]*modconfig.Panel
	// contains filtered or unexported fields
}

func Load

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

Load creates a Workspace and loads the workspace mod

func (*Workspace) CheckRequiredPluginsInstalled added in v0.6.0

func (w *Workspace) CheckRequiredPluginsInstalled() error

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) GetControl added in v0.6.1

func (w *Workspace) GetControl(controlName string) (*modconfig.Control, bool)

func (*Workspace) GetControlMap added in v0.6.1

func (w *Workspace) GetControlMap() map[string]*modconfig.Control

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) GetQuery added in v0.6.1

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

func (*Workspace) GetQueryMap added in v0.6.1

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

func (*Workspace) GetResourceMaps added in v0.5.0

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

func (*Workspace) GetSortedBenchmarksAndControlNames added in v0.6.0

func (w *Workspace) GetSortedBenchmarksAndControlNames() []string

func (*Workspace) GetSortedNamedQueryNames added in v0.6.0

func (w *Workspace) GetSortedNamedQueryNames() []string

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) PublishReportEvent added in v0.7.1

func (w *Workspace) PublishReportEvent(e reportevents.ReportEvent)

func (*Workspace) RegisterReportEventHandler added in v0.7.1

func (w *Workspace) RegisterReportEventHandler(handler reportevents.ReportEventHandler)

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