response

package
v0.0.0-...-2de47e0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package response Copyright: Copyright (c) 2020<br> Company: 易宝支付(YeePay)<br> @author : yunmei.wu @time : 2023/3/22 10:54 PM

Package response Copyright: Copyright (c) 2020<br> Company: 易宝支付(YeePay)<br> @author : yunmei.wu @time : 2023/3/16 3:22 PM

Package response Copyright: Copyright (c) 2020<br> Company: 易宝支付(YeePay)<br> @author : yunmei.wu @time : 2023/3/22 11:09 PM

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type HttpResponseAnalyzer

type HttpResponseAnalyzer interface {
	Analyze(context RespHandleContext, httpResponse *http.Response) error
}

type RespHandleContext

type RespHandleContext struct {
	auth.YopSigner
	*YopResponse
	request.YopRequest
}

type YopErrorResponseAnalyzer

type YopErrorResponseAnalyzer struct {
}

func (*YopErrorResponseAnalyzer) Analyze

func (yopErrorResponseAnalyzer *YopErrorResponseAnalyzer) Analyze(context RespHandleContext, httpResponse *http.Response) error

type YopJsonResponseAnalyzer

type YopJsonResponseAnalyzer struct {
}

func (*YopJsonResponseAnalyzer) Analyze

func (yopJsonResponseAnalyzer *YopJsonResponseAnalyzer) Analyze(context RespHandleContext, httpResponse *http.Response) error

type YopMetadataResponseAnalyzer

type YopMetadataResponseAnalyzer struct {
}

func (*YopMetadataResponseAnalyzer) Analyze

func (yopMetadataResponseAnalyzer *YopMetadataResponseAnalyzer) Analyze(context RespHandleContext, httpResponse *http.Response) error

type YopResponse

type YopResponse struct {
	Metadata *YopResponseMetadata
	Result   any
	// http请求收到的原始响应体
	// 若接口类型为文件下载,则该值为文件内容
	Content []byte
}

type YopResponseMetadata

type YopResponseMetadata struct {
	YopRequestId     string
	YopContentSha256 string
	YopSign          string
	ContentType      string
	Date             time.Time
	Server           string
	YopCertSerialNo  string
	Crc64ECMA        string
}

type YopServiceError

type YopServiceError struct {
	RequestId  string
	Code       string
	Message    string
	SubCode    string
	SubMessage string
	DocUrl     string
}

func (*YopServiceError) Error

func (err *YopServiceError) Error() string

type YopSignatureCheckAnalyzer

type YopSignatureCheckAnalyzer struct {
}

func (*YopSignatureCheckAnalyzer) Analyze

func (yopSignatureCheckAnalyzer *YopSignatureCheckAnalyzer) Analyze(context RespHandleContext, httpResponse *http.Response) error

Jump to

Keyboard shortcuts

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