Documentation ¶
Index ¶
- func SetGlobalHTTPClientFunc(fn HTTPClientFunc)
- func Version() string
- type Client
- func (c *Client) BuildRequestWithSign(req request.Request) (httpReq *http.Request, err error)
- func (c *Client) DoNotifyRequest(ctx context.Context, req *http.Request, n notify.Notify) (err error)
- func (c *Client) DoRequest(ctx context.Context, req request.Request, resp response.Response) (err error)
- func (c *Client) DoUploadFile(ctx context.Context, filePath string, req *request.FileRequest, ...) (err error)
- func (c *Client) GetSigner() sign.Signer
- func (c *Client) Println(s string)
- func (c *Client) SetLogger(level string, out io.Writer)
- type ClientOption
- type Config
- type HTTPClientFunc
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetGlobalHTTPClientFunc ¶
func SetGlobalHTTPClientFunc(fn HTTPClientFunc)
Types ¶
type Client ¶
type Client struct { *Logger // contains filtered or unexported fields }
func NewClient ¶
func NewClient(config Config, options ...ClientOption) *Client
func (*Client) BuildRequestWithSign ¶
func (*Client) DoNotifyRequest ¶
func (c *Client) DoNotifyRequest(ctx context.Context, req *http.Request, n notify.Notify) (err error)
DoNotifyRequest 异步回调验证 https://paas.huifu.com/partners/jiekouguifan#/ybxx/jiekouguifan_ybxx
func (*Client) DoUploadFile ¶
type ClientOption ¶
type ClientOption func(client *Client)
func WithHTTPClientFunc ¶
func WithHTTPClientFunc(fn HTTPClientFunc) ClientOption
WithHTTPClientFunc Client会优先使用WithHttpClientFunc(),如果没有设置再从SetGlobalHttpClientFunc()中获取
type Config ¶
type HTTPClientFunc ¶
HTTPClientFunc 用来自定义http.Client
Click to show internal directories.
Click to hide internal directories.