scripts

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalValue added in v0.1.15

type GlobalValue struct {
	Name   string
	Value  string
	Secret bool
	Delete bool
}

type PreRequestInput

type PreRequestInput struct {
	Request   *restfile.Request
	Variables map[string]string
	Globals   map[string]GlobalValue
	BaseDir   string
}

type PreRequestOutput

type PreRequestOutput struct {
	Headers   http.Header
	Query     map[string]string
	Body      *string
	URL       *string
	Method    *string
	Variables map[string]string
	Globals   map[string]GlobalValue
}

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(fs httpclient.FileSystem) *Runner

func (*Runner) RunPreRequest

func (r *Runner) RunPreRequest(scripts []restfile.ScriptBlock, input PreRequestInput) (PreRequestOutput, error)

func (*Runner) RunTests

func (r *Runner) RunTests(scripts []restfile.ScriptBlock, input TestInput) ([]TestResult, map[string]GlobalValue, error)

type TestInput

type TestInput struct {
	Response  *httpclient.Response
	Variables map[string]string
	Globals   map[string]GlobalValue
	BaseDir   string
}

type TestResult

type TestResult struct {
	Name    string
	Message string
	Passed  bool
	Elapsed time.Duration
}

Jump to

Keyboard shortcuts

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