Documentation ¶
Index ¶
- func Unmarshal(response AcsResponse, httpResponse *http.Response, format string) (err error)
- type AcsResponse
- type BaseResponse
- func (baseResponse *BaseResponse) GetHttpContentBytes() []byte
- func (baseResponse *BaseResponse) GetHttpContentString() string
- func (baseResponse *BaseResponse) GetHttpHeaders() map[string][]string
- func (baseResponse *BaseResponse) GetHttpStatus() int
- func (baseResponse *BaseResponse) GetOriginHttpResponse() *http.Response
- func (baseResponse *BaseResponse) IsSuccess() bool
- func (baseResponse *BaseResponse) String() string
- type CommonResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AcsResponse ¶
type AcsResponse interface { IsSuccess() bool GetHttpStatus() int GetHttpHeaders() map[string][]string GetHttpContentString() string GetHttpContentBytes() []byte GetOriginHttpResponse() *http.Response // contains filtered or unexported methods }
AcsResponse interface
type BaseResponse ¶
type BaseResponse struct {
// contains filtered or unexported fields
}
BaseResponse wrap originHttpResponse
func (*BaseResponse) GetHttpContentBytes ¶
func (baseResponse *BaseResponse) GetHttpContentBytes() []byte
GetHttpContentBytes returns httpContentBytes
func (*BaseResponse) GetHttpContentString ¶
func (baseResponse *BaseResponse) GetHttpContentString() string
GetHttpContentString returns httpContentString
func (*BaseResponse) GetHttpHeaders ¶
func (baseResponse *BaseResponse) GetHttpHeaders() map[string][]string
GetHttpHeaders returns httpHeaders
func (*BaseResponse) GetHttpStatus ¶
func (baseResponse *BaseResponse) GetHttpStatus() int
GetHttpStatus returns httpStatus
func (*BaseResponse) GetOriginHttpResponse ¶
func (baseResponse *BaseResponse) GetOriginHttpResponse() *http.Response
GetOriginHttpResponse returns originHttpResponse
func (*BaseResponse) IsSuccess ¶
func (baseResponse *BaseResponse) IsSuccess() bool
IsSuccess checks weather httpStatus is 200 or not
func (*BaseResponse) String ¶
func (baseResponse *BaseResponse) String() string
String returns base response content
type CommonResponse ¶
type CommonResponse struct {
*BaseResponse
}
CommonResponse wrap base response
func NewCommonResponse ¶
func NewCommonResponse() (response *CommonResponse)
NewCommonResponse return common response
Click to show internal directories.
Click to hide internal directories.