transfer

package
v0.71.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

package transfer defines the data transfer model

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	ID            string `json:"ID,omitempty"`
	Location      string `json:"LOCATION,omitempty"`
	Description   string `json:"DESCRIPTION,omitempty"`
	WorkflowID    string `json:"WORKFLOW_ID,omitempty"`
	IsDir         bool   `json:"IS_DIR,omitempty"`
	Template      string `json:"TEMPLATE,omitempty"`
	InstanceIndex int    `json:"INSTANCE_INDEX,omitempty"`
	InstanceTag   string `json:"INSTANCE_TAG,omitempty"`
	Position      int    `json:"POSITION,omitempty"`
	Source        []byte `json:"SOURCE,omitempty"`
	Format        string `json:"FORMAT,omitempty"`
	Codec         string `json:"CODEC,omitempty"`
}

Asset represents a workflow asset

type Bundle

type Bundle struct {
	Project *Project
	*Workflow
	Tasks        []*Task
	Assets       []*Asset
	SubWorkflows []*Bundle
	Templates    map[string][]*Bundle
}

func (*Bundle) AllAssets

func (b *Bundle) AllAssets() []*Asset

func (*Bundle) AllTasks

func (b *Bundle) AllTasks() []*Task

func (*Bundle) Projects

func (b *Bundle) Projects() []*Project

func (*Bundle) Workflows

func (b *Bundle) Workflows() []*Workflow

type Extract

type Extract struct {
	RegExpr  string `description:"regular expression with oval bracket to extract match pattern"`            //regular expression
	Key      string `description:"state key to store a match"`                                               //state key to store a match
	Reset    bool   `description:"reset the key in the context before evaluating this data extraction rule"` //reset the key in the context before evaluating this data extraction rule
	Required bool   `description:"require that at least one pattern match is returned"`                      //require that at least one pattern match is returned
}

type Extracts

type Extracts []*Extract

type Project

type Project struct {
	ID          string `json:"ID,omitempty"`
	Name        string `json:"NAME,omitempty"`
	Description string `json:"DESCRIPTION,omitempty"`
}

type Revision

type Revision struct {
	//ID represents revision ID
	ID string
	//WorkflowID represents workflow ID
	Principal string
	//Comment represents revision comment
	Comment string
	//Diff represents revision diff
	Diff string
}

Revision represents a workflow revision

type Task

type Task struct {
	ID            string   `json:"ID,omitempty"`
	WorkflowID    string   `json:"WORKFLOW_ID,omitempty"`
	ParentId      string   `json:"PARENT_ID,omitempty"`
	Position      int      `json:"POSITION,omitempty"`
	Tag           string   `json:"TAG,omitempty"`
	Init          string   `jsonx:"inline" json:"INIT,omitempty"`
	Post          string   `jsonx:"inline" json:"POST,omitempty"`
	Description   string   `json:"DESCRIPTION,omitempty"`
	When          string   `sqlx:"WHEN_EXPR" json:"WHEN_EXPR,omitempty"`
	Exit          string   `sqlx:"EXIT_EXPR" json:"EXIT_EXPR,omitempty"`
	OnError       string   `json:"ON_ERROR,omitempty"`
	Deferred      string   `json:"DEFERRED,omitempty"`
	Service       string   `json:"SERVICE,omitempty"`
	Action        string   `json:"ACTION,omitempty"`
	Input         string   `json:"INPUT,omitempty"`
	InputURI      string   `json:"INPUT_URI,omitempty"`
	Async         bool     `json:"ASYNC,omitempty"`
	Skip          string   `sqlx:"SKIP_EXPR" json:"SKIP_EXPR,omitempty"`
	Fail          bool     `json:"FAIL,omitempty"`
	IsTemplate    bool     `json:"IS_TEMPLATE,omitempty"`
	SubPath       string   `json:"SUB_PATH,omitempty"`
	Range         string   `sqlx:"RANGE_EXPR" json:"RANGE_EXPR,omitempty"`
	Data          string   `jsonx:"inline" json:"DATA,omitempty"`
	Variables     string   `jsonx:"inline" json:"VARIABLES,omitempty"`
	Extracts      Extracts `jsonx:"inline" json:"EXTRACTS,omitempty"`
	SleepTimeMs   int      `json:"SLEEP_TIME_MS,omitempty"`
	ThinkTimeMs   int      `json:"THINK_TIME_MS,omitempty"`
	Logging       *bool    `json:"LOGGING,omitempty"`
	Repeat        int      `sqlx:"REPEAT_RUN" json:"REPEAT_RUN,omitempty"`
	InstanceIndex int      `json:"INSTANCE_INDEX,omitempty"`
	InstanceTag   string   `json:"INSTANCE_TAG,omitempty"`
}

func (*Task) GetData

func (t *Task) GetData() map[string]string

func (*Task) SetID

func (t *Task) SetID(prefix, name string)

type Workflow

type Workflow struct {
	ID            string  `json:"ID,omitempty"`
	Position      int     `json:"POSITION,omitempty"`
	ParentId      string  `json:"PARENT_ID,omitempty"`
	Revision      string  `json:"REVISION,omitempty"`
	URI           string  `json:"URI,omitempty"`
	ProjectID     string  `json:"PROJECT_ID,omitempty"`
	Name          string  `json:"NAME,omitempty"`
	Init          string  `jsonx:"inline" json:"INIT,omitempty"`
	Post          string  `jsonx:"inline" json:"POST,omitempty"`
	Steps         []*Task `json:"-"`
	Template      string  `json:"TEMPLATE,omitempty"`
	InstanceIndex int     `json:"INSTANCE_INDEX,omitempty"`
	InstanceTag   string  `json:"INSTANCE_TAG,omitempty"`
}

Directories

Path Synopsis
datly

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL