validators

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MulanPSL-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 NullValidator

type NullValidator struct {
}

NullValidator 空验证器,不对报文进行验证,对任意报文均不会返回错误

func (*NullValidator) Validate

func (validator *NullValidator) Validate(ctx context.Context, response *http.Response) error

Validate 跳过报文签名验证

type PayResponseValidator

type PayResponseValidator struct {
	PayValidator
}

PayResponseValidator 默认应答报文验证器

func NewPayResponseValidator

func NewPayResponseValidator(verifier auth.Verifier) *PayResponseValidator

NewPayResponseValidator 使用 auth.Verifier 初始化一个 PayResponseValidator

func (*PayResponseValidator) Validate

func (v *PayResponseValidator) Validate(ctx context.Context, response *http.Response) error

Validate 使用验证器对支付应答报文进行验证

type PayValidator

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

Jump to

Keyboard shortcuts

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