Help us shape the future of Go! Take the 2026 Go Developer Survey

rule

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcBodyAtLeastOneRule added in v0.0.6

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

implement VerifyRule Find at least one element that satisfies the condition

func (*GrpcBodyAtLeastOneRule) Name added in v0.0.6

func (r *GrpcBodyAtLeastOneRule) Name() string

func (*GrpcBodyAtLeastOneRule) Verify added in v0.0.6

func (r *GrpcBodyAtLeastOneRule) Verify(resp *model.GrpcResp) bool

type GrpcBodyEqualRule added in v0.0.6

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

func (*GrpcBodyEqualRule) Name added in v0.0.6

func (r *GrpcBodyEqualRule) Name() string

func (*GrpcBodyEqualRule) Verify added in v0.0.6

func (r *GrpcBodyEqualRule) Verify(resp *model.GrpcResp) bool

type GrpcCodeEqualRule added in v0.0.6

type GrpcCodeEqualRule struct {
	Expected string `json:"expected"`
}

implement VerifyRule

func (*GrpcCodeEqualRule) Name added in v0.0.6

func (r *GrpcCodeEqualRule) Name() string

func (*GrpcCodeEqualRule) Verify added in v0.0.6

func (r *GrpcCodeEqualRule) Verify(resp *model.GrpcResp) bool

type GrpcLuaRule added in v0.0.6

type GrpcLuaRule struct {
	LuaStr string `json:"lua"`
}

func (*GrpcLuaRule) Name added in v0.0.6

func (r *GrpcLuaRule) Name() string

func (*GrpcLuaRule) Verify added in v0.0.6

func (r *GrpcLuaRule) Verify(resp *model.GrpcResp) bool

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 HttpLuaRule added in v0.0.5

type HttpLuaRule struct {
	LuaStr string `json:"lua"`
}

func (*HttpLuaRule) Name added in v0.0.5

func (r *HttpLuaRule) Name() string

func (*HttpLuaRule) Verify added in v0.0.5

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

type HttpResp added in v0.0.5

type HttpResp struct {
	Code string
	Body string
}

type HttpStatusEqualRule

type HttpStatusEqualRule struct {
	Expected int `json:"expected"`
}

实现 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
}

type VerifyRuleGrpc added in v0.0.6

type VerifyRuleGrpc interface {
	Name() string
	Verify(response *model.GrpcResp) bool
}

Jump to

Keyboard shortcuts

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