Documentation
¶
Overview ¶
Package workspace represents the workspace for Pastiche
Index ¶
- func ContextValue(v *Workspace) cli.Action
- func Describe(paramsopt ...*DescribeParams) cli.Action
- func FlagsAndArgs() cli.Action
- type Action
- type DescribeParams
- type InitParams
- type Option
- type Workspace
- func (w *Workspace) ConfigDir() string
- func (w *Workspace) Describe(out cli.Writer, p *DescribeParams) error
- func (w *Workspace) Dir() string
- func (w *Workspace) Load() (*model.Model, error)
- func (w *Workspace) Log() *logs.Log
- func (w *Workspace) LogDir() string
- func (w *Workspace) Model() *model.Model
- func (w *Workspace) Pipeline() cli.Action
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextValue ¶ added in v0.5.0
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
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
Action provides a workspace action
func Init ¶ added in v0.5.0
func Init(paramsopt ...*InitParams) Action
Init provides the action for initializing a new service definition
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 Option ¶ added in v0.5.0
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
FromContext gets the Workspace from the context otherwise panics
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) Load ¶ added in v0.5.0
Load will load the workspace, returning the error that occurred on load.
func (*Workspace) Model ¶ added in v0.5.0
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