project

package
v0.74.1 Latest Latest
Warning

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

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

Documentation

Overview

Package project package project defines project 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:"SessionID,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

	SubWorkflows []*Bundle
	Templates    map[string][]*Bundle
	// contains filtered or unexported fields
}

Bundle represents a project bundle

func (*Bundle) AppendAsset

func (b *Bundle) AppendAsset(asset *Asset)

func (*Bundle) AppendTask

func (b *Bundle) AppendTask(task *Task)

func (*Bundle) Assets

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

Assets returns all assets

func (*Bundle) LookupWorkflow

func (b *Bundle) LookupWorkflow(id string) *Workflow

func (*Bundle) Projects

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

Projects returns all projects

func (*Bundle) Tasks

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

Tasks returns all tasks

func (*Bundle) Workflows

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

Workflows returns all workflows

type Extract

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

Extract represents a data extraction rule

type Extracts

type Extracts []*Extract

Extracts represents a list of data extraction rules

type Project

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

Project represents a project

type Revision

type Revision struct {
	//SessionID 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:"SessionID,omitempty" yaml:"-"`
	WorkflowID    string   `json:"WORKFLOW_ID,omitempty" yaml:"-"`
	ParentId      string   `json:"PARENT_ID,omitempty" yaml:"-"`
	Position      int      `json:"POSITION,omitempty" yaml:"-"`
	Tag           string   `json:"TAG,omitempty" yaml:"-"`
	Init          string   `jsonx:"inline" json:"INIT,omitempty" yaml:"-"`
	Post          string   `jsonx:"inline" json:"POST,omitempty" yaml:"-"`
	Description   string   `json:"DESCRIPTION,omitempty" yaml:",omitempty"`
	When          string   `sqlx:"WHEN_EXPR" json:"WHEN_EXPR,omitempty" yaml:"when,omitempty"`
	Exit          string   `sqlx:"EXIT_EXPR" json:"EXIT_EXPR,omitempty" yaml:"exit,omitempty"`
	OnError       string   `json:"ON_ERROR,omitempty" yaml:"onError,omitempty"`
	Deferred      string   `json:"DEFERRED,omitempty" yaml:",omitempty"`
	Service       string   `json:"SERVICE,omitempty" yaml:",omitempty"`
	Action        string   `json:"ACTION,omitempty" yaml:",omitempty"`
	Input         string   `json:"INPUT,omitempty" yaml:"-"`
	InputURI      string   `json:"INPUT_URI,omitempty" yaml:"uri,omitempty"`
	Async         bool     `json:"ASYNC,omitempty" yaml:",omitempty"`
	Skip          string   `sqlx:"SKIP_EXPR" json:"SKIP_EXPR,omitempty" yaml:",omitempty"`
	Fail          bool     `json:"FAIL,omitempty" yaml:",omitempty"`
	IsTemplate    bool     `json:"IS_TEMPLATE,omitempty" yaml:"-"`
	SubPath       string   `json:"SUB_PATH,omitempty"  yaml:",omitempty"`
	Range         string   `sqlx:"RANGE_EXPR" json:"RANGE_EXPR,omitempty" yaml:",omitempty"`
	Data          string   `jsonx:"inline" json:"DATA,omitempty" yaml:"-"`
	Variables     string   `jsonx:"inline" json:"VARIABLES,omitempty" yaml:"-"`
	Extracts      Extracts `jsonx:"inline" json:"EXTRACTS,omitempty" yaml:",omitempty"`
	SleepTimeMs   int      `json:"SLEEP_TIME_MS,omitempty" yaml:"sleepTimeMs,omitempty"`
	ThinkTimeMs   int      `json:"THINK_TIME_MS,omitempty"  yaml:"thinkTimeMs,omitempty"`
	Logging       *bool    `json:"LOGGING,omitempty"  yaml:",omitempty"`
	Repeat        int      `sqlx:"REPEAT_RUN" json:"REPEAT_RUN,omitempty"  yaml:",omitempty"`
	InstanceIndex int      `json:"INSTANCE_INDEX,omitempty"  yaml:"-"`
	InstanceTag   string   `json:"INSTANCE_TAG,omitempty" yaml:"-"`
}

Task represents a task

func (*Task) GetData

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

GetData returns task data

func (*Task) IsWorkflowRun

func (t *Task) IsWorkflowRun() bool

func (*Task) MarshalYAML

func (t *Task) MarshalYAML() (interface{}, error)

MarshalYAML marshals task to yaml

func (*Task) Method

func (t *Task) Method() string

Method returns task method

func (*Task) SetID

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

SetID sets task id

type Workflow

type Workflow struct {
	ID            string      `json:"SessionID,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"`
	Description   string      `json:"DESCRIPTION,omitempty"`
	Init          string      `jsonx:"inline" json:"INIT,omitempty"`
	Post          string      `jsonx:"inline" json:"POST,omitempty"`
	Steps         []*Task     `json:"-"`
	Assets        []*Asset    `json:"-"`
	Workflows     []*Workflow `json:"-"`
	Template      string      `json:"TEMPLATE,omitempty"`
	InstanceIndex int         `json:"INSTANCE_INDEX,omitempty"`
	InstanceTag   string      `json:"INSTANCE_TAG,omitempty"`
}

func (*Workflow) FileName

func (w *Workflow) FileName() string

func (*Workflow) MarshalYAML

func (w *Workflow) MarshalYAML() (interface{}, error)

Directories

Path Synopsis
dao

Jump to

Keyboard shortcuts

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