package
4.13.1
Repository: https://github.com/contiamo/go-base.git
Documentation: pkg.go.dev

# Functions

GetStatusCode returns the api error code, if it exists.
IsRetryable is the default test to check if the client should retry a request.
NewBaseAPIClient creates a new instance of the base API client implementation.
TokenProviderFromClaims creates a TokenProvider that simply returns the original source token that the claims was created from.
TokenProviderFromCreator creates a token provider out of token creator.

# Variables

NoopTokenProvider is a token provider that returns an empty string which is ignored by `DoRequest`.

# Structs

APIError describes an error during unsuccessful HTTP request to an API.

# Interfaces

BaseAPIClient describes all basic HTTP client operations required to work with a JSON API.

# Type aliases

TokenProvider is a function that gets the token string for each request.