Documentation ¶
Index ¶
- type Client
- func (c *Client) Do(req *retryablehttp.Request, v interface{}) (*contracts.Response, error)
- func (c *Client) NewRequest(method, endpoint string, opts interface{}) (*retryablehttp.Request, error)
- func (c *Client) ParseUrl(method, endpoint string, opts interface{}) (string, error)
- func (c *Client) RetryHTTPCheck(ctx context.Context, resp *http.Response, err error) (bool, error)
- func (c *Client) SetAdditionalHeaders(request *retryablehttp.Request, headers http.Header)
- func (c *Client) SetBasicAuth(request *retryablehttp.Request) error
- type ClientOptions
- type ClientProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Password string Username string RequiresAuth bool BaseURL *url.URL // contains filtered or unexported fields }
Client act's as the entry object for sdk
func NewRestBasicAuthClient ¶
func NewRestBasicAuthClient(opts ClientOptions) (*Client, error)
func NewRestClient ¶
func NewRestClient(options ClientOptions) (*Client, error)
NewClient creates a new http client instance in case the provided one is nil
func (*Client) NewRequest ¶
func (c *Client) NewRequest(method, endpoint string, opts interface{}) (*retryablehttp.Request, error)
func (*Client) RetryHTTPCheck ¶
func (*Client) SetAdditionalHeaders ¶
func (c *Client) SetAdditionalHeaders(request *retryablehttp.Request, headers http.Header)
func (*Client) SetBasicAuth ¶
func (c *Client) SetBasicAuth(request *retryablehttp.Request) error
type ClientOptions ¶
type ClientProxy ¶
type ClientProxy interface {
Do(req *retryablehttp.Request) (*http.Response, error)
}
Click to show internal directories.
Click to hide internal directories.