Documentation ¶
Index ¶
- func GenerateWorkflow(wdlFile string, parameterFile string) wfv1.Workflow
- func GetArgoWorkflow(document *Document) wfv1.Workflow
- func GetInputsFromDocument(wdlWorkflow *Workflow) wfv1.Arguments
- func GetInputsFromTask(task Task) wfv1.Inputs
- func GetOutputsFromTask(task Task) wfv1.Outputs
- func GetParralelStepFromCalls(call string) wfv1.ParallelSteps
- func GetTaskFromDocument(document *Document) map[string]wfv1.Template
- func GetVersion(uri string) (string, error)
- func IsIn(str string, slice []string) bool
- func NewWdlV1_0Parser(data string) *v1_0.WdlV1Parser
- func ReadString(uri string) (string, error)
- func SmartOpen(uri string) (io.ReadCloser, error)
- type Any
- type ArrayType
- type BinaryOpExpr
- type Calls
- type ComparisonExpr
- type CustomErrorListener
- type Declaration
- type Document
- type FmtReporter
- type IExpression
- type IVisitorReporter
- type Identifier
- type Import
- type InnerWorkflow
- type InnerWorkflow2
- type LandExpr
- type LorExpr
- type Scatter
- type Struct
- type Task
- type TerminalExpr
- type Type
- type UnknownExpr
- type WdlBuilder
- type WdlVisitor
- func (v *WdlVisitor) Visit(tree antlr.ParseTree) interface{}
- func (v *WdlVisitor) VisitAny_decls(ctx antlrv1_0.IAny_declsContext) Declaration
- func (v *WdlVisitor) VisitArray_type(ctx antlrv1_0.IArray_typeContext) interface{}
- func (v *WdlVisitor) VisitBound_decls(ctx antlrv1_0.IBound_declsContext) Declaration
- func (v *WdlVisitor) VisitCall(ctx antlrv1_0.ICallContext) []Identifier
- func (v *WdlVisitor) VisitCall_alias(ctx antlrv1_0.ICall_aliasContext) Identifier
- func (v *WdlVisitor) VisitCall_body(ctx antlrv1_0.ICall_bodyContext) Identifier
- func (v *WdlVisitor) VisitCall_input(ctx antlrv1_0.ICall_inputContext) Identifier
- func (v *WdlVisitor) VisitCall_inputs(ctx antlrv1_0.ICall_inputsContext) Identifier
- func (v *WdlVisitor) VisitCall_name(ctx antlrv1_0.ICall_nameContext) Identifier
- func (v *WdlVisitor) VisitChildren(node antlr.RuleNode) interface{}
- func (v *WdlVisitor) VisitDocument(ctx antlrv1_0.IDocumentContext) Document
- func (v *WdlVisitor) VisitDocument_element(ctx antlrv1_0.IDocument_elementContext) interface{}
- func (v *WdlVisitor) VisitErrorNode(node antlr.ErrorNode) interface{}
- func (v *WdlVisitor) VisitExpr(ctx antlrv1_0.IExprContext) IExpression
- func (v *WdlVisitor) VisitExpr_infix5(ctx antlrv1_0.IExpr_infix5Context) interface{}
- func (v *WdlVisitor) VisitExpression_placeholder_option(ctx antlrv1_0.IExpression_placeholder_optionContext) interface{}
- func (v *WdlVisitor) VisitImport_alias(ctx antlrv1_0.IImport_aliasContext) (Identifier, Identifier)
- func (v *WdlVisitor) VisitImport_as(ctx antlrv1_0.IImport_asContext) Identifier
- func (v *WdlVisitor) VisitImport_doc(ctx antlrv1_0.IImport_docContext) Import
- func (v *WdlVisitor) VisitInfix0(ctx antlrv1_0.IExpr_infix0Context) IExpression
- func (v *WdlVisitor) VisitInfix1(ctx antlrv1_0.IExpr_infix1Context) IExpression
- func (v *WdlVisitor) VisitInfix2(ctx antlrv1_0.IExpr_infix2Context) IExpression
- func (v *WdlVisitor) VisitInfix3(ctx antlrv1_0.IExpr_infix3Context) IExpression
- func (v *WdlVisitor) VisitInfix4(ctx antlrv1_0.IExpr_infix4Context) IExpression
- func (v *WdlVisitor) VisitInfix5(ctx antlrv1_0.IExpr_infix5Context) IExpression
- func (v *WdlVisitor) VisitInner_workflow_element(ctx antlrv1_0.IInner_workflow_elementContext) InnerWorkflow
- func (v *WdlVisitor) VisitMap_type(ctx antlrv1_0.IMap_typeContext) interface{}
- func (v *WdlVisitor) VisitNumber(ctx antlrv1_0.INumberContext) interface{}
- func (v *WdlVisitor) VisitPair_type(ctx antlrv1_0.IPair_typeContext) interface{}
- func (v *WdlVisitor) VisitPrimitive_literal(ctx antlrv1_0.IPrimitive_literalContext) interface{}
- func (v *WdlVisitor) VisitString(ctx antlrv1_0.IStringContext) string
- func (v *WdlVisitor) VisitString_expr_part(ctx antlrv1_0.IString_expr_partContext) interface{}
- func (v *WdlVisitor) VisitString_expr_with_string_part(ctx antlrv1_0.IString_expr_with_string_partContext) interface{}
- func (v *WdlVisitor) VisitString_part(ctx antlrv1_0.IString_partContext) string
- func (v *WdlVisitor) VisitTask(ctx antlrv1_0.ITaskContext) Task
- func (v *WdlVisitor) VisitTask_command(ctx antlrv1_0.ITask_commandContext) string
- func (v *WdlVisitor) VisitTask_command_expr_part(ctx antlrv1_0.ITask_command_expr_partContext) string
- func (v *WdlVisitor) VisitTask_command_expr_with_string(ctx antlrv1_0.ITask_command_expr_with_stringContext) string
- func (v *WdlVisitor) VisitTask_command_string_part(ctx antlrv1_0.ITask_command_string_partContext) string
- func (v *WdlVisitor) VisitTask_element(ctx antlrv1_0.ITask_elementContext) interface{}
- func (v *WdlVisitor) VisitTask_input(ctx antlrv1_0.ITask_inputContext) []Declaration
- func (v *WdlVisitor) VisitTask_output(ctx antlrv1_0.ITask_outputContext) []Declaration
- func (v *WdlVisitor) VisitTask_runtime(ctx antlrv1_0.ITask_runtimeContext) map[Identifier]IExpression
- func (v *WdlVisitor) VisitTask_runtime_kv(ctx antlrv1_0.ITask_runtime_kvContext) map[Identifier]IExpression
- func (v *WdlVisitor) VisitTerminal(node antlr.TerminalNode) interface{}
- func (v *WdlVisitor) VisitType_base(ctx antlrv1_0.IType_baseContext) interface{}
- func (v *WdlVisitor) VisitUnbound_decls(ctx antlrv1_0.IUnbound_declsContext) Declaration
- func (v *WdlVisitor) VisitVersion(ctx antlrv1_0.IVersionContext) string
- func (v *WdlVisitor) VisitWdl_type(ctx antlrv1_0.IWdl_typeContext) Type
- func (v *WdlVisitor) VisitWorkflow(ctx antlrv1_0.IWorkflowContext) Workflow
- func (v *WdlVisitor) VisitWorkflow_input(ctx antlrv1_0.IWorkflow_inputContext) []Declaration
- func (v *WdlVisitor) VisitWorkflow_output(ctx antlrv1_0.IWorkflow_outputContext) []Declaration
- type Workflow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetArgoWorkflow ¶
func GetInputsFromDocument ¶
func GetInputsFromTask ¶
func GetOutputsFromTask ¶
func GetParralelStepFromCalls ¶
func GetParralelStepFromCalls(call string) wfv1.ParallelSteps
func GetVersion ¶
GetVersion returns the version of the input WDL document.
func NewWdlV1_0Parser ¶
func NewWdlV1_0Parser(data string) *v1_0.WdlV1Parser
func ReadString ¶
ReadString returns all the string content of the file pointed by the URI. Currently supported protocols are: relative and absolute paths, file://, and http(s)://.
Types ¶
type BinaryOpExpr ¶
type BinaryOpExpr struct { Type string `json:"type"` Left IExpression `json:"left"` Operation string `json:"op"` Right IExpression `json:"right"` }
BinaryOpExpr is a binary operation expression ( + and - ).
func NewBinaryOpExpr ¶
func NewBinaryOpExpr(left IExpression, op string, right IExpression) BinaryOpExpr
func (BinaryOpExpr) GetType ¶
func (this BinaryOpExpr) GetType() string
func (BinaryOpExpr) GetValue ¶
func (this BinaryOpExpr) GetValue() interface{}
type Calls ¶
type Calls struct { Name Identifier `json:"name"` As Identifier `json:"as,omitempty"` // optional Aliases map[Identifier]Identifier `json:"aliases,omitempty"` // optional Inputs []Declaration }
type ComparisonExpr ¶
type ComparisonExpr struct { Type string `json:"type"` Left IExpression `json:"left"` Operation string `json:"op"` Right IExpression `json:"right"` }
ComparisonExpr is a comparison expression.
func NewComparisonExpr ¶
func NewComparisonExpr(left IExpression, op string, right IExpression) ComparisonExpr
func (ComparisonExpr) GetType ¶
func (this ComparisonExpr) GetType() string
func (ComparisonExpr) GetValue ¶
func (this ComparisonExpr) GetValue() interface{}
type CustomErrorListener ¶
type CustomErrorListener struct { *antlr.DefaultErrorListener Errors []error }
type Declaration ¶
type Declaration struct { Type Type `json:"type"` Identifier Identifier `json:"identifier"` Expr *IExpression `json:"expr,omitempty"` }
Declaration can be bounded (assigned to expression) or unbounded (no assignment).
type Document ¶
type Document struct { // This is not part of WDL, but is useful to keep track of. Url string `json:"url"` Version string `json:"version"` Workflow *Workflow `json:"workflow,omitempty"` // optional Imports []Import `json:"imports,omitempty"` // optional //Structs []Struct `json:"structs,omitempty"` // optional Tasks []Task `json:"tasks,omitempty"` // optional }
type FmtReporter ¶
type FmtReporter struct{}
An IVisitorReporter that uses the fmt package to report messages.
func (*FmtReporter) Error ¶
func (r *FmtReporter) Error(ctx antlr.ParserRuleContext, err error)
func (*FmtReporter) NotImplemented ¶
func (r *FmtReporter) NotImplemented(message fmt.Stringer)
func (*FmtReporter) Warn ¶
func (r *FmtReporter) Warn(ctx antlr.ParserRuleContext, warn string)
type IExpression ¶
type IExpression interface { GetType() string GetValue() interface{} }
type IVisitorReporter ¶
type Identifier ¶
type Identifier string
An identifier should match pattern /[a-zA-Z][a-zA-Z0-9_]+/ See: https://github.com/openwdl/wdl/blob/main/versions/1.0/SPEC.md#whitespace-strings-identifiers-constants
func (Identifier) IsValid ¶
func (this Identifier) IsValid() bool
type Import ¶
type Import struct { Url string `json:"url"` AbsoluteUrl string `json:"absoluteUrl,omitempty"` // not part of WDL, but useful when resolving imports As Identifier `json:"as,omitempty"` // optional Aliases map[Identifier]Identifier `json:"aliases,omitempty"` // optional }
type InnerWorkflow ¶
type InnerWorkflow struct { Name Identifier `json:"name"` Calls []Identifier `json:"calls,omitempty"` Scatter []Declaration `json:"scatter,omitempty"` Conditional []Declaration `json:"conditional,omitempty"` }
type InnerWorkflow2 ¶
type InnerWorkflow2 struct { Name Identifier `json:"name"` Inputs []Declaration `json:"inputs,omitempty"` Declarations []Declaration `json:"declarations,omitempty"` Calls []Calls `json:"calls,omitempty"` InnerWorkflows []InnerWorkflow `json:"innerWorkflows,omitempty"` Scatter []Declaration `json:"scatter,omitempty"` Conditional []Declaration `json:"conditional,omitempty"` Output []Declaration `json:"outputs,omitempty"` Meta map[string]string `json:"meta,omitempty"` ParameterMeta map[string]string `json:"parameter_meta,omitempty"` }
type LandExpr ¶
type LandExpr struct { Type string `json:"type"` Left IExpression `json:"left"` Right IExpression `json:"right"` }
LandExpr is a logic AND expression.
func NewLandExpr ¶
func NewLandExpr(left IExpression, right IExpression) LandExpr
type LorExpr ¶
type LorExpr struct { Type string `json:"type"` Left IExpression `json:"left"` Right IExpression `json:"right"` }
LorExpr is a logic OR expression.
func NewLorExpr ¶
func NewLorExpr(left IExpression, right IExpression) LorExpr
type Scatter ¶
type Scatter struct { Name Identifier `json:"name"` As Identifier `json:"as,omitempty"` // optional Aliases map[Identifier]Identifier `json:"aliases,omitempty"` // optional Calls []Calls `json:"calls,omitempty"` Intergers []Identifier `json:"intergers,omitempty"` }
type Task ¶
type Task struct { Name Identifier `json:"name"` Input []Declaration `json:"inputs,omitempty"` Command string `json:"command"` Runtime map[Identifier]IExpression `json:"runtime"` Output []Declaration `json:"outputs,omitempty"` }
type TerminalExpr ¶
type TerminalExpr struct { Type string `json:"type"` Value interface{} `json:"value"` }
func NewTerminalExpr ¶
func NewTerminalExpr() TerminalExpr
func (TerminalExpr) GetType ¶
func (this TerminalExpr) GetType() string
func (TerminalExpr) GetValue ¶
func (this TerminalExpr) GetValue() interface{}
type UnknownExpr ¶
func NewUnknownExpr ¶
func NewUnknownExpr() UnknownExpr
func (UnknownExpr) GetType ¶
func (this UnknownExpr) GetType() string
func (UnknownExpr) GetValue ¶
func (this UnknownExpr) GetValue() interface{}
type WdlBuilder ¶
func NewWdlBuilder ¶
func NewWdlBuilder(url string) (*WdlBuilder, error)
func (*WdlBuilder) ParseDocument ¶
func (this *WdlBuilder) ParseDocument() (*Document, error)
type WdlVisitor ¶
type WdlVisitor struct { Url string Version string *antlrv1_0.BaseWdlV1ParserVisitor Reporter IVisitorReporter }
func NewWdlVisitor ¶
func NewWdlVisitor(url string, version string) *WdlVisitor
func (*WdlVisitor) Visit ¶
func (v *WdlVisitor) Visit(tree antlr.ParseTree) interface{}
Visit takes in any parse tree and visits the child nodes from there.
func (*WdlVisitor) VisitAny_decls ¶
func (v *WdlVisitor) VisitAny_decls(ctx antlrv1_0.IAny_declsContext) Declaration
func (*WdlVisitor) VisitArray_type ¶
func (v *WdlVisitor) VisitArray_type(ctx antlrv1_0.IArray_typeContext) interface{}
func (*WdlVisitor) VisitBound_decls ¶
func (v *WdlVisitor) VisitBound_decls(ctx antlrv1_0.IBound_declsContext) Declaration
func (*WdlVisitor) VisitCall ¶
func (v *WdlVisitor) VisitCall(ctx antlrv1_0.ICallContext) []Identifier
func (*WdlVisitor) VisitCall_alias ¶
func (v *WdlVisitor) VisitCall_alias(ctx antlrv1_0.ICall_aliasContext) Identifier
func (*WdlVisitor) VisitCall_body ¶
func (v *WdlVisitor) VisitCall_body(ctx antlrv1_0.ICall_bodyContext) Identifier
func (*WdlVisitor) VisitCall_input ¶
func (v *WdlVisitor) VisitCall_input(ctx antlrv1_0.ICall_inputContext) Identifier
func (*WdlVisitor) VisitCall_inputs ¶
func (v *WdlVisitor) VisitCall_inputs(ctx antlrv1_0.ICall_inputsContext) Identifier
func (*WdlVisitor) VisitCall_name ¶
func (v *WdlVisitor) VisitCall_name(ctx antlrv1_0.ICall_nameContext) Identifier
func (*WdlVisitor) VisitChildren ¶
func (v *WdlVisitor) VisitChildren(node antlr.RuleNode) interface{}
func (*WdlVisitor) VisitDocument ¶
func (v *WdlVisitor) VisitDocument(ctx antlrv1_0.IDocumentContext) Document
func (*WdlVisitor) VisitDocument_element ¶
func (v *WdlVisitor) VisitDocument_element(ctx antlrv1_0.IDocument_elementContext) interface{}
func (*WdlVisitor) VisitErrorNode ¶
func (v *WdlVisitor) VisitErrorNode(node antlr.ErrorNode) interface{}
func (*WdlVisitor) VisitExpr ¶
func (v *WdlVisitor) VisitExpr(ctx antlrv1_0.IExprContext) IExpression
func (*WdlVisitor) VisitExpr_infix5 ¶
func (v *WdlVisitor) VisitExpr_infix5(ctx antlrv1_0.IExpr_infix5Context) interface{}
func (*WdlVisitor) VisitExpression_placeholder_option ¶
func (v *WdlVisitor) VisitExpression_placeholder_option(ctx antlrv1_0.IExpression_placeholder_optionContext) interface{}
func (*WdlVisitor) VisitImport_alias ¶
func (v *WdlVisitor) VisitImport_alias(ctx antlrv1_0.IImport_aliasContext) (Identifier, Identifier)
VisitImport_alias returns the import alias as a mapping from the original identifer -> the aliased identifier. This is a terminal operation.
func (*WdlVisitor) VisitImport_as ¶
func (v *WdlVisitor) VisitImport_as(ctx antlrv1_0.IImport_asContext) Identifier
VisitImport_as returns the identifier that refers to the import. This is a terminal operation.
func (*WdlVisitor) VisitImport_doc ¶
func (v *WdlVisitor) VisitImport_doc(ctx antlrv1_0.IImport_docContext) Import
func (*WdlVisitor) VisitInfix0 ¶
func (v *WdlVisitor) VisitInfix0(ctx antlrv1_0.IExpr_infix0Context) IExpression
func (*WdlVisitor) VisitInfix1 ¶
func (v *WdlVisitor) VisitInfix1(ctx antlrv1_0.IExpr_infix1Context) IExpression
func (*WdlVisitor) VisitInfix2 ¶
func (v *WdlVisitor) VisitInfix2(ctx antlrv1_0.IExpr_infix2Context) IExpression
func (*WdlVisitor) VisitInfix3 ¶
func (v *WdlVisitor) VisitInfix3(ctx antlrv1_0.IExpr_infix3Context) IExpression
func (*WdlVisitor) VisitInfix4 ¶
func (v *WdlVisitor) VisitInfix4(ctx antlrv1_0.IExpr_infix4Context) IExpression
func (*WdlVisitor) VisitInfix5 ¶
func (v *WdlVisitor) VisitInfix5(ctx antlrv1_0.IExpr_infix5Context) IExpression
func (*WdlVisitor) VisitInner_workflow_element ¶
func (v *WdlVisitor) VisitInner_workflow_element(ctx antlrv1_0.IInner_workflow_elementContext) InnerWorkflow
func (*WdlVisitor) VisitMap_type ¶
func (v *WdlVisitor) VisitMap_type(ctx antlrv1_0.IMap_typeContext) interface{}
func (*WdlVisitor) VisitNumber ¶
func (v *WdlVisitor) VisitNumber(ctx antlrv1_0.INumberContext) interface{}
func (*WdlVisitor) VisitPair_type ¶
func (v *WdlVisitor) VisitPair_type(ctx antlrv1_0.IPair_typeContext) interface{}
func (*WdlVisitor) VisitPrimitive_literal ¶
func (v *WdlVisitor) VisitPrimitive_literal(ctx antlrv1_0.IPrimitive_literalContext) interface{}
func (*WdlVisitor) VisitString ¶
func (v *WdlVisitor) VisitString(ctx antlrv1_0.IStringContext) string
func (*WdlVisitor) VisitString_expr_part ¶
func (v *WdlVisitor) VisitString_expr_part(ctx antlrv1_0.IString_expr_partContext) interface{}
func (*WdlVisitor) VisitString_expr_with_string_part ¶
func (v *WdlVisitor) VisitString_expr_with_string_part(ctx antlrv1_0.IString_expr_with_string_partContext) interface{}
func (*WdlVisitor) VisitString_part ¶
func (v *WdlVisitor) VisitString_part(ctx antlrv1_0.IString_partContext) string
func (*WdlVisitor) VisitTask ¶
func (v *WdlVisitor) VisitTask(ctx antlrv1_0.ITaskContext) Task
func (*WdlVisitor) VisitTask_command ¶
func (v *WdlVisitor) VisitTask_command(ctx antlrv1_0.ITask_commandContext) string
func (*WdlVisitor) VisitTask_command_expr_part ¶
func (v *WdlVisitor) VisitTask_command_expr_part(ctx antlrv1_0.ITask_command_expr_partContext) string
func (*WdlVisitor) VisitTask_command_expr_with_string ¶
func (v *WdlVisitor) VisitTask_command_expr_with_string(ctx antlrv1_0.ITask_command_expr_with_stringContext) string
func (*WdlVisitor) VisitTask_command_string_part ¶
func (v *WdlVisitor) VisitTask_command_string_part(ctx antlrv1_0.ITask_command_string_partContext) string
func (*WdlVisitor) VisitTask_element ¶
func (v *WdlVisitor) VisitTask_element(ctx antlrv1_0.ITask_elementContext) interface{}
func (*WdlVisitor) VisitTask_input ¶
func (v *WdlVisitor) VisitTask_input(ctx antlrv1_0.ITask_inputContext) []Declaration
func (*WdlVisitor) VisitTask_output ¶
func (v *WdlVisitor) VisitTask_output(ctx antlrv1_0.ITask_outputContext) []Declaration
func (*WdlVisitor) VisitTask_runtime ¶
func (v *WdlVisitor) VisitTask_runtime(ctx antlrv1_0.ITask_runtimeContext) map[Identifier]IExpression
func (*WdlVisitor) VisitTask_runtime_kv ¶
func (v *WdlVisitor) VisitTask_runtime_kv(ctx antlrv1_0.ITask_runtime_kvContext) map[Identifier]IExpression
func (*WdlVisitor) VisitTerminal ¶
func (v *WdlVisitor) VisitTerminal(node antlr.TerminalNode) interface{}
func (*WdlVisitor) VisitType_base ¶
func (v *WdlVisitor) VisitType_base(ctx antlrv1_0.IType_baseContext) interface{}
func (*WdlVisitor) VisitUnbound_decls ¶
func (v *WdlVisitor) VisitUnbound_decls(ctx antlrv1_0.IUnbound_declsContext) Declaration
func (*WdlVisitor) VisitVersion ¶
func (v *WdlVisitor) VisitVersion(ctx antlrv1_0.IVersionContext) string
VisitVersion returns the version as a string. This is a terminal operation.
func (*WdlVisitor) VisitWdl_type ¶
func (v *WdlVisitor) VisitWdl_type(ctx antlrv1_0.IWdl_typeContext) Type
func (*WdlVisitor) VisitWorkflow ¶
func (v *WdlVisitor) VisitWorkflow(ctx antlrv1_0.IWorkflowContext) Workflow
func (*WdlVisitor) VisitWorkflow_input ¶
func (v *WdlVisitor) VisitWorkflow_input(ctx antlrv1_0.IWorkflow_inputContext) []Declaration
func (*WdlVisitor) VisitWorkflow_output ¶
func (v *WdlVisitor) VisitWorkflow_output(ctx antlrv1_0.IWorkflow_outputContext) []Declaration
type Workflow ¶
type Workflow struct { Name Identifier `json:"name"` Inputs []Declaration `json:"inputs,omitempty"` Declarations []Declaration `json:"declarations,omitempty"` Calls []Calls `json:"calls,omitempty"` InnerWorkflows []InnerWorkflow `json:"innerWorkflows,omitempty"` Scatter []Declaration `json:"scatter,omitempty"` Conditional []Declaration `json:"conditional,omitempty"` Output []Declaration `json:"outputs,omitempty"` Meta map[string]string `json:"meta,omitempty"` ParameterMeta map[string]string `json:"parameter_meta,omitempty"` }