Documentation ¶
Index ¶
- type Mock
- type Option
- func WithHeader(key, value string) Option
- func WithJaegerContext(jaegerContext *gin.Context) Option
- func WithLogger(l *zap.Logger) Option
- func WithMock(m Mock) Option
- func WithOnFailedRetry(retryTimes int, retryDelay time.Duration, retryVerify RetryVerify) Option
- func WithTTL(ttl time.Duration) Option
- type ResponseData
- func Delete(url string, form httpUrl.Values, options ...Option) (resp *ResponseData, err error)
- func Get(url string, form httpUrl.Values, options ...Option) (resp *ResponseData, err error)
- func PatchFrom(url string, form httpUrl.Values, options ...Option) (resp *ResponseData, err error)
- func PatchJSON(url string, raw json.RawMessage, options ...Option) (resp *ResponseData, err error)
- func PostForm(url string, form httpUrl.Values, options ...Option) (resp *ResponseData, err error)
- func PostJSON(url string, raw json.RawMessage, options ...Option) (resp *ResponseData, err error)
- func PutForm(url string, form httpUrl.Values, options ...Option) (resp *ResponseData, err error)
- func PutJSON(url string, raw json.RawMessage, options ...Option) (resp *ResponseData, err error)
- type RetryVerify
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*option)
func WithHeader ¶
func WithJaegerContext ¶
func WithLogger ¶
func WithOnFailedRetry ¶
func WithOnFailedRetry(retryTimes int, retryDelay time.Duration, retryVerify RetryVerify) Option
type ResponseData ¶
func PatchJSON ¶
func PatchJSON(url string, raw json.RawMessage, options ...Option) (resp *ResponseData, err error)
PatchJSON patch json 请求
func PostJSON ¶
func PostJSON(url string, raw json.RawMessage, options ...Option) (resp *ResponseData, err error)
PostJSON post json 请求
func PutJSON ¶
func PutJSON(url string, raw json.RawMessage, options ...Option) (resp *ResponseData, err error)
PutJSON put json 请求
type RetryVerify ¶
Click to show internal directories.
Click to hide internal directories.