workflow

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TEMPLATE_FUNCTIONS = template.FuncMap{
	"replace": func(s, old, new string) string {
		return strings.Replace(s, old, new, -1)
	},
	"date": func(format string) string {
		return time.Now().Format(format)
	},
	"join": func(s1, s2, sep string) string {
		if len(s1) == 0 {
			return s2
		}
		if len(s2) == 0 {
			return s1
		}
		return s1 + sep + s2
	},
}

Functions

func ExecuteWorkflow

func ExecuteWorkflow(workflow *exec.Workflow) error

func Template

func Template(input string, env exec.Env) (string, error)

Types

type Runtime

type Runtime struct {
	Env      exec.Env
	Template string
}

func GetRuntime

func GetRuntime(runtimes []config.Runtime, name string, env exec.Env) (*Runtime, error)

func (*Runtime) Execute

func (r *Runtime) Execute(command string) error

Jump to

Keyboard shortcuts

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