tasker

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigParentDir        = ".config"
	ConfigDir              = "tasker"
	ConfigUseDir           = "use"
	ConfigTaskerJsFilename = "tasker.js"
	DefaultTask            = "default"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Step

type Step struct {
	Op   string
	Args []string
}

type Task

type Task struct {
	Name  string
	Steps []Step
}

type TaskContext added in v1.2.0

type TaskContext struct {
	context.Context

	VM *goja.Runtime
	// contains filtered or unexported fields
}

func (*TaskContext) GetOriCall added in v1.2.0

func (c *TaskContext) GetOriCall() *goja.FunctionCall

func (*TaskContext) GetVM added in v1.2.0

func (c *TaskContext) GetVM() *goja.Runtime

func (*TaskContext) RunTask added in v1.2.0

func (c *TaskContext) RunTask(name string)

func (*TaskContext) SetRetVal added in v1.2.0

func (c *TaskContext) SetRetVal(val goja.Value)

type Tasker

type Tasker struct {
	// contains filtered or unexported fields
}

func (*Tasker) Init

func (t *Tasker) Init(taskerJs string, taskerDTS string)

func (*Tasker) Load

func (t *Tasker) Load(taskFile string) bool

func (*Tasker) Run

func (t *Tasker) Run(taskName string)

type Use

type Use struct {
	Name string
	Opt  map[string]any
}

Directories

Path Synopsis
ops

Jump to

Keyboard shortcuts

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