actions

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OK int = iota + 2
	KO
)

Variables

View Source
var CommandTypes = []string{"", "sh", "psql"}

Functions

func Time

func Time() time.Time

Types

type Action

type Action interface {
	Validate() error
	Run() (Report, []Action)
}

type Command

type Command struct {
	Text string
	Type string
	URI  string
}

func (Command) Run

func (c Command) Run() (Report, []Action)

func (Command) Validate

func (c Command) Validate() error

type FileLoader

type FileLoader struct {
	File string
	Type string
	URI  string
}

func (FileLoader) Run

func (l FileLoader) Run() (Report, []Action)

func (FileLoader) Validate

func (l FileLoader) Validate() error

type OutputLoader

type OutputLoader struct {
	Text string
	From string
	Type string
	URI  string
}

func (OutputLoader) Run

func (l OutputLoader) Run() (Report, []Action)

func (OutputLoader) Validate

func (l OutputLoader) Validate() error

type Report

type Report struct {
	Status    int
	StartTime time.Time
	EndTime   time.Time
	Elapsed   time.Duration
	Output    string
	Error     string
}

Jump to

Keyboard shortcuts

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