workspace

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: BSD-3-Clause Imports: 25 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package workspace represents the workspace for Pastiche

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

func Describe(paramsopt ...*DescribeParams) cli.Action

Describe provides the action for describing a resource

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.

Types

type Action added in v0.6.0

type Action = cli.Action

Action provides a workspace action

func Env added in v0.5.0

func Env() Action

func Init added in v0.5.0

func Init(paramsopt ...*InitParams) Action

Init provides the action for initializing a new service definition

func Log

func Log() Action

Log provides the action to access logs

func SetDisableValidation added in v0.5.0

func SetDisableValidation() Action

SetDisableValidation disables validattion of configuration in the workspace

type DescribeParams added in v0.6.0

type DescribeParams struct {
	Spec   *model.ServiceSpec
	Kind   model.ItemKind
	Tags   []string
	Method string

	// List prints the names and kinds of the matching items rather than
	// their definitions
	List bool

	// Tree prints the names of the matching items as a tree rather than
	// their definitions
	Tree bool

	// Output encodes the definitions which are printed.  When nil, YAML is
	// used.  List and Output are mutually exclusive.
	Output joecodec.Interface
}

func (*DescribeParams) SearchCriteria added in v0.6.0

func (p *DescribeParams) SearchCriteria() *model.SearchCriteria

SearchCriteria obtains the criteria which the describe parameters select

type InitParams added in v0.6.0

type InitParams struct {
	Name        string
	Title       string
	Description string
	Comment     string
	Tags        []string
}

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
	// 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) ConfigDir added in v0.6.0

func (w *Workspace) ConfigDir() string

func (*Workspace) Describe added in v0.6.0

func (w *Workspace) Describe(out cli.Writer, p *DescribeParams) error

Describe prints the items in the workspace which match the given parameters, either as their configuration or, when a list was requested, as the names and kinds of the items

func (*Workspace) Dir added in v0.6.0

func (w *Workspace) Dir() 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) Log added in v0.6.0

func (w *Workspace) Log() *logs.Log

Log retrieves the workspace request log.

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

Directories

Path Synopsis
Package logs provides the JSON representation of history log entries and writes them to the log files within the workspace.
Package logs provides the JSON representation of history log entries and writes them to the log files within the workspace.

Jump to

Keyboard shortcuts

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