action

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT 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 struct {
	Name    string `yaml:"name" required:"true"`
	Command string `yaml:"command" required:"true"`
	Code    int    `yaml:"code" default:"0"`
	Cron    string `yaml:"cron" default:"* * * * *"`
	On      On     `yaml:"when"`
}

func (*Action) Execute

func (a *Action) Execute() *Result

func (*Action) Validate

func (a *Action) Validate() error

type On

type On struct {
	Start   string `yaml:"start"`
	Success string `yaml:"success"`
	Failure string `yaml:"failure"`
}

func (*On) Validate

func (o *On) Validate() error

type Result added in v0.2.0

type Result struct {
	Action *Action
	Err    error
	Code   int
	Stdout string
}

Jump to

Keyboard shortcuts

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