alertscript

package module
v0.0.0-...-1fab3e4 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: MIT Imports: 15 Imported by: 0

README

for offline testing of Deduce Alert Action scripts

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AS

type AS struct {
	Output  string
	Result  goja.Value
	WebReqs int
	WebErrs int
	// contains filtered or unexported fields
}

func Run

func Run(cf *Conf) (*AS, error)

func (*AS) Diag

func (as *AS) Diag(s string)

func (*AS) Diagf

func (as *AS) Diagf(s string, args ...interface{})

func (*AS) Log

func (as *AS) Log(s string)

func (*AS) Logf

func (as *AS) Logf(s string, args ...interface{})

type Conf

type Conf struct {
	Script     string
	DataName   string
	Data       interface{}
	Timeout    time.Duration
	WebTimeout time.Duration
	WebMax     int
	WebMock    bool
	Diag       func(string)
}

type Result

type Result struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Body    string `json:"body"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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