workspace

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Overview

Package workspace represents the workspace for Pastiche

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearLogs

func ClearLogs() cli.Action

ClearLogs removes logs from the workspace

func ContextValue added in v0.5.0

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 Env added in v0.5.0

func Env() cli.Action

func FlagsAndArgs added in v0.5.0

func FlagsAndArgs() cli.Action

FlagsAndArgs adds flags supporting the workspace. Despite its name, which is conventional, this action adds to args.

func Init added in v0.5.0

func Init() cli.Action

func Log

func Log() cli.Action

Log provides the action to access logs

func SetDisableValidation added in v0.5.0

func SetDisableValidation() cli.Action

SetDisableValidation disables validattion of configuration in the workspace

Types

type InitServiceCommand added in v0.5.0

type InitServiceCommand struct {
	Title       string
	Name        string
	Description string

	cli.Action
}

func NewInitServiceCommand added in v0.5.0

func NewInitServiceCommand() *InitServiceCommand

type Option added in v0.5.0

type Option interface {
	cli.Action
	// contains filtered or unexported methods
}

Option sets up an option to configure the workspace

func DisableValidation added in v0.5.0

func DisableValidation() Option

type Workspace added in v0.5.0

type Workspace struct {
	// Action provides the action to provide when the workspace is
	// added to a pipeline.
	cli.Action

	*joeconfig.Workspace
	// contains filtered or unexported fields
}

Workspace represents the information about the Pastiche workspace

func FromContext added in v0.5.0

func FromContext(ctx context.Context) *Workspace

FromContext gets the Workspace from the context otherwise panics

func New added in v0.5.0

func New(opts ...Option) *Workspace

New creates a new workspace

func (*Workspace) ClearLogDir added in v0.5.0

func (w *Workspace) ClearLogDir() error

func (*Workspace) Env added in v0.5.0

func (w *Workspace) Env() iter.Seq2[string, string]

func (*Workspace) Load added in v0.5.0

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

Load will load the workspace, returning the error that occurred on load.

func (*Workspace) LogDir added in v0.5.0

func (w *Workspace) LogDir() string

func (*Workspace) Model added in v0.5.0

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 added in v0.5.0

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

func (*Workspace) PrintEnv added in v0.5.0

func (w *Workspace) PrintEnv()

PrintEnv prints the environment to stdout

Jump to

Keyboard shortcuts

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