workflow

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Choice

type Choice struct {
	Default string
	Options []string
	Value   string
}

type Content

type Content struct {
	Description string
	Type        string
	Required    bool

	// KeyValue is a map of key and value designed for JSONContent
	KeyValue *[]KeyValue

	// Choice is a map of key and value designed for Options
	Choice *Choice

	// Value is a map of string and value designed for string
	Value *Value
}

type KeyValue

type KeyValue struct {
	Default string
	Key     string
	Value   string
}

type Pretty

type Pretty struct {
	Choices []PrettyChoice
	Inputs  []PrettyInput
	KeyVals []PrettyKeyValue
}

func (*Pretty) ToJson

func (p *Pretty) ToJson() (string, error)

type PrettyChoice

type PrettyChoice struct {
	ID      int
	Key     string
	Value   string
	Values  []string
	Default string
}

func (*PrettyChoice) SetValue

func (c *PrettyChoice) SetValue(value string)

type PrettyInput

type PrettyInput struct {
	ID      int
	Key     string
	Value   string
	Default string
}

func (*PrettyInput) SetValue

func (i *PrettyInput) SetValue(value string)

type PrettyKeyValue

type PrettyKeyValue struct {
	ID      int
	Parent  *string
	Key     string
	Value   string
	Default string
}

func (*PrettyKeyValue) SetValue

func (kv *PrettyKeyValue) SetValue(value string)

type Value

type Value struct {
	Default any
	Value   any
}

type Workflow

type Workflow struct {
	// Content is a map of key and value designed for workflow_dispatch.inputs
	Content map[string]Content
}

func ParseWorkflow

func ParseWorkflow(content py.WorkflowContent) (*Workflow, error)

func (*Workflow) ToPretty

func (w *Workflow) ToPretty() *Pretty

Jump to

Keyboard shortcuts

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