spec

package
v0.0.0-...-c677ff1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingTypeKey  = errors.New("missing 'type' on command")
	ErrMissingStepsKey = errors.New("missing 'steps' on command")
)

Functions

func Run

func Run(spec Spec) error

Types

type JSON

type JSON struct {
	// Content is the content of the json in bytes.
	Content     []byte
	Environment environment.Environment
}

JSON spec format.

func FromJSONBytes

func FromJSONBytes(json []byte, environment environment.Environment) *JSON

FromJSONBytes returns a JSON from a byte array.

func FromJSONFile

func FromJSONFile(path string, environment environment.Environment) (*JSON, error)

FromJSONFile given a path returns a JSON struct instance.

func (JSON) Tasks

func (spec JSON) Tasks() (*[]tasks.Task, error)

Tasks return an array of tasks by parsing JSON.Content or an error if it fails.

type Spec

type Spec interface {
	Tasks() (*[]tasks2.Task, error)
}

Jump to

Keyboard shortcuts

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