Documentation ¶
Index ¶
- Constants
- Variables
- func FindSchema(nameOrPath string) *jsonschema.Schema
- func Validate(data []byte, schemaFilePath string) error
- func ValidateDocument(document []byte, t reflect.Type) error
- func WorkspacesInputToCreateData(input workspace.InputData, namespace string) workspace.Data
- func WorkspacesInputToUpdateData(input workspace.InputData, namespace string) workspace.Data
- type Any
- type Argument
- type ArgumentBase
- type ArgumentSourceFile
- type ArgumentSourcePort
- type ArgumentTarget
- type Brick
- type CRefVersion
- type Component
- type ComponentBase
- type ComponentPostOptions
- type ComponentPostRequest
- type ComponentReference
- func (id *ComponentReference) IsZero() bool
- func (c ComponentReference) MarshalBSONValue() (bsontype.Type, []byte, error)
- func (r ComponentReference) MarshalJSON() ([]byte, error)
- func (r ComponentReference) String() string
- func (c *ComponentReference) UnmarshalBSONValue(t bsontype.Type, data []byte) error
- func (r *ComponentReference) UnmarshalJSON(data []byte) error
- type ComponentType
- type Conditional
- type Data
- type Edge
- type Expression
- type FileResultSource
- type FlowifyVolume
- type FlowifyVolumeList
- type Graph
- type ImplementationBase
- type ImplementationType
- type Job
- type JobEvent
- type JobPostOptions
- type JobPostRequest
- type JobStatus
- type Map
- type Metadata
- type MetadataList
- type MetadataWorkspace
- type MetadataWorkspaceList
- type ModifiedBy
- type Node
- type PageInfo
- type PortAddress
- type Result
- type ResultBase
- type SourceTxt
- type Value
- type Version
- type VersionNumber
- type VolumeResultSource
- type Workflow
- type WorkflowPostRequest
Constants ¶
View Source
const ( K8scontainer ImplementationType = "k8scontainer" BrickType ComponentType = `brick` AnyType ComponentType = `any` GraphType ComponentType = `graph` MapType ComponentType = `map` ConditionalType ComponentType = `conditional` ArgSrcPort string = `port` ArgSrcFile string = `file` WorkflowType string = `workflow` FlowifyArtifactType string = "artifact" FlowifyParameterType string = "parameter" FlowifySecretType string = "env_secret" FlowifyParameterArrayType string = "parameter_array" FlowifyVolumeType string = "volume" VersionInit VersionNumber = VersionNumber(1) VersionTagLatest string = "latest" )
Variables ¶
View Source
var ( //go:embed spec/* StaticSpec embed.FS RegisteredSchemas map[reflect.Type]*jsonschema.Schema )
View Source
var (
ErrNoSchemaFound = fmt.Errorf("no schema found")
)
Functions ¶
func FindSchema ¶
func FindSchema(nameOrPath string) *jsonschema.Schema
Types ¶
type Any ¶
type Any struct {
ImplementationBase `json:",inline" bson:",inline"`
}
type Argument ¶
type Argument struct { ArgumentBase `json:",inline" bson:",inline"` Source interface{} `json:"source" bson:"source"` }
func (*Argument) UnmarshalBSON ¶
func (*Argument) UnmarshalJSON ¶
type ArgumentBase ¶
type ArgumentBase struct { Description string `json:"description,omitempty" bson:"description,omitempty"` Target ArgumentTarget `json:"target,omitempty" bson:"target,omitempty"` }
type ArgumentSourceFile ¶
type ArgumentSourceFile struct {
File string `json:"file" bson:"file"`
}
type ArgumentSourcePort ¶
type ArgumentSourcePort struct {
Port string `json:"port" bson:"port"`
}
type ArgumentTarget ¶
type Brick ¶
type Brick struct { ImplementationBase `json:",inline" bson:",inline"` Container *corev1.Container `json:"container"` Args []Argument `json:"args,omitempty" bson:"args"` Results []Result `json:"results,omitempty" bson:"results"` }
type CRefVersion ¶
type CRefVersion struct { Version VersionNumber `json:"version,omitempty" bson:"version,omitempty"` Uid ComponentReference `json:"uid,omitempty" bson:"uid,omitempty"` }
func (CRefVersion) IsZero ¶
func (c CRefVersion) IsZero() bool
func (CRefVersion) String ¶
func (c CRefVersion) String() string
type Component ¶
type Component struct { ComponentBase `json:",inline" bson:",inline"` Implementation interface{} `json:"implementation"` }
func (*Component) UnmarshalBSON ¶
func (*Component) UnmarshalJSON ¶
implements the json.Unmarshaler (cf. https://pkg.golang.ir/encoding/json#Unmarshaler)
type ComponentBase ¶
type ComponentBase struct { Metadata `json:",inline" bson:",inline"` Inputs []Data `json:"inputs,omitempty"` Outputs []Data `json:"outputs,omitempty"` Type ComponentType `json:"type"` }
type ComponentPostOptions ¶
type ComponentPostOptions struct { }
type ComponentPostRequest ¶
type ComponentPostRequest struct { Component Component `json:"component"` Options ComponentPostOptions `json:"options,omitempty"` }
type ComponentReference ¶
func NewComponentReference ¶
func NewComponentReference() ComponentReference
func NewReference ¶
func NewReference(s string) ComponentReference
Uses MustParse. Only use for testing
func (*ComponentReference) IsZero ¶
func (id *ComponentReference) IsZero() bool
func (ComponentReference) MarshalBSONValue ¶
func (c ComponentReference) MarshalBSONValue() (bsontype.Type, []byte, error)
func (ComponentReference) MarshalJSON ¶
func (r ComponentReference) MarshalJSON() ([]byte, error)
func (ComponentReference) String ¶
func (r ComponentReference) String() string
func (*ComponentReference) UnmarshalBSONValue ¶
func (c *ComponentReference) UnmarshalBSONValue(t bsontype.Type, data []byte) error
func (*ComponentReference) UnmarshalJSON ¶
func (r *ComponentReference) UnmarshalJSON(data []byte) error
type ComponentType ¶
type ComponentType string
type Conditional ¶
type Conditional struct { ImplementationBase `json:",inline" bson:",inline"` Expression `json:"expression" bson:"expression"` NodeTrue interface{} `json:"nodeTrue" bson:"nodeTrue"` NodeFalse interface{} `json:"nodeFalse,omitempty" bson:"nodeFalse,omitempty"` InputMappings []Edge `json:"inputMappings,omitempty" bson:"inputMappings,omitempty"` OutputMappings []Edge `json:"outputMappings,omitempty" bson:"outputMappings,omitempty"` }
func (*Conditional) UnmarshalBSON ¶
func (c *Conditional) UnmarshalBSON(data []byte) error
func (*Conditional) UnmarshalJSON ¶
func (c *Conditional) UnmarshalJSON(document []byte) error
type Data ¶
type Data struct { Name string `json:"name"` MediaType []string `json:"mediatype,omitempty"` Type string `json:"type"` // opaque userdata never touched by the backend Userdata json.RawMessage `json:"userdata,omitempty"` }
type Edge ¶
type Edge struct { Source PortAddress `json:"source"` Target PortAddress `json:"target"` }
type Expression ¶
type Expression struct { Left interface{} `json:"left" bson:"left"` Right interface{} `json:"right" bson:"right"` Operator string `json:"operator" bson:"operator"` }
func (*Expression) UnmarshalBSON ¶
func (e *Expression) UnmarshalBSON(data []byte) error
func (*Expression) UnmarshalJSON ¶
func (e *Expression) UnmarshalJSON(document []byte) error
func (Expression) Validate ¶
func (e Expression) Validate(doc []byte) error
type FileResultSource ¶
type FileResultSource struct {
File string `json:"file" bson:"file"`
}
type FlowifyVolume ¶
type FlowifyVolume struct { Uid ComponentReference `json:"uid"` Workspace string `json:"workspace"` Volume corev1.Volume `json:"volume"` }
type FlowifyVolumeList ¶
type FlowifyVolumeList struct { Items []FlowifyVolume `json:"items"` PageInfo PageInfo `json:"pageInfo"` }
type Graph ¶
type Graph struct { ImplementationBase `json:",inline" bson:",inline"` Nodes []Node `json:"nodes,omitempty" bson:"nodes"` Edges []Edge `json:"edges,omitempty" bson:"edges"` InputMappings []Edge `json:"inputMappings,omitempty" bson:"inputMappings,omitempty"` OutputMappings []Edge `json:"outputMappings,omitempty" bson:"outputMappings,omitempty"` }
type ImplementationBase ¶
type ImplementationBase struct {
Type ComponentType `json:"type" bson:"type"`
}
type ImplementationType ¶
type ImplementationType string
type Job ¶
type Job struct { Metadata `json:",inline" bson:",inline"` // the workflow is either a workflow or a reference to one in the database Type ComponentType `json:"type" bson:"type"` InputValues []Value `json:"inputValues,omitempty" bson:"inputValues,omitempty"` Workflow Workflow `json:"workflow" bson:"workflow"` Events []JobEvent `json:"events,omitempty" bson:"events,omitempty"` }
type JobPostOptions ¶
type JobPostOptions struct { Constants []interface{} `json:"constants"` Tags []string `json:"tags"` }
type JobPostRequest ¶
type JobPostRequest struct { Job Job `json:"job"` SubmitOptions JobPostOptions `json:"options"` }
type JobStatus ¶
type JobStatus struct { Uid ComponentReference `json:"uid" bson:"uid"` Status wfv1.WorkflowPhase `json:"status" bson:"status"` }
type Map ¶
type Map struct { ImplementationBase `json:",inline" bson:",inline"` Node interface{} `json:"node" bson:"node"` InputMappings []Edge `json:"inputMappings,omitempty" bson:"inputMappings,omitempty"` OutputMappings []Edge `json:"outputMappings,omitempty" bson:"outputMappings,omitempty"` }
func (*Map) UnmarshalBSON ¶
func (*Map) UnmarshalJSON ¶
type Metadata ¶
type Metadata struct { /* ModifiedBy, Uid and Timestamp are client read-only */ Name string `json:"name,omitempty" bson:"name,omitempty"` Description string `json:"description,omitempty" bson:"description,omitempty"` ModifiedBy ModifiedBy `json:"modifiedBy,omitempty" bson:"modifiedBy,omitempty"` Uid ComponentReference `json:"uid,omitempty" bson:"uid,omitempty"` Version Version `json:"version,omitempty" bson:"version,omitempty"` Timestamp time.Time `json:"timestamp" bson:"timestamp"` }
type MetadataList ¶
type MetadataWorkspace ¶
type MetadataWorkspaceList ¶
type MetadataWorkspaceList struct { Items []MetadataWorkspace `json:"items,omitempty"` // Total number in query before pagination, PageInfo PageInfo `json:"pageInfo"` }
type ModifiedBy ¶
type Node ¶
type Node struct { Id string `json:"id" bson:"id"` Node interface{} `json:"node" bson:"node"` // the node has userdata which is never touched by the backend Userdata json.RawMessage `json:"userdata,omitempty" bson:"userdata,omitempty"` }
func (*Node) UnmarshalBSON ¶
func (*Node) UnmarshalJSON ¶
implements the json.Unmarshaler (cf. https://pkg.golang.ir/encoding/json#Unmarshaler)
type PortAddress ¶
type Result ¶
type Result struct { ResultBase `json:",inline" bson:",inline"` Source interface{} `json:"source" bson:"source"` }
func (*Result) UnmarshalBSON ¶
func (*Result) UnmarshalJSON ¶
implements the json.Unmarshaler (cf. https://pkg.golang.ir/encoding/json#Unmarshaler)
type ResultBase ¶
type ResultBase struct { Description string `json:"description,omitempty" bson:"description,omitempty"` Target PortAddress `json:"target,omitempty" bson:"target"` }
type Value ¶
type Value struct { Value interface{} `json:"value" bson:"value"` Target string `json:"target" bson:"target"` }
func (*Value) UnmarshalJSON ¶
type Version ¶
type Version struct { Current VersionNumber `json:"current" bson:"current"` Tags []string `json:"tags,omitempty" bson:"tags,omitempty"` Previous CRefVersion `json:"previous,omitempty" bson:"previous,omitempty"` }
func (*Version) InitializeNew ¶
func (*Version) SetLatestTag ¶
func (v *Version) SetLatestTag()
type VersionNumber ¶
type VersionNumber int
func (VersionNumber) String ¶
func (v VersionNumber) String() string
type VolumeResultSource ¶
type VolumeResultSource struct {
Volume string `json:"volume" bson:"volume"`
}
type Workflow ¶
type Workflow struct { Metadata `json:",inline" bson:",inline"` Component Component `json:"component" bson:"component"` Type ComponentType `json:"type" bson:"type"` Workspace string `json:"workspace" bson:"workspace"` }
type WorkflowPostRequest ¶
type WorkflowPostRequest struct { Workflow Workflow `json:"workflow"` Options ComponentPostOptions `json:"options,omitempty"` }
Click to show internal directories.
Click to hide internal directories.