Documentation ¶
Index ¶
- func IgnoreResponse() *map[string]interface{}
- func OnNetworkFailure(ctx context.Context, act Action, request, response interface{}, err error) error
- func OnRateLimitExceeded(ctx context.Context, act Action, request, response interface{}, err error) error
- type Action
- type Client
- type HttpClient
- type Interceptor
- type NeedRetry
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IgnoreResponse ¶
func IgnoreResponse() *map[string]interface{}
IgnoreResponse return anonymous map to ignore reponse
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type HttpClient ¶
http client interface, make it easy to mock
type Interceptor ¶
type Interceptor func(ctx context.Context, action Action, request, response interface{}, err error) error
Interceptor hooks after request, like a pipeline OnNetworkFailure and OnRateLimitExceeded are default interceptors
type Option ¶
type Option func(*Client)
Option Used to mutate client
func WithBasicDomain ¶ added in v0.3.0
WithBasicDomain customize basic basic domain name
func WithHttpClient ¶
func WithHttpClient(httpClient HttpClient) Option
func WithInterceptor ¶
func WithInterceptor(interceptor Interceptor) Option
Option to append interceptor
func WithRegion ¶
func WithSchema ¶ added in v0.4.3
func WithSecret ¶
WithSecret mutate client secret id and secret key
Source Files ¶
Click to show internal directories.
Click to hide internal directories.