encoding

package
v0.3.10 Latest Latest
Warning

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

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

Documentation

Overview

Package encoding decodes the JSON-encoded workflow,

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain struct {
	Description I18nField `json:"description"`
	LinkID      string    `json:"link_id"`
	// contains filtered or unexported fields
}

func (Chain) ID

func (v Chain) ID() string

type I18nField

type I18nField map[string]string
type Link struct {
	Config            LinkConfig            `json:"config"`
	Description       I18nField             `json:"description"`
	ExitCodes         map[int]*LinkExitCode `json:"exit_codes"`
	FallbackJobStatus string                `json:"fallback_job_status"`
	FallbackLinkID    string                `json:"fallback_link_id"`
	Group             I18nField             `json:"group"`

	// Start and end of the processing workflow.
	Start bool `json:"start"`
	End   bool `json:"end"`
	// contains filtered or unexported fields
}

func (Link) ID

func (v Link) ID() string

type LinkChoice

type LinkChoice struct {
	Value  bool   `json:"value"`
	LinkID string `json:"link_id"`
}

type LinkConfig

type LinkConfig struct {
	Manager string `json:"@manager"`
	Model   string `json:"@model"`

	// StandardTaskConfig
	Arguments     string `json:"arguments"`
	Execute       string `json:"execute"`
	FilterFileEnd string `json:"filter_file_end"`
	FilterSubdir  string `json:"filter_subdir"`
	StderrFile    string `json:"stderr_file"`
	StdoutFile    string `json:"stdout_file"`

	// MicroServiceChainChoice
	ChainChoices []string     `json:"chain_choices"`
	LinkChoices  []LinkChoice `json:"choices"`

	// TaskConfigSetUnitVariable
	Variable      string `json:"variable"`
	VariableValue string `json:"variable_value"`
	ChainID       string `json:"chain_id"`

	// MicroServiceChoiceReplacementDic
	Replacements []LinkConfigReplacement `json:"replacements"`
}

type LinkConfigReplacement

type LinkConfigReplacement struct {
	ID          string            `json:"id"`
	Description I18nField         `json:"description"`
	Items       map[string]string `json:"items"`
}

type LinkExitCode

type LinkExitCode struct {
	JobStatus string `json:"job_status"`
	LinkID    string `json:"link_id"`
}

type Vertex

type Vertex interface {
	ID() string
}

type WatchedDirectory

type WatchedDirectory struct {
	ChainID  string `json:"chain_id"`
	OnlyDirs bool   `json:"only_dirs"`
	Path     string `json:"path"`
	UnitType string `json:"unit_type"`
}

func (WatchedDirectory) ID

func (v WatchedDirectory) ID() string

type WorkflowData

type WorkflowData struct {
	WatchedDirectories []*WatchedDirectory `json:"watched_directories"`
	Chains             map[string]*Chain   `json:"chains"`
	Links              map[string]*Link    `json:"links"`
}

func LoadWorkflowData

func LoadWorkflowData(stream []byte) (*WorkflowData, error)

func New

func New() *WorkflowData

Jump to

Keyboard shortcuts

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