Documentation ¶
Index ¶
- func PraseJsonArrayCommonHandle(body BodyType) (dataMap []any, err error)
- type BodyHandle
- type BodyType
- type DataMapArrayHandle
- type DataMapHandle
- type DataMapType
- type FastClient
- func (f *FastClient) BodyHandle(callback func(BodyType) (BodyType, error)) error
- func (f *FastClient) DataMapArrayHandle(callback DataMapArrayHandle) ([]any, error)
- func (f *FastClient) DataMapHandle(callback DataMapHandle) ([]any, error)
- func (f *FastClient) GetBody() BodyType
- func (f *FastClient) GetJsonArrayDo(bodyHandle BodyHandle, dataMapArrayHandle DataMapArrayHandle) (result []any, err error)
- func (f *FastClient) GetJsonDo(bodyHandle BodyHandle, dataMapHandle DataMapHandle) (result []any, err error)
- func (f *FastClient) GetTimeout() time.Duration
- func (f *FastClient) GetUrl() string
- func (f *FastClient) PostJsonArrayDo(jsonBody string, bodyHandle BodyHandle, dataMapArrayHandle DataMapArrayHandle) (result []any, err error)
- func (f *FastClient) PostJsonDo(jsonBody string, bodyHandle BodyHandle, dataMapHandle DataMapHandle) (result []any, err error)
- func (f *FastClient) PraseJsonArrayHandle(callback func(BodyType) ([]any, error)) error
- func (f *FastClient) PraseJsonHandle(callback func(BodyType) (DataMapType, error)) error
- func (f *FastClient) RequestGet() error
- func (f *FastClient) RequestPostForm(formBody string) error
- func (f *FastClient) RequestPostJson(jsonBody string) error
- func (f *FastClient) SetBody(body BodyType)
- func (f *FastClient) SetCookie(key, value string)
- func (f *FastClient) SetHeadReq(key, value string)
- func (f *FastClient) SetHeadResp(key, value string)
- func (f *FastClient) SetTimeout(timeout time.Duration)
- func (f *FastClient) SetUrl(url string)
- func (f *FastClient) SetUserAgent(value string)
- type ResJson
- type ResJsonArray
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BodyHandle ¶
type DataMapArrayHandle ¶
type DataMapHandle ¶
type DataMapType ¶
type DataMapType = map[string]interface{}
func PraseJsonCommonHandle ¶
func PraseJsonCommonHandle(body BodyType) (dataMap DataMapType, err error)
type FastClient ¶
type FastClient struct {
// contains filtered or unexported fields
}
func NewFastClient ¶
func NewFastClient(url string) (f *FastClient)
func (*FastClient) BodyHandle ¶
func (f *FastClient) BodyHandle(callback func(BodyType) (BodyType, error)) error
func (*FastClient) DataMapArrayHandle ¶
func (f *FastClient) DataMapArrayHandle(callback DataMapArrayHandle) ([]any, error)
func (*FastClient) DataMapHandle ¶
func (f *FastClient) DataMapHandle(callback DataMapHandle) ([]any, error)
func (*FastClient) GetBody ¶
func (f *FastClient) GetBody() BodyType
func (*FastClient) GetJsonArrayDo ¶
func (f *FastClient) GetJsonArrayDo(bodyHandle BodyHandle, dataMapArrayHandle DataMapArrayHandle) (result []any, err error)
func (*FastClient) GetJsonDo ¶
func (f *FastClient) GetJsonDo(bodyHandle BodyHandle, dataMapHandle DataMapHandle) (result []any, err error)
func (*FastClient) GetTimeout ¶
func (f *FastClient) GetTimeout() time.Duration
func (*FastClient) GetUrl ¶
func (f *FastClient) GetUrl() string
func (*FastClient) PostJsonArrayDo ¶
func (f *FastClient) PostJsonArrayDo( jsonBody string, bodyHandle BodyHandle, dataMapArrayHandle DataMapArrayHandle) (result []any, err error)
func (*FastClient) PostJsonDo ¶
func (f *FastClient) PostJsonDo( jsonBody string, bodyHandle BodyHandle, dataMapHandle DataMapHandle) (result []any, err error)
func (*FastClient) PraseJsonArrayHandle ¶
func (f *FastClient) PraseJsonArrayHandle(callback func(BodyType) ([]any, error)) error
func (*FastClient) PraseJsonHandle ¶
func (f *FastClient) PraseJsonHandle(callback func(BodyType) (DataMapType, error)) error
func (*FastClient) RequestGet ¶
func (f *FastClient) RequestGet() error
func (*FastClient) RequestPostForm ¶
func (f *FastClient) RequestPostForm(formBody string) error
func (*FastClient) RequestPostJson ¶
func (f *FastClient) RequestPostJson(jsonBody string) error
func (*FastClient) SetBody ¶
func (f *FastClient) SetBody(body BodyType)
func (*FastClient) SetCookie ¶
func (f *FastClient) SetCookie(key, value string)
func (*FastClient) SetHeadReq ¶
func (f *FastClient) SetHeadReq(key, value string)
func (*FastClient) SetHeadResp ¶
func (f *FastClient) SetHeadResp(key, value string)
func (*FastClient) SetTimeout ¶
func (f *FastClient) SetTimeout(timeout time.Duration)
func (*FastClient) SetUrl ¶
func (f *FastClient) SetUrl(url string)
func (*FastClient) SetUserAgent ¶
func (f *FastClient) SetUserAgent(value string)
type ResJsonArray ¶
Click to show internal directories.
Click to hide internal directories.