Documentation
¶
Index ¶
- Constants
- func ValidateTool(tool *Tool) error
- type Any
- type Boolean
- type CommandInput
- type CommandLineBinding
- type CommandOutput
- type CommandOutputBinding
- type DefaultResolver
- type Directory
- type DirectoryType
- type Dirent
- type DockerRequirement
- type Document
- type DocumentRef
- type Double
- type EnvVarRequirement
- type Expression
- type ExpressionTool
- type File
- type FileDir
- type FileType
- type Float
- type Graph
- type InitialWorkDirListing
- type InitialWorkDirRequirement
- type InlineJavascriptRequirement
- type InputArray
- type InputEnum
- type InputField
- type InputRecord
- type InputType
- type Int
- type KubernetesRequirement
- type LinkMergeMethod
- type Long
- type MultipleInputFeatureRequirement
- type Null
- type OptOut
- type OutputArray
- type OutputEnum
- type OutputField
- type OutputRecord
- type OutputType
- type ParallelRequirement
- type Requirement
- type Resolver
- type ResourceRequirement
- type ScatterFeatureRequirement
- type ScatterMethod
- type SchedulerRequirement
- type SchemaDef
- type SchemaDefRequirement
- type SchemaType
- type ShellCommandRequirement
- type SoftwarePackage
- type SoftwareRequirement
- type Stderr
- type Stdout
- type Step
- type StepInput
- type StepInputExpressionRequirement
- type StepOutput
- type String
- type SubworkflowFeatureRequirement
- type Tool
- func (Tool) Doctype() string
- func (x Tool) MarshalJSON() ([]byte, error)
- func (t *Tool) RequiresDocker() (*DockerRequirement, bool)
- func (t *Tool) RequiresInlineJavascript() ([]string, bool)
- func (t *Tool) RequiresSchemaDef() (*SchemaDefRequirement, bool)
- func (t *Tool) RequiresShellCommand() bool
- func (t *Tool) ResolveSchemaDefs() error
- type TypeRef
- type UnknownRequirement
- type Value
- type Values
- type Workflow
- type WorkflowInput
- type WorkflowOutput
- type WorkflowRequirement
Constants ¶
View Source
const ( DotProduct ScatterMethod = "dotproduct" NestedCrossProduct = "nested_crossproduct" FlatCrossProduct = "flat_crossproduct" )
Variables ¶
This section is empty.
Functions ¶
func ValidateTool ¶
Types ¶
type CommandInput ¶
type CommandInput struct {
ID string `json:"id,omitempty"`
Label string `json:"label,omitempty"`
Doc string `json:"doc,omitempty"`
Streamable bool `json:"streamable,omitempty"`
Default Value `json:"default,omitempty"`
Type []InputType `json:"type,omitempty"`
SecondaryFiles []Expression `json:"secondaryFiles,omitempty"`
Format []Expression `json:"format,omitempty"`
InputBinding *CommandLineBinding `json:"inputBinding,omitempty"`
}
type CommandLineBinding ¶
type CommandLineBinding struct {
LoadContents bool `json:"loadContents,omitempty"`
Position int `json:"position,omitempty"`
Prefix string `json:"prefix,omitempty"`
ItemSeparator string `json:"itemSeparator,omitempty"`
ValueFrom Expression `json:"valueFrom,omitempty"`
Separate OptOut `json:"separate,omitempty"`
ShellQuote OptOut `json:"shellQuote,omitempty"`
}
func (*CommandLineBinding) GetItemSeparator ¶
func (clb *CommandLineBinding) GetItemSeparator() string
func (*CommandLineBinding) GetLoadContents ¶
func (clb *CommandLineBinding) GetLoadContents() bool
func (*CommandLineBinding) GetPosition ¶
func (clb *CommandLineBinding) GetPosition() int
func (*CommandLineBinding) GetPrefix ¶
func (clb *CommandLineBinding) GetPrefix() string
func (*CommandLineBinding) GetValueFrom ¶
func (clb *CommandLineBinding) GetValueFrom() Expression
type CommandOutput ¶
type CommandOutput struct {
ID string `json:"id,omitempty"`
Label string `json:"label,omitempty"`
Doc string `json:"doc,omitempty"`
Streamable bool `json:"streamable,omitempty"`
Type []OutputType `json:"type,omitempty"`
SecondaryFiles []Expression `json:"secondaryFiles,omitempty"`
Format []Expression `json:"format,omitempty"`
OutputBinding *CommandOutputBinding `json:"outputBinding,omitempty"`
}
type CommandOutputBinding ¶
type CommandOutputBinding struct {
Glob []Expression `json:"glob,omitempty"`
LoadContents bool `json:"loadContents,omitempty"`
OutputEval Expression `json:"outputEval,omitempty"`
}
type DefaultResolver ¶
type DefaultResolver struct{}
DefaultResolver is a document location resolver which resolves local file paths.
type Directory ¶
type Directory struct {
Location string `json:"location,omitempty"`
Path string `json:"path,omitempty"`
Basename string `json:"basename,omitempty"`
Listing []FileDir `json:"listing,omitempty"`
}
func (Directory) MarshalJSON ¶
type DirectoryType ¶
type DirectoryType struct{}
func (DirectoryType) MarshalText ¶
func (DirectoryType) MarshalText() ([]byte, error)
func (DirectoryType) String ¶
func (DirectoryType) String() string
type Dirent ¶
type Dirent struct {
Entry Expression `json:"entry,omitempty"`
Entryname Expression `json:"entryname,omitempty"`
Writable bool `json:"writeable,omitempty"`
}
type DockerRequirement ¶
type DockerRequirement struct {
Pull string `json:"dockerPull,omitempty"`
Load string `json:"dockerLoad,omitempty"`
File string `json:"dockerFile,omitempty"`
Import string `json:"dockerImport,omitempty"`
ImageID string `json:"dockerImageID,omitempty"`
OutputDirectory string `json:"dockerOutputDirectory,omitempty"`
}
func (DockerRequirement) MarshalJSON ¶
func (x DockerRequirement) MarshalJSON() ([]byte, error)
type DocumentRef ¶
type DocumentRef struct {
Location string
}
func (DocumentRef) Doctype ¶
func (DocumentRef) Doctype() string
func (DocumentRef) MarshalText ¶
func (d DocumentRef) MarshalText() ([]byte, error)
type EnvVarRequirement ¶
type EnvVarRequirement struct {
EnvDef map[string]Expression `json:"envDef,omitempty"`
}
func (EnvVarRequirement) MarshalJSON ¶
func (x EnvVarRequirement) MarshalJSON() ([]byte, error)
type Expression ¶
type Expression string
type ExpressionTool ¶
type ExpressionTool struct {
CWLVersion string `json:"cwlVersion,omitempty"`
Class string `json:"class,omitempty"`
ID string `json:"id,omitempty"`
Label string `json:"label,omitempty"`
Doc string `json:"doc,omitempty"`
Hints []Requirement `json:"hints,omitempty"`
Requirements []Requirement `json:"requirements,omitempty"`
Inputs []CommandInput `json:"inputs,omitempty"`
Outputs []CommandOutput `json:"outputs,omitempty"`
Expression Expression `json:"expression,omitempty"`
}
func (ExpressionTool) Doctype ¶
func (ExpressionTool) Doctype() string
type File ¶
type File struct {
Location string `json:"location,omitempty"`
Path string `json:"path,omitempty"`
Basename string `json:"basename,omitempty"`
Dirname string `json:"dirname,omitempty"`
Nameroot string `json:"nameroot,omitempty"`
Nameext string `json:"nameext,omitempty"`
Checksum string `json:"checksum,omitempty"`
Size int64 `json:"size"`
Format string `json:"format,omitempty"`
Contents string `json:"contents,omitempty"`
SecondaryFiles []FileDir `json:"secondaryFiles,omitempty"`
}
func (File) MarshalJSON ¶
type Graph ¶
type InitialWorkDirListing ¶
type InitialWorkDirListing struct {
Entry Expression `json:"entry,omitempty"`
Entryname Expression `json:"entryname,omitempty"`
}
type InitialWorkDirRequirement ¶
type InitialWorkDirRequirement struct {
// TODO the most difficult union type
Listing []InitialWorkDirListing `json:"listing,omitempty"`
}
func (InitialWorkDirRequirement) MarshalJSON ¶
func (x InitialWorkDirRequirement) MarshalJSON() ([]byte, error)
type InlineJavascriptRequirement ¶
type InlineJavascriptRequirement struct {
ExpressionLib []string `json:"expressionLib,omitempty"`
}
func (InlineJavascriptRequirement) MarshalJSON ¶
func (x InlineJavascriptRequirement) MarshalJSON() ([]byte, error)
type InputArray ¶
type InputArray struct {
Label string `json:"label,omitempty"`
Items []InputType `json:"items,omitempty"`
InputBinding *CommandLineBinding `json:"inputBinding,omitempty"`
}
func (InputArray) MarshalJSON ¶
func (i InputArray) MarshalJSON() ([]byte, error)
func (InputArray) String ¶
func (InputArray) String() string
type InputEnum ¶
type InputEnum struct {
Label string `json:"label,omitempty"`
Symbols []string `json:"symbols,omitempty"`
InputBinding *CommandLineBinding `json:"inputBinding,omitempty"`
}
type InputField ¶
type InputField struct {
Name string `json:"name,omitempty"`
Doc string `json:"doc,omitempty"`
Label string `json:"label,omitempty"`
Type []InputType `json:"type,omitempty"`
InputBinding *CommandLineBinding `json:"inputBinding,omitempty"`
}
type InputRecord ¶
type InputRecord struct {
Label string `json:"label,omitempty"`
Fields []InputField `json:"fields,omitempty"`
}
func (InputRecord) MarshalJSON ¶
func (i InputRecord) MarshalJSON() ([]byte, error)
func (InputRecord) String ¶
func (InputRecord) String() string
type InputType ¶
type InputType interface {
String() string
// contains filtered or unexported methods
}
type KubernetesRequirement ¶
type KubernetesRequirement struct {
Deployments []Expression `json:"deployments,omitempty"`
Proxies []Expression `json:"proxies,omitempty"`
}
KubernetesRequirement 用来描述 Kubernetes deployment 用来控制 k8s-deployment 应用的创建
type LinkMergeMethod ¶
type LinkMergeMethod string
const ( MergeNested LinkMergeMethod = "merge_nested" MergeFlattened = "merge_flattened" )
type MultipleInputFeatureRequirement ¶
type MultipleInputFeatureRequirement struct {
}
func (MultipleInputFeatureRequirement) MarshalJSON ¶
func (x MultipleInputFeatureRequirement) MarshalJSON() ([]byte, error)
type OptOut ¶
type OptOut struct {
// contains filtered or unexported fields
}
OptOut provides a boolean flag that defaults to true.
func (*OptOut) MarshalText ¶
type OutputArray ¶
type OutputArray struct {
Label string `json:"label,omitempty"`
Items []OutputType `json:"items,omitempty"`
OutputBinding *CommandOutputBinding `json:"outputBinding,omitempty"`
}
func (OutputArray) MarshalJSON ¶
func (i OutputArray) MarshalJSON() ([]byte, error)
func (OutputArray) String ¶
func (OutputArray) String() string
type OutputEnum ¶
type OutputEnum struct {
Label string `json:"label,omitempty"`
Symbols []string `json:"symbols,omitempty"`
OutputBinding *CommandOutputBinding `json:"outputBinding,omitempty"`
}
func (OutputEnum) String ¶
func (OutputEnum) String() string
type OutputField ¶
type OutputField struct {
Name string `json:"name,omitempty"`
Doc string `json:"doc,omitempty"`
Type []OutputType `json:"type,omitempty"`
OutputBinding *CommandOutputBinding `json:"outputBinding,omitempty"`
}
type OutputRecord ¶
type OutputRecord struct {
Label string `json:"label,omitempty"`
Fields []OutputField `json:"fields,omitempty"`
}
func (OutputRecord) MarshalJSON ¶
func (i OutputRecord) MarshalJSON() ([]byte, error)
func (OutputRecord) String ¶
func (OutputRecord) String() string
type OutputType ¶
type OutputType interface {
String() string
// contains filtered or unexported methods
}
type ParallelRequirement ¶
type ParallelRequirement struct {
MpiEnabled bool `json:"writeable,omitempty"`
}
ParallelRequirement 用来描述作业执行的并行环境 Runtime 会根据需要 进行 srun/mpirun 的 包装
type Requirement ¶
type Requirement interface {
// contains filtered or unexported methods
}
type Resolver ¶
type Resolver interface {
// Resolve is given the current `base`,
// such as the directory of the root document,
// and the `location` referenced by the CWL document.
//
// Upon success, the document bytes and the new `base`
// should be returned.
Resolve(base, location string) (doc []byte, newBase string, err error)
}
Resolver describes a type which resolves docment by location, such as loading relative file paths referenced in a CWL document.
type ResourceRequirement ¶
type ResourceRequirement struct {
CoresMin Expression `json:"coresMin,omitempty"`
CoresMax Expression `json:"coresMax,omitempty"`
RAMMin Expression `json:"ramMin,omitempty"`
RAMMax Expression `json:"ramMax,omitempty"`
TmpDirMin Expression `json:"tmpdirMin,omitempty"`
TmpDirMax Expression `json:"tmpdirMax,omitempty"`
OutDirMin Expression `json:"outdirMin,omitempty"`
OutDirMax Expression `json:"outdirMax,omitempty"`
}
func (ResourceRequirement) MarshalJSON ¶
func (x ResourceRequirement) MarshalJSON() ([]byte, error)
type ScatterFeatureRequirement ¶
type ScatterFeatureRequirement struct {
}
func (ScatterFeatureRequirement) MarshalJSON ¶
func (x ScatterFeatureRequirement) MarshalJSON() ([]byte, error)
type ScatterMethod ¶
type ScatterMethod string
type SchedulerRequirement ¶
type SchedulerRequirement struct {
Scheduler string `json:"scheduler,omitempty"`
Cluster Expression `json:"cluster,omitempty"`
Partition Expression `json:"partition,omitempty"`
Nodes Expression `json:"nodes,omitempty"`
SchedulerArgs []Expression `json:"args,omitempty"`
}
SchedulerRequirement 用来描述作业执行的环境 对于本地运行实际可以缺省 用来在作业网关上控制作业路由,实际的值可以由 inputs 解析获取 组合 DockerRequirement 使用可以创建 k8s-job 应用
type SchemaDef ¶
type SchemaDef struct {
Name string `json:"name,omitempty"`
Type SchemaType
}
type SchemaDefRequirement ¶
type SchemaDefRequirement struct {
Types []SchemaDef `json:"types,omitempty"`
}
func (SchemaDefRequirement) MarshalJSON ¶
func (x SchemaDefRequirement) MarshalJSON() ([]byte, error)
type SchemaType ¶
type SchemaType interface {
// contains filtered or unexported methods
}
type ShellCommandRequirement ¶
type ShellCommandRequirement struct {
}
func (ShellCommandRequirement) MarshalJSON ¶
func (x ShellCommandRequirement) MarshalJSON() ([]byte, error)
type SoftwarePackage ¶
type SoftwareRequirement ¶
type SoftwareRequirement struct {
Packages []SoftwarePackage `json:"packages,omitempty"`
}
func (SoftwareRequirement) MarshalJSON ¶
func (x SoftwareRequirement) MarshalJSON() ([]byte, error)
type Step ¶
type Step struct {
ID string `json:"id,omitempty"`
Label string `json:"label,omitempty"`
Doc string `json:"doc,omitempty"`
Hints []Requirement `json:"hints,omitempty"`
Requirements []Requirement `json:"requirements,omitempty"`
In []StepInput `json:"in,omitempty"`
Out []StepOutput `json:"out,omitempty"`
Run Document `json:"run,omitempty"`
Scatter []string `json:"scatter,omitempty"`
ScatterMethod ScatterMethod `json:"scatterMethod,omitempty"`
}
type StepInput ¶
type StepInput struct {
ID string `json:"id,omitempty"`
Source []string `json:"source,omitempty"`
LinkMerge LinkMergeMethod `json:"linkMerge,omitempty"`
Default Value `json:"default,omitempty"`
ValueFrom Expression `json:"valueFrom,omitempty"`
}
type StepInputExpressionRequirement ¶
type StepInputExpressionRequirement struct {
}
func (StepInputExpressionRequirement) MarshalJSON ¶
func (x StepInputExpressionRequirement) MarshalJSON() ([]byte, error)
type StepOutput ¶
type StepOutput struct {
ID string `json:"id,omitempty"`
}
type SubworkflowFeatureRequirement ¶
type SubworkflowFeatureRequirement struct {
}
func (SubworkflowFeatureRequirement) MarshalJSON ¶
func (x SubworkflowFeatureRequirement) MarshalJSON() ([]byte, error)
type Tool ¶
type Tool struct {
CWLVersion string `json:"cwlVersion,omitempty"`
ID string `json:"id,omitempty"`
Label string `json:"label,omitempty"`
Doc string `json:"doc,omitempty"`
Hints []Requirement `json:"hints,omitempty"`
Requirements []Requirement `json:"requirements,omitempty"`
Inputs []CommandInput `json:"inputs,omitempty"`
Outputs []CommandOutput `json:"outputs,omitempty"`
BaseCommand []string `json:"baseCommand,omitempty"`
Arguments []*CommandLineBinding `json:"arguments,omitempty"`
Stdin Expression `json:"stdin,omitempty"`
Stderr Expression `json:"stderr,omitempty"`
Stdout Expression `json:"stdout,omitempty"`
SuccessCodes []int `json:"successCodes,omitempty"`
TemporaryFailCodes []int `json:",omitempty"`
PermanentFailCodes []int `json:",omitempty"`
}
func (Tool) MarshalJSON ¶
func (*Tool) RequiresDocker ¶
func (t *Tool) RequiresDocker() (*DockerRequirement, bool)
func (*Tool) RequiresInlineJavascript ¶
func (*Tool) RequiresSchemaDef ¶
func (t *Tool) RequiresSchemaDef() (*SchemaDefRequirement, bool)
func (*Tool) RequiresShellCommand ¶
func (*Tool) ResolveSchemaDefs ¶
type UnknownRequirement ¶
type UnknownRequirement struct {
Name string
}
type Workflow ¶
type Workflow struct {
CWLVersion string `json:"cwlVersion,omitempty"`
ID string `json:"id,omitempty"`
Label string `json:"label,omitempty"`
Doc string `json:"doc,omitempty"`
Hints []Requirement `json:"hints,omitempty"`
Requirements []Requirement `json:"requirements,omitempty"`
Inputs []WorkflowInput `json:"inputs,omitempty"`
Outputs []WorkflowOutput `json:"outputs,omitempty"`
Steps []Step `json:"steps,omitempty"`
}
func (Workflow) MarshalJSON ¶
type WorkflowInput ¶
type WorkflowInput struct {
ID string `json:"id,omitempty"`
Label string `json:"label,omitempty"`
Doc string `json:"doc,omitempty"`
Streamable bool `json:"streamable,omitempty"`
Default Value `json:"default,omitempty"`
Type []InputType `json:"type,omitempty"`
SecondaryFiles []Expression `json:"secondaryFiles,omitempty"`
Format []Expression `json:"format,omitempty"`
InputBinding *CommandLineBinding `json:"inputBinding,omitempty"`
}
TODO exactly the same as CommandInput? Changing in v1.1?
type WorkflowOutput ¶
type WorkflowOutput struct {
ID string `json:"id,omitempty"`
Label string `json:"label,omitempty"`
Doc string `json:"doc,omitempty"`
Streamable bool `json:"streamable,omitempty"`
LinkMerge LinkMergeMethod `json:"linkMerge,omitempty"`
Type []OutputType `json:"type,omitempty"`
SecondaryFiles []Expression `json:"secondaryFiles,omitempty"`
Format []Expression `json:"format,omitempty"`
OutputBinding *CommandOutputBinding `json:"outputBinding,omitempty"`
OutputSource []string `json:"outputSource,omitempty"`
}
type WorkflowRequirement ¶
type WorkflowRequirement interface {
// contains filtered or unexported methods
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.