Documentation
¶
Index ¶
- Constants
- Variables
- func NewExecutableID(workspace, namespace, name string) string
- func ParseExecutableID(id string) (workspace, namespace, name string)
- type Aliases
- type DirectoryScopedExecutable
- type ExecExecutableType
- type Executable
- func (e *Executable) AliasesIDs() []string
- func (e *Executable) DefinitionPath() string
- func (e *Executable) ID() string
- func (e *Executable) IsExecutableFromWorkspace(workspace string) bool
- func (e *Executable) IsVisibleFromWorkspace(workspaceFilter string) bool
- func (e *Executable) MergeTags(tags Tags)
- func (e *Executable) MergeVisibility(visibility VisibilityType)
- func (e *Executable) NameEquals(name string) bool
- func (e *Executable) Ref() Ref
- func (e *Executable) SetContext(workspaceName, workspacePath, namespace, definitionPath string)
- func (e *Executable) SetDefaults()
- func (e *Executable) Validate() error
- func (e *Executable) WorkspacePath() string
- type ExecutableContext
- type ExecutableDefinition
- type ExecutableDefinitionList
- type ExecutableList
- func (l ExecutableList) FilterByNamespace(ns string) ExecutableList
- func (l ExecutableList) FilterByTags(tags Tags) ExecutableList
- func (l ExecutableList) FilterByVerb(verb Verb) ExecutableList
- func (l ExecutableList) FilterByWorkspace(ws string) ExecutableList
- func (l ExecutableList) FindByVerbAndID(verb Verb, id string) (*Executable, error)
- type ExecutableTypeSpec
- type ExecutablesConfig
- type GitConfig
- type LaunchExecutableType
- type LogMode
- type ParallelExecutableType
- type Parameter
- type ParameterList
- type ParameterizedExecutable
- type Ref
- type SerialExecutableType
- type Tags
- type UserConfig
- type Verb
- type VisibilityType
- type WorkspaceConfig
Constants ¶
View Source
const ( ActivateGroupID = "activate" DeactivateGroupID = "deactivate" LaunchGroupID = "launch" )
View Source
const DefaultTimeout = 30 * time.Minute
View Source
const (
ReservedEnvVarPrefix = "FLOW_"
)
Variables ¶
View Source
var ( ValidVerbToGroupID = map[string]string{ "exec": ActivateGroupID, "run": ActivateGroupID, "start": ActivateGroupID, "install": ActivateGroupID, "setup": ActivateGroupID, "delete": DeactivateGroupID, "remove": DeactivateGroupID, "uninstall": DeactivateGroupID, "teardown": DeactivateGroupID, "destroy": DeactivateGroupID, "open": LaunchGroupID, "launch": LaunchGroupID, } ValidVerbs = lo.Keys(ValidVerbToGroupID) )
Functions ¶
func NewExecutableID ¶
func ParseExecutableID ¶
Types ¶
type DirectoryScopedExecutable ¶
type DirectoryScopedExecutable struct {
Directory string `yaml:"dir"`
// contains filtered or unexported fields
}
func (*DirectoryScopedExecutable) ExpandDirectory ¶
func (*DirectoryScopedExecutable) Finalize ¶
func (e *DirectoryScopedExecutable) Finalize()
type ExecExecutableType ¶
type ExecExecutableType struct {
DirectoryScopedExecutable `yaml:",inline"`
ParameterizedExecutable `yaml:",inline"`
Command string `yaml:"cmd"`
File string `yaml:"file"`
LogMode LogMode `yaml:"logMode"`
// contains filtered or unexported fields
}
func (*ExecExecutableType) GetLogFields ¶
func (e *ExecExecutableType) GetLogFields() map[string]interface{}
func (*ExecExecutableType) SetLogFields ¶
func (e *ExecExecutableType) SetLogFields(fields map[string]interface{})
type Executable ¶
type Executable struct {
Verb Verb `yaml:"verb"`
Name string `yaml:"name"`
Aliases []string `yaml:"aliases"`
Tags Tags `yaml:"tags"`
Description string `yaml:"description"`
Visibility VisibilityType `yaml:"visibility"`
Timeout time.Duration `yaml:"timeout"`
Type *ExecutableTypeSpec `yaml:"type"`
// contains filtered or unexported fields
}
func (*Executable) AliasesIDs ¶
func (e *Executable) AliasesIDs() []string
func (*Executable) DefinitionPath ¶
func (e *Executable) DefinitionPath() string
func (*Executable) ID ¶
func (e *Executable) ID() string
func (*Executable) IsExecutableFromWorkspace ¶
func (e *Executable) IsExecutableFromWorkspace(workspace string) bool
IsExecutableFromWorkspace returns true if the executable can be executed from the given workspace.
func (*Executable) IsVisibleFromWorkspace ¶
func (e *Executable) IsVisibleFromWorkspace(workspaceFilter string) bool
IsVisibleFromWorkspace returns true if the executable should be shown in terminal output for the given workspace.
func (*Executable) MergeTags ¶
func (e *Executable) MergeTags(tags Tags)
func (*Executable) MergeVisibility ¶
func (e *Executable) MergeVisibility(visibility VisibilityType)
func (*Executable) NameEquals ¶
func (e *Executable) NameEquals(name string) bool
func (*Executable) Ref ¶
func (e *Executable) Ref() Ref
func (*Executable) SetContext ¶
func (e *Executable) SetContext(workspaceName, workspacePath, namespace, definitionPath string)
func (*Executable) SetDefaults ¶
func (e *Executable) SetDefaults()
func (*Executable) Validate ¶
func (e *Executable) Validate() error
func (*Executable) WorkspacePath ¶
func (e *Executable) WorkspacePath() string
type ExecutableContext ¶
type ExecutableDefinition ¶
type ExecutableDefinition struct {
Namespace string `yaml:"namespace"`
Tags Tags `yaml:"tags"`
Visibility VisibilityType `yaml:"visibility"`
Executables ExecutableList `yaml:"executables"`
// contains filtered or unexported fields
}
func (*ExecutableDefinition) DefinitionPath ¶
func (d *ExecutableDefinition) DefinitionPath() string
func (*ExecutableDefinition) SetContext ¶
func (d *ExecutableDefinition) SetContext(workspaceName, workspacePath, definitionPath string)
func (*ExecutableDefinition) SetDefaults ¶
func (d *ExecutableDefinition) SetDefaults()
func (*ExecutableDefinition) WorkspacePath ¶
func (d *ExecutableDefinition) WorkspacePath() string
type ExecutableDefinitionList ¶
type ExecutableDefinitionList []*ExecutableDefinition
func (*ExecutableDefinitionList) FilterByNamespace ¶
func (l *ExecutableDefinitionList) FilterByNamespace(namespace string) ExecutableDefinitionList
func (*ExecutableDefinitionList) FilterByTag ¶
func (l *ExecutableDefinitionList) FilterByTag(tag string) ExecutableDefinitionList
type ExecutableList ¶
type ExecutableList []*Executable
func (ExecutableList) FilterByNamespace ¶
func (l ExecutableList) FilterByNamespace(ns string) ExecutableList
func (ExecutableList) FilterByTags ¶
func (l ExecutableList) FilterByTags(tags Tags) ExecutableList
func (ExecutableList) FilterByVerb ¶
func (l ExecutableList) FilterByVerb(verb Verb) ExecutableList
func (ExecutableList) FilterByWorkspace ¶
func (l ExecutableList) FilterByWorkspace(ws string) ExecutableList
func (ExecutableList) FindByVerbAndID ¶
func (l ExecutableList) FindByVerbAndID(verb Verb, id string) (*Executable, error)
type ExecutableTypeSpec ¶
type ExecutableTypeSpec struct {
Exec *ExecExecutableType `yaml:"exec,omitempty"`
Launch *LaunchExecutableType `yaml:"launch,omitempty"`
Serial *SerialExecutableType `yaml:"serial,omitempty"`
Parallel *ParallelExecutableType `yaml:"parallel,omitempty"`
}
type ExecutablesConfig ¶
type LaunchExecutableType ¶
type LaunchExecutableType struct {
ParameterizedExecutable `yaml:",inline"`
App string `yaml:"app"`
URI string `yaml:"uri"`
Wait bool `yaml:"wait"`
}
type ParallelExecutableType ¶
type ParallelExecutableType struct {
ParameterizedExecutable `yaml:",inline"`
ExecutableRefs []Ref `yaml:"refs"`
MaxThreads int `yaml:"maxThreads"`
FailFast bool `yaml:"failFast"`
}
type Parameter ¶
type ParameterList ¶
type ParameterList []Parameter
type ParameterizedExecutable ¶
type ParameterizedExecutable struct {
Parameters ParameterList `yaml:"params"`
}
type SerialExecutableType ¶
type SerialExecutableType struct {
ParameterizedExecutable `yaml:",inline"`
ExecutableRefs []Ref `yaml:"refs"`
FailFast bool `yaml:"failFast"`
}
type UserConfig ¶
type UserConfig struct {
Workspaces map[string]string `json:"workspaces" yaml:"workspaces"`
CurrentWorkspace string `json:"currentWorkspace" yaml:"currentWorkspace"`
CurrentNamespace string `json:"currentNamespace" yaml:"currentNamespace"`
}
func (*UserConfig) Validate ¶
func (c *UserConfig) Validate() error
type VisibilityType ¶
type VisibilityType string
const ( // VisibilityPublic is executable and visible across all workspaces. VisibilityPublic VisibilityType = "public" // VisibilityPrivate is executable and visible only within it's own workspace. VisibilityPrivate VisibilityType = "private" // VisibilityInternal is not visible but can be executed within a workspace. VisibilityInternal VisibilityType = "internal" // VisibilityHidden is not executable or visible. VisibilityHidden VisibilityType = "hidden" )
func (VisibilityType) IsHidden ¶
func (v VisibilityType) IsHidden() bool
func (VisibilityType) IsInternal ¶
func (v VisibilityType) IsInternal() bool
func (VisibilityType) IsPrivate ¶
func (v VisibilityType) IsPrivate() bool
func (VisibilityType) IsPublic ¶
func (v VisibilityType) IsPublic() bool
type WorkspaceConfig ¶
type WorkspaceConfig struct {
DisplayName string `json:"displayName" yaml:"displayName"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Tags Tags `json:"tags,omitempty" yaml:"tags,omitempty"`
Git *GitConfig `json:"git,omitempty" yaml:"git,omitempty"`
Executables *ExecutablesConfig `json:"executables,omitempty" yaml:"executables,omitempty"`
// contains filtered or unexported fields
}
func DefaultWorkspaceConfig ¶
func DefaultWorkspaceConfig(name string) *WorkspaceConfig
func (*WorkspaceConfig) AssignedName ¶
func (c *WorkspaceConfig) AssignedName() string
func (*WorkspaceConfig) Location ¶
func (c *WorkspaceConfig) Location() string
func (*WorkspaceConfig) SetContext ¶
func (c *WorkspaceConfig) SetContext(name, location string)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.