miniTasks

package
v0.0.0-...-27c9e6d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToCode

func ConvertToCode(steps []interface{}, importStore *ImportStore) (string, error)

Types

type Assignment

type Assignment struct {
	Type   string `json:"type"`
	Name   string `json:"name"`
	Params struct {
		Name  string `json:"name"`
		Value string `json:"value"`
	} `json:"params"`
}

type ExecuteTask

type ExecuteTask struct {
	Type   string `json:"type"`
	Name   string `json:"name"`
	Params struct {
		Output  string                 `json:"output"`
		Url     string                 `json:"url"`
		Headers map[string]interface{} `json:"headers"`
		Body    map[string]interface{} `json:"body"`
		Method  string                 `json:"method"`
	} `json:"params"`
}

type Foreach

type Foreach struct {
	Type   string `json:"type"`
	Name   string `json:"name"`
	Params struct {
		Collection string        `json:"collection"`
		Iterator   string        `json:"iterator"`
		Body       []interface{} `json:"body"`
	} `json:"params"`
}

type FunctionCall

type FunctionCall struct {
	Type   string `json:"type"`
	Name   string `json:"name"`
	Params struct {
		Output    string        `json:"output"`
		Name      string        `json:"name"`
		Arguments []interface{} `json:"arguments"`
	} `json:"params"`
}

type If

type If struct {
	Type   string `json:"type"`
	Name   string `json:"name"`
	Params struct {
		Branches []struct {
			Condition string        `json:"condition"`
			Body      []interface{} `json:"body"`
		} `json:"branches"`
		ElseBranch []interface{} `json:"elseBranch"`
	} `json:"params"`
}

type ImportStore

type ImportStore struct {

	// Imports []string
	Imports map[string]string
	// contains filtered or unexported fields
}

func NewImportStore

func NewImportStore() ImportStore

func (*ImportStore) AddImport

func (i *ImportStore) AddImport(toImport string)

Add the functionality to add new imports to the import store

func (*ImportStore) ToCode

func (i *ImportStore) ToCode() (string, error)

type Output

type Output struct {
	Type   string `json:"type"`
	Name   string `json:"name"`
	Params struct {
		Value string `json:"value"`
	} `json:"params"`
}

type Repeat

type Repeat struct {
	Type   string `json:"type"`
	Name   string `json:"name"`
	Params struct {
		Count    string        `json:"count"`
		Iterator string        `json:"iterator"`
		Body     []interface{} `json:"body"`
	} `json:"params"`
}

type VarDeclaration

type VarDeclaration struct {
	Type   string `json:"type"`
	Name   string `json:"name"`
	Params struct {
		Name string `json:"name"`
	} `json:"params"`
}

Jump to

Keyboard shortcuts

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