script

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SchemaBytes []byte

Functions

func BuildScriptJson

func BuildScriptJson(cfg config.RecordConfig, lines []utils.CapturedLine, exitCode int, now time.Time, logger utils.Logger) (string, error)

Types

type Run

type Run struct {
	Timestamp  time.Time `json:"timestamp"`
	Executable string    `json:"executable"`
	Arguments  []string  `json:"arguments"`
	ExitCode   int       `json:"exitCode"`
	Steps      []Step    `json:"steps"`
}

type Script

type Script struct {
	Version string `json:"version"`
	Runs    []Run  `json:"runs"`
}

func NewScriptFromBytes

func NewScriptFromBytes(json []byte) (Script, error)

func NewScriptFromFile

func NewScriptFromFile(filePath string) (Script, error)

type Step

type Step struct {
	Line      string        `json:"line"`
	LineRegex regexp.Regexp `json:"-"`
	Input     string        `json:"input,omitempty"`
	IsRegex   bool          `json:"isRegex,omitempty"`
}

Jump to

Keyboard shortcuts

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