workspace

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check() cli.Action

func ContextValue

func ContextValue(v *Workspace) cli.Action

ContextValue provides an action that sets the given value into the context. The only supported type is *Workspace.

func Fmt

func Fmt(paramsopt ...FormatParams) cli.Action

Fmt returns an action which formats source. The parameters specify which files to format. When the parameters are not specified, the parameters are gathered from the action's context. Also when the parameters are not specified, the action contains an initializer that contains args and flags meant to provide useful default configuration.

func ListDevices

func ListDevices(detailedopt ...bool) cli.Action

ListDevices provides an action which prints out the information about devices. If present, detailedopt controls the verbosity. When not present, a flag --verbose is consulted to control it

Types

type CheckParams

type CheckParams struct {
	Files *cli.FileSet
}

type FormatParams

type FormatParams struct {
	Files *cli.FileSet
	Write bool
}

type Workspace

type Workspace struct {
	cli.Action

	*joeconfig.Workspace

	Directory string
	Allocator *automation.Allocator
	// contains filtered or unexported fields
}

func FromContext

func FromContext(ctx context.Context) *Workspace

FromContext gets the Workspace from the context otherwise panics

func New

func New() *Workspace

New creates a new workspace

func (*Workspace) AutogunDir

func (w *Workspace) AutogunDir() string

AutogunDir gets the directory where workspace metadata is stored

func (*Workspace) Dir

func (w *Workspace) Dir() string

Dir gets the workspace directory, normalized

func (*Workspace) EnsureAllocator

func (w *Workspace) EnsureAllocator() *automation.Allocator

TODO This should not be API

func (*Workspace) Load

func (w *Workspace) Load() (*model.Model, error)

Load scans the workspace for configuration files and builds a Model from the automations they declare.

func (*Workspace) Model

func (w *Workspace) Model() *model.Model

Model obtains the model for the workspace. This method implicitly loads the workspace and panics when the workspace cannot be loaded. Investigate Workspace.Load to load while handling load errors

func (*Workspace) Pipeline

func (w *Workspace) Pipeline() cli.Action

Jump to

Keyboard shortcuts

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