Documentation
¶
Index ¶
- Variables
- type IResponse
- type IResponseBuilder
- type SResponse
- func (p *SResponse) Build() IResponse
- func (p *SResponse) GetBody() []byte
- func (p *SResponse) GetCode() int
- func (p *SResponse) GetHead() map[string]string
- func (p *SResponse) ToBytes() []byte
- func (p *SResponse) ToString() string
- func (p *SResponse) WithBody(pBody []byte) IResponseBuilder
- func (p *SResponse) WithCode(pCode int) IResponseBuilder
- func (p *SResponse) WithHead(pHead map[string]string) IResponseBuilder
- type SResponseBlock
- type SResponseError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrLoadBytesJoiner = &SResponseError{"load bytes joiner"} ErrDecodeResponse = &SResponseError{"decode response"} ErrUnknownType = &SResponseError{"unknown type"} )
Functions ¶
This section is empty.
Types ¶
type IResponse ¶
type IResponse interface { types.IConverter GetCode() int GetHead() map[string]string GetBody() []byte }
func LoadResponse ¶
type IResponseBuilder ¶ added in v1.7.7
type IResponseBuilder interface { Build() IResponse WithCode(pCode int) IResponseBuilder WithHead(map[string]string) IResponseBuilder WithBody(pBody []byte) IResponseBuilder }
func NewResponseBuilder ¶ added in v1.7.7
func NewResponseBuilder() IResponseBuilder
type SResponse ¶
type SResponse struct { SResponseBlock FBody []byte `json:"body,omitempty"` }
func (*SResponse) WithBody ¶
func (p *SResponse) WithBody(pBody []byte) IResponseBuilder
func (*SResponse) WithCode ¶
func (p *SResponse) WithCode(pCode int) IResponseBuilder
type SResponseBlock ¶
type SResponseError ¶
type SResponseError struct {
// contains filtered or unexported fields
}
func (*SResponseError) Error ¶
func (err *SResponseError) Error() string
Click to show internal directories.
Click to hide internal directories.