script

package
v0.0.0-...-de24375 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(c *engine.Context, s *Script, st stepper.Stepper, o ...opts.Opt[RunOpts]) error

func RunAsync

func RunAsync(c *engine.Context, s *Script, st stepper.Stepper, o ...opts.Opt[RunOpts]) context.Context

func WithChromeOpts

func WithChromeOpts(o ...chromedp.ExecAllocatorOption) opts.Opt[RunOpts]

func WithPostRunFunc

func WithPostRunFunc(f PostRunFunc) opts.Opt[RunOpts]

func WithScreenshotAfter

func WithScreenshotAfter(b bool) opts.Opt[RunOpts]

func WithScreenshotBefore

func WithScreenshotBefore(b bool) opts.Opt[RunOpts]

Types

type PostRunFunc

type PostRunFunc func(c *engine.Context, s *step.Step) error

type RunOpts

type RunOpts struct {
	Store            *engine.TemplateData
	PreRun           []chromedp.Action
	PostRunFunc      PostRunFunc
	ScreenshotAfter  bool
	ScreenshotBefore bool
	ChromeOpts       []chromedp.ExecAllocatorOption
}

func (RunOpts) DefaultOptions

func (r RunOpts) DefaultOptions() RunOpts

type Script

type Script struct {
	Steps   []*step.Step
	Signals []*step.ConditionalSignal
	// contains filtered or unexported fields
}

func New

func New(s *v1beta1.Script) (*Script, error)

func (*Script) ToProto

func (c *Script) ToProto() *v1beta1.Script

func (*Script) Validate

func (c *Script) Validate() error

Jump to

Keyboard shortcuts

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