models

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DepsBehaviour added in v0.6.0

type DepsBehaviour int

DepsBehaviour represents how a tasks dependencies are run. The default is DependencyBehaviourSync

const (
	// DependencyBehaviourSync should be used if the dependencies are to be run synchronously.
	DependencyBehaviourSync DepsBehaviour = iota
	// DependencyBehaviourAsync should be used if the dependencies are to be run asynchronously.
	DependencyBehaviourAsync
)

func ParseDepsBehaviour added in v0.6.0

func ParseDepsBehaviour(s string) (DepsBehaviour, bool)

func (DepsBehaviour) String added in v0.6.0

func (b DepsBehaviour) String() string

type RequiredBehaviour added in v0.3.0

type RequiredBehaviour int

RequiredBehaviour represents a tasks behaviour when required by another task. The default is RequiredBehaviourAlways

const (
	// RequiredBehaviourAlways should be used if the task is to be run every time it is required.
	RequiredBehaviourAlways RequiredBehaviour = iota
	// RequiredBehaviourOnce should be used if a task should be run once, even if required multiple times.
	RequiredBehaviourOnce
)

func ParseRequiredBehaviour added in v0.3.0

func ParseRequiredBehaviour(s string) (RequiredBehaviour, bool)

func (RequiredBehaviour) String added in v0.3.0

func (b RequiredBehaviour) String() string

type Task

type Task struct {
	Name              string
	Description       []string
	Script            string
	Dir               string
	Env               []string
	DependsOn         []string
	Inputs            []string
	ParsingError      string
	RequiredBehaviour RequiredBehaviour
	DepsBehaviour     DepsBehaviour
	Interactive       bool
}

Task represents a parsed Task.

func (Task) Display

func (t Task) Display(w io.Writer)

Display writes a Task as Markdown.

type Tasks

type Tasks []Task

Tasks is an alias type for []Task

func (Tasks) Get

func (ts Tasks) Get(tsname string) (task Task, ok bool)

Get returns a task by name, case insensitively.

Jump to

Keyboard shortcuts

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