runner

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 27 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"`
	Headers []Headers `json:"headers"`
	Body    []Body    `json:"body"`
	// contains filtered or unexported fields
}

type BasicAuth

type BasicAuth struct {
	User     string `json:"user"`
	Password string `json:"password"`
}

type Body

type Body struct {
	Select    string `json:"select,omitempty" yaml:"select"`
	Constrain string `json:"constrain,omitempty" yaml:"constrain,omitempty"`
	Want      any    `json:"want,omitempty" yaml:"want,omitempty"`
	ExportAs  string `json:"exportAs,omitempty" yaml:"exportAs,omitempty"`
	// contains filtered or unexported fields
}

type Certificates

type Certificates struct {
	CertFile string `json:"certFile"`
	KeyFile  string `json:"keyFile"`
}

type Export

type Export struct {
	Headers []ExportHeaders `json:"headers"`
	Body    []ExportBody    `json:"body"`
}

type ExportBody

type ExportBody struct {
	Select string `json:"select"`
	As     string `json:"as"`
}

type ExportHeaders

type ExportHeaders struct {
	Select string `json:"select"`
	As     string `json:"as"`
}

type Files

type Files struct {
	Name string `json:"name"`
	Path string `json:"path"`
}

type Flags

type Flags struct {
	Verbose     bool
	DisableLogs bool
	FailFast    bool
	Parallel    uint
}

type Headers

type Headers struct {
	Select    string `json:"select,omitempty" yaml:"select"`
	Constrain string `json:"constrain,omitempty" yaml:"constrain,omitempty"`
	Want      any    `json:"want,omitempty" yaml:"want,omitempty"`
	ExportAs  string `json:"exportAs,omitempty" yaml:"exportAs,omitempty"`
	// contains filtered or unexported fields
}

type Probe

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

func NewProbe

func NewProbe(dir string, flags Flags, client *req.Client) *Probe

func (*Probe) Execute

func (p *Probe) Execute()

func (*Probe) NewTest

func (p *Probe) NewTest(file string) Test

NewTest will return instance of new Test

type Request

type Request struct {
	AllowInsecure   bool              `json:"allowInsecure"`
	BasicAuth       BasicAuth         `json:"basicAuth"`
	Body            string            `json:"body"`
	BodyJson        string            `json:"bodyJson"`
	Certificates    Certificates      `json:"certificates"`
	FormData        map[string]any    `json:"formData"`
	Headers         map[string]string `json:"headers"`
	Method          string            `json:"method"`
	QueryParams     map[string]string `json:"queryParams"`
	Retry           Retry             `json:"retry"`
	Files           []Files           `json:"files"`
	SleepAfter      time.Duration     `json:"sleepAfter"`
	Timeout         time.Duration     `json:"timeout"`
	Times           time.Duration     `json:"times"`
	URL             string            `json:"url"`
	UserAgent       string            `json:"userAgent"`
	BearerAuthToken string            `json:"bearerAuthToken"`
}

type Retry

type Retry struct {
	After   time.Duration `json:"after"`
	Count   int           `json:"count"`
	RetryOn []int         `json:"retryOn"`
}

type Stage

type Stage struct {
	Name       string        `json:"name"`
	Key        string        `json:"key"`
	Skip       bool          `json:"skip"`
	Request    Request       `json:"request"`
	Assert     Assert        `json:"assert"`
	Export     Export        `json:"export"`
	SleepAfter time.Duration `json:"sleepAfter"`
	// contains filtered or unexported fields
}

type Test

type Test struct {
	Stages     []Stage        `json:"stages"`
	Skip       bool           `json:"skip"`
	Key        string         `json:"key"`
	Name       string         `json:"name"`
	BeforeAll  []string       `json:"beforeAll"`
	AfterAll   []string       `json:"afterAll"`
	BeforeEach []string       `json:"beforeEach"`
	AfterEach  []string       `json:"afterEach"`
	Variables  map[string]any `json:"variables"`
	Request    Request        `json:"request"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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