executor

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoTasksToExecute is returned when there are no tasks to execute
	ErrNoTasksToExecute = errors.New("there are no tasks to execute")
)

Functions

This section is empty.

Types

type Plan

type Plan struct {
	Goal              string             `json:"goal"`
	EndpointsFilepath string             `json:"endpoints"`
	UserAgent         string             `json:"ua"`
	AuthDataset       myhttp.AuthDataset `json:"auths"`
	Tasks             []Task             `json:"tasks"`
}

Plan is a plan that contains test information

func (Plan) Execute

func (p Plan) Execute(store *myhttp.Endpoints, info string) (reporter.Reports, error)

Execute a plan

func (Plan) GetEndpointsPath added in v0.5.0

func (p Plan) GetEndpointsPath(s string) string

func (Plan) GetUserAgent added in v0.5.0

func (p Plan) GetUserAgent(appInfo string) string

type Task

type Task struct {
	TargetAPI string           `json:"targetAPI"`
	Auth      []string         `json:"auth"`
	Variables myhttp.Variables `json:"variables"`
}

Task is a task definition for test

func (Task) Perform

func (t Task) Perform(endpoints *myhttp.Endpoints, dataset *myhttp.AuthDataset, ua string) *reporter.Report

Perform a task

Jump to

Keyboard shortcuts

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