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 ¶
View Source
var ANALYZER_CHAIN = []HttpResponseAnalyzer{ &YopMetadataResponseAnalyzer{}, &YopSignatureCheckAnalyzer{}, &YopErrorResponseAnalyzer{}, &YopJsonResponseAnalyzer{}, }
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 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
Click to show internal directories.
Click to hide internal directories.