base

package
v0.1.2-pre Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action []Task

Action is a slice of Tasks.

func (*Action) Run

func (a *Action) Run(ctx context.Context) error

Run the given action.

type ContextKey

type ContextKey string

ContextKey is the type of key that will be used to index into context.

type Tags

type Tags struct {
	M map[string]string
}

Tags supports string extrapolation using tags.

func (*Tags) Extrapolate

func (tags *Tags) Extrapolate(str *string) (string, error)

Extrapolate str using tags.

type Task

type Task interface {
	Run(ctx context.Context) error
}

Task defines common method signatures for every task.

type TaskSpec

type TaskSpec struct {
	// Library where this task is defined.
	Library string `json:"library" yaml:"library"`
	// Name (type) of this task.
	Task string `json:"task" yaml:"task"`
	// With holds inputs to this task.
	With map[string]interface{} `json:"with,omitempty" yaml:"with,omitempty"`
}

TaskSpec struct contains the specification of a task.

Jump to

Keyboard shortcuts

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