app

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assert

type Assert struct {
	Status int                  `json:"status"`
	All    Option[[]*Assertion] `json:"all"`
}

func NewAssert

func NewAssert(status int, all Option[[]*Assertion]) Assert

type Assertion

type Assertion struct {
	JsonPath string         `json:"jsonpath"`
	XPath    string         `json:"xpath"`
	Exists   Option[bool]   `json:"exists"`
	Contains Option[string] `json:"contains"`
	Equals   Option[string] `json:"equals"`
	IsNot    Option[string] `json:"isNot"`
}

type Exports

type Exports = map[string]string // var_name->jsonpath

func NewExportExpression

func NewExportExpression(jsonPath Option[string]) Exports

type Flow

type Flow struct {
	Name  string  `json:"name"`
	Steps []*Step `json:"steps"`
	// contains filtered or unexported fields
}

func NewFlow

func NewFlow(name string) *Flow

func (*Flow) AddStep

func (flow *Flow) AddStep(step *Step) error

func (*Flow) BuildStepsIndex

func (flow *Flow) BuildStepsIndex()

BuildStepsIndex creates an index for quick access to steps by name. Since the steps are array-based, this index allows O(1) access time instead of O(n) for searching through the array.

func (*Flow) GetStep

func (flow *Flow) GetStep(name string) (*Step, bool)

GetStep returns a pointer to the named step with a boolean 'ok' if it's found.

type Request

type Request struct {
	Method string                 `json:"method"`
	Path   string                 `json:"path"`
	Json   Option[map[string]any] `json:"json"`
	Xml    Option[string]         `json:"xml"`
	// Files stores the files to upload to the server by fieldName -> relativePath (relative to config file)
	Files Option[map[string]string] `json:"files"`
	// Headers stores custom HTTP headers to send with the request (headerName -> value)
	Headers        Option[map[string]string] `json:"headers"`
	DisableHeaders bool                      `json:"disableHeaders"`
}

func NewRequest

func NewRequest(method string, path string, json map[string]any) Request

type Step

type Step struct {
	Name    string      `json:"name"`
	Request Request     `json:"request"`
	Assert  Assert      `json:"assert"`
	Exports Exports     `json:"exports"`
	Options StepOptions `json:"options"`
}

func NewStep

func NewStep(name string, request Request, assert Assert, exports Exports) *Step

type StepOptions

type StepOptions struct {
	Timeout Option[string] `json:"timeout"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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