patch

package
v0.77.5 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PackageName = "workflow/patch"
View Source
var Types map[string]reflect.Type
View Source
var WorkflowPatchFS embed.FS
View Source
var WorkflowPatchPathURI = "/v1/api/endly/workflow/{ProjectID}"

Functions

func DefineWorkflowPatchComponent

func DefineWorkflowPatchComponent(ctx context.Context, srv *datly.Service) (*repository.Component, error)

Types

type Asset

type Asset struct {
	Id            string    `sqlx:"SessionID,primaryKey" validate:"required,le(255)"`
	Location      string    `sqlx:"LOCATION" validate:"required,le(255)"`
	Description   *string   `sqlx:"DESCRIPTION" json:",omitempty" validate:"omitempty,le(65535)"`
	WorkflowId    string    `sqlx:"WORKFLOW_ID,refTable=WORKFLOW,refColumn=SessionID" validate:"required,le(255)"`
	IsDir         *int      `sqlx:"IS_DIR" json:",omitempty"`
	Template      *string   `sqlx:"TEMPLATE" json:",omitempty" validate:"omitempty,le(255)"`
	InstanceIndex *int      `sqlx:"INSTANCE_INDEX" json:",omitempty"`
	InstanceTag   *string   `sqlx:"INSTANCE_TAG" json:",omitempty" validate:"omitempty,le(255)"`
	Position      *int      `sqlx:"POSITION" json:",omitempty"`
	Source        *string   `sqlx:"SOURCE" json:",omitempty" validate:"omitempty,le(65535)"`
	Format        *string   `sqlx:"FORMAT" json:",omitempty" validate:"omitempty,le(255)"`
	Codec         *string   `sqlx:"CODEC" json:",omitempty" validate:"omitempty,le(255)"`
	Has           *AssetHas `setMarker:"true" format:"-" sqlx:"-" diff:"-"`
}

type AssetHas

type AssetHas struct {
	Id            bool
	Location      bool
	Description   bool
	WorkflowId    bool
	IsDir         bool
	Template      bool
	InstanceIndex bool
	InstanceTag   bool
	Position      bool
	Source        bool
	Format        bool
	Codec         bool
}

type AssetSlice

type AssetSlice []*Asset

func (AssetSlice) IndexById

func (c AssetSlice) IndexById() IndexedAsset

type Handler

type Handler struct{}

func (*Handler) Exec

func (h *Handler) Exec(ctx context.Context, sess handler.Session) (interface{}, error)

type IndexedAsset

type IndexedAsset map[string]*Asset

func (IndexedAsset) Has

func (c IndexedAsset) Has(key string) bool

type IndexedProject

type IndexedProject map[string]*Project

func (IndexedProject) Has

func (c IndexedProject) Has(key string) bool

type IndexedTask

type IndexedTask map[string]*Task

func (IndexedTask) Has

func (c IndexedTask) Has(key string) bool

type IndexedWorkflow

type IndexedWorkflow map[string]*Workflow

func (IndexedWorkflow) Has

func (c IndexedWorkflow) Has(key string) bool

type Input

type Input struct {
	Workflow *Workflow `parameter:",kind=body"`

	/*
	   ? SELECT ARRAY_AGG(Id) AS Values FROM  `/` LIMIT 1
	*/
	CurWorkflowId *struct{ Values []string } `parameter:",kind=param,in=Workflow,dataType=workflow/patch.Workflow" codec:"structql,uri=workflow/cur_workflow_id.sql"`

	/*
	   ? SELECT ARRAY_AGG(Id) AS Values FROM  `/Task` LIMIT 1
	*/
	CurWorkflowTaskId *struct{ Values []string } `parameter:",kind=param,in=Workflow,dataType=workflow/patch.Workflow" codec:"structql,uri=workflow/cur_workflow_task_id.sql"`

	/*
	    ? SELECT *
	     FROM TASK
	   WHERE $criteria.In("SessionID", $CurWorkflowTaskId.Values)
	*/
	CurTask []*Task `parameter:",kind=view,in=Task" view:"Task" sql:"uri=workflow/cur_task.sql"`

	/*
	   ? SELECT ARRAY_AGG(Id) AS Values FROM  `/Asset` LIMIT 1
	*/
	CurWorkflowAssetId *struct{ Values []string } `parameter:",kind=param,in=Workflow,dataType=workflow/patch.Workflow" codec:"structql,uri=workflow/cur_workflow_asset_id.sql"`

	/*
	    ? SELECT *
	     FROM ASSET
	   WHERE $criteria.In("SessionID", $CurWorkflowAssetId.Values)
	*/
	CurAsset []*Asset `parameter:",kind=view,in=Asset" view:"Asset" sql:"uri=workflow/cur_asset.sql"`

	/*
	   ? SELECT ARRAY_AGG(Id) AS Values FROM  `/Project` LIMIT 1
	*/
	CurWorkflowProjectId *struct{ Values []string } `` /* 126-byte string literal not displayed */

	/*
	    ? SELECT *
	     FROM PROJECT
	   WHERE $criteria.In("SessionID", $CurWorkflowProjectId.Values)
	*/
	CurProject []*Project `parameter:",kind=view,in=Project" view:"Project" sql:"uri=workflow/cur_project.sql"`

	/*
	    ? select * from WORKFLOW
	   WHERE $criteria.In("SessionID", $CurWorkflowId.Values)
	*/
	CurWorkflow *Workflow `parameter:",kind=view,in=Workflow" view:"Workflow" sql:"uri=workflow/cur_workflow.sql"`
}

type Output

type Output struct {
	response.Status `parameter:",kind=output,in=status" anonymous:"true"`
	Data            *Workflow `parameter:",kind=body"`
}

type Project

type Project struct {
	Id          string      `sqlx:"SessionID,primaryKey" validate:"required,le(255)"`
	Name        string      `sqlx:"NAME" validate:"required,le(255)"`
	Description *string     `sqlx:"DESCRIPTION" json:",omitempty" validate:"omitempty,le(65535)"`
	Has         *ProjectHas `setMarker:"true" format:"-" sqlx:"-" diff:"-"`
}

type ProjectHas

type ProjectHas struct {
	Id          bool
	Name        bool
	Description bool
}

type ProjectSlice

type ProjectSlice []*Project

func (ProjectSlice) IndexById

func (c ProjectSlice) IndexById() IndexedProject

type Task

type Task struct {
	Id            string   `sqlx:"SessionID,primaryKey" validate:"required,le(255)"`
	WorkflowId    string   `sqlx:"WORKFLOW_ID" validate:"required,le(255)"`
	ParentId      *string  `sqlx:"PARENT_ID" json:",omitempty" validate:"omitempty,le(255)"`
	Position      *int     `sqlx:"POSITION" json:",omitempty"`
	Tag           string   `sqlx:"TAG" validate:"required,le(255)"`
	Init          *string  `sqlx:"INIT" json:",omitempty" validate:"omitempty,le(65535)"`
	Post          *string  `sqlx:"POST" json:",omitempty" validate:"omitempty,le(65535)"`
	Description   *string  `sqlx:"DESCRIPTION" json:",omitempty" validate:"omitempty,le(65535)"`
	WhenExpr      *string  `sqlx:"WHEN_EXPR" json:",omitempty" validate:"omitempty,le(65535)"`
	ExitExpr      *string  `sqlx:"EXIT_EXPR" json:",omitempty" validate:"omitempty,le(65535)"`
	OnError       *string  `sqlx:"ON_ERROR" json:",omitempty" validate:"omitempty,le(65535)"`
	Deferred      *string  `sqlx:"DEFERRED" json:",omitempty" validate:"omitempty,le(65535)"`
	Service       *string  `sqlx:"SERVICE" json:",omitempty" validate:"omitempty,le(255)"`
	Action        *string  `sqlx:"ACTION" json:",omitempty" validate:"omitempty,le(255)"`
	Input         *string  `sqlx:"INPUT" json:",omitempty" validate:"omitempty,le(65535)"`
	InputUri      *string  `sqlx:"INPUT_URI" json:",omitempty" validate:"omitempty,le(65535)"`
	Async         *int     `sqlx:"ASYNC" json:",omitempty"`
	SkipExpr      *string  `sqlx:"SKIP_EXPR" json:",omitempty" validate:"omitempty,le(65535)"`
	Fail          *int     `sqlx:"FAIL" json:",omitempty"`
	IsTemplate    *int     `sqlx:"IS_TEMPLATE" json:",omitempty"`
	SubPath       *string  `sqlx:"SUB_PATH" json:",omitempty" validate:"omitempty,le(255)"`
	RangeExpr     *string  `sqlx:"RANGE_EXPR" json:",omitempty" validate:"omitempty,le(65535)"`
	Data          *string  `sqlx:"DATA" json:",omitempty" validate:"omitempty,le(65535)"`
	Variables     *string  `sqlx:"VARIABLES" json:",omitempty" validate:"omitempty,le(65535)"`
	Extracts      *string  `sqlx:"EXTRACTS" json:",omitempty" validate:"omitempty,le(65535)"`
	SleepTimeMs   *int     `sqlx:"SLEEP_TIME_MS" json:",omitempty"`
	ThinkTimeMs   *int     `sqlx:"THINK_TIME_MS" json:",omitempty"`
	Logging       *int     `sqlx:"LOGGING" json:",omitempty"`
	RepeatRun     *int     `sqlx:"REPEAT_RUN" json:",omitempty"`
	InstanceIndex *int     `sqlx:"INSTANCE_INDEX" json:",omitempty"`
	InstanceTag   *string  `sqlx:"INSTANCE_TAG" json:",omitempty" validate:"omitempty,le(255)"`
	Has           *TaskHas `setMarker:"true" format:"-" sqlx:"-" diff:"-"`
}

type TaskHas

type TaskHas struct {
	Id            bool
	WorkflowId    bool
	ParentId      bool
	Position      bool
	Tag           bool
	Init          bool
	Post          bool
	Description   bool
	WhenExpr      bool
	ExitExpr      bool
	OnError       bool
	Deferred      bool
	Service       bool
	Action        bool
	Input         bool
	InputUri      bool
	Async         bool
	SkipExpr      bool
	Fail          bool
	IsTemplate    bool
	SubPath       bool
	RangeExpr     bool
	Data          bool
	Variables     bool
	Extracts      bool
	SleepTimeMs   bool
	ThinkTimeMs   bool
	Logging       bool
	RepeatRun     bool
	InstanceIndex bool
	InstanceTag   bool
}

type TaskSlice

type TaskSlice []*Task

func (TaskSlice) IndexById

func (c TaskSlice) IndexById() IndexedTask

type Workflow

type Workflow struct {
	Id            string       `sqlx:"SessionID,primaryKey" validate:"required,le(255)"`
	ParentId      *string      `sqlx:"PARENT_ID" json:",omitempty" validate:"omitempty,le(255)"`
	Position      *int         `sqlx:"POSITION" json:",omitempty"`
	Revision      *string      `sqlx:"REVISION" json:",omitempty" validate:"omitempty,le(255)"`
	Uri           string       `sqlx:"URI" validate:"required,le(65535)"`
	ProjectId     string       `sqlx:"PROJECT_ID,refTable=PROJECT,refColumn=SessionID" validate:"required,le(255)"`
	Name          string       `sqlx:"NAME" validate:"required,le(255)"`
	Init          *string      `sqlx:"INIT" json:",omitempty" validate:"omitempty,le(65535)"`
	Post          *string      `sqlx:"POST" json:",omitempty" validate:"omitempty,le(65535)"`
	Template      *string      `sqlx:"TEMPLATE" json:",omitempty" validate:"omitempty,le(255)"`
	InstanceIndex *int         `sqlx:"INSTANCE_INDEX" json:",omitempty"`
	InstanceTag   *string      `sqlx:"INSTANCE_TAG" json:",omitempty" validate:"omitempty,le(255)"`
	Task          []*Task      `sqlx:"-" on:"SessionID:Id=WORKFLOW_ID:WorkflowId" view:"Task,table=TASK" sql:"   SELECT *   FROM TASK "`
	Asset         []*Asset     `sqlx:"-" on:"SessionID:Id=WORKFLOW_ID:WorkflowId" view:"Asset,table=ASSET" sql:"   SELECT *   FROM ASSET "`
	Project       []*Project   `sqlx:"-" on:"PROJECT_ID:ProjectId=SessionID:Id" view:"Project,table=PROJECT" sql:"   SELECT *   FROM PROJECT "`
	Has           *WorkflowHas `setMarker:"true" format:"-" sqlx:"-" diff:"-"`
}

type WorkflowHas

type WorkflowHas struct {
	Id            bool
	ParentId      bool
	Position      bool
	Revision      bool
	Uri           bool
	ProjectId     bool
	Name          bool
	Init          bool
	Post          bool
	Template      bool
	InstanceIndex bool
	InstanceTag   bool
	Task          bool
	Asset         bool
	Project       bool
}

type WorkflowSlice

type WorkflowSlice []*Workflow

func (WorkflowSlice) IndexById

func (c WorkflowSlice) IndexById() IndexedWorkflow

Jump to

Keyboard shortcuts

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