Documentation ¶
Index ¶
- func CopyBody(req *http.Request) ([]byte, error)
- func Decode(body io.ReadCloser, v interface{}) error
- func ExponentialBackoff(retry int)
- func IsClosedConnectionErr(err error) bool
- func NewClientAssertion(tokenUrl string, clientId string, clientCert string, signingKey string, ...) (string, error)
- func NewHTTPClient(proxyUrl string) (*http.Client, error)
- func NewRequest(ctx context.Context, verb string, endpoint *url.URL, body interface{}, ...) (*http.Request, error)
- func ParseAud(accessToken string) (string, error)
- func ParseBody(accessToken string) (map[string]interface{}, error)
- type RestClient
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
func Decode(body io.ReadCloser, v interface{}) error
func ExponentialBackoff ¶ added in v2.1.9
func ExponentialBackoff(retry int)
func IsClosedConnectionErr ¶ added in v2.1.9
func NewClientAssertion ¶
func NewRequest ¶
Types ¶
type RestClient ¶
type RestClient interface { Authenticate() error Delete(ctx context.Context, path string, body interface{}, params query.Params, headers map[string]string) (*http.Response, error) Get(ctx context.Context, path string, params query.Params, headers map[string]string) (*http.Response, error) Patch(ctx context.Context, path string, body interface{}, params query.Params, headers map[string]string) (*http.Response, error) Post(ctx context.Context, path string, body interface{}, params query.Params, headers map[string]string) (*http.Response, error) Put(ctx context.Context, path string, body interface{}, params query.Params, headers map[string]string) (*http.Response, error) Send(req *http.Request) (*http.Response, error) CloseIdleConnections() }
func NewRestClient ¶
func NewRestClient(apiUrl string, config config.Config) (RestClient, error)
Click to show internal directories.
Click to hide internal directories.