rule

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpBodyAtLeastOneRule

type HttpBodyAtLeastOneRule struct {
	Xpath    string `json:"xpath"`
	Expected any    `json:"expected"`
}

实现 VerifyRule 至少找到一个满足条件的元素

func (*HttpBodyAtLeastOneRule) Name

func (r *HttpBodyAtLeastOneRule) Name() string

func (*HttpBodyAtLeastOneRule) Verify

func (r *HttpBodyAtLeastOneRule) Verify(resp *resty.Response) bool

type HttpBodyEqualRule

type HttpBodyEqualRule struct {
	Xpath    string `json:"xpath"`
	Expected any    `json:"expected"`
}

实现 VerifyRule

func (*HttpBodyEqualRule) Name

func (r *HttpBodyEqualRule) Name() string

func (*HttpBodyEqualRule) Verify

func (r *HttpBodyEqualRule) Verify(resp *resty.Response) bool

type HttpStatusEqualRule

type HttpStatusEqualRule struct {
	ExpectedStatus int `json:"expectedStatus"`
}

实现 VerifyRule

func (*HttpStatusEqualRule) Name

func (r *HttpStatusEqualRule) Name() string

func (*HttpStatusEqualRule) Verify

func (r *HttpStatusEqualRule) Verify(resp *resty.Response) bool

type VerifyRule

type VerifyRule interface {
	Name() string
	Verify(response *resty.Response) bool
}

Jump to

Keyboard shortcuts

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