Documentation ¶
Index ¶
- type BaseAPIClient
- func (bec *BaseAPIClient) Do(req *http.Request) (*http.Response, error)
- func (bec *BaseAPIClient) DoRequest(httpMethod, path string, body interface{}) (*http.Response, error)
- func (bec *BaseAPIClient) DoRequestGetBody(httpMethod, path string, body interface{}) ([]byte, error)
- func (bec *BaseAPIClient) Login() error
- type OAuthTokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseAPIClient ¶
type BaseAPIClient struct {
// contains filtered or unexported fields
}
func NewBaseAPIClient ¶
func (*BaseAPIClient) DoRequest ¶
func (bec *BaseAPIClient) DoRequest(httpMethod, path string, body interface{}) (*http.Response, error)
DoRequest makes HTTP request with some pre- and post- processing body will be encoded to json if not nil response will be checked on status code > 2xx. If so error will be returned with func Temporary() bool interface in mind So that caller can assert mentioned interface to make decision to retry later
func (*BaseAPIClient) DoRequestGetBody ¶
func (bec *BaseAPIClient) DoRequestGetBody(httpMethod, path string, body interface{}) ([]byte, error)
func (*BaseAPIClient) Login ¶
func (bec *BaseAPIClient) Login() error
type OAuthTokenResponse ¶
type OAuthTokenResponse struct {
IDToken string `json:"id_token"`
}
Click to show internal directories.
Click to hide internal directories.