package
0.4.2
Repository: https://github.com/basis-theory/go-sdk.git
Documentation: pkg.go.dev

# Functions

EncodeURL encodes the given arguments into the URL, escaping values as needed.
ExtractExtraProperties extracts any extra properties from the given value.
MarshalJSONWithExtraProperties marshals the given value to JSON, including any extra properties.
MarshalJSONWithExtraProperty marshals the given value to JSON, including the extra property.
MergeHeaders merges the given headers together, where the right takes precedence over the left.
NewAPIError constructs a new API error.
NewCaller returns a new *Caller backed by the given parameters.
NewCursorPager constructs a new Pager that fetches pages from a paginated endpoint.
NewDate returns a new *Date.
NewDateTime returns a new *DateTime.
NewIdempotentRequestOptions returns a new *IdempotentRequestOptions value.
NewOffsetPager constructs a new Pager that fetches pages from an offset paginated endpoint.
NewOptionalDate returns a new *Date.
NewOptionalDateTime returns a new *DateTime.
NewRequestOptions returns a new *RequestOptions value.
NewRetrier constructs a new *Retrier with the given options, if any.
QueryValues encodes url.Values from request objects.
StringifyJSON returns a pretty JSON string representation of the given value.
WithMaxAttempts configures the maximum number of attempts of the *Retrier.
WriteMultipartJSON writes the given value as a JSON part.

# Constants

The available set of pagination modes.
The available set of pagination modes.

# Variables

ErrNoPages is a sentinel error used to signal that no pages remain.

# Structs

APIError is a lightweight wrapper around the standard error interface that preserves the status code from the RPC, if any.
APIKeyOption implements the RequestOption interface.
BaseURLOption implements the RequestOption interface.
BodyPropertiesOption implements the RequestOption interface.
Caller calls APIs and deserializes their response, if any.
CallerParams represents the parameters used to constrcut a new *Caller.
CallParams represents the parameters used to issue an API call.
CorrelationIDOption implements the RequestOption interface.
DateTime wraps time.Time and adapts its JSON representation to conform to a RFC3339 date (e.g.
DateTime wraps time.Time and adapts its JSON representation to conform to a RFC3339 date-time (e.g.
HTTPClientOption implements the RequestOption interface.
HTTPHeaderOption implements the RequestOption interface.
IdempotencyKeyOption implements the RequestOption interface.
IdempotentRequestOptions defines all of the possible idempotent request options.
MaxAttemptsOption implements the RequestOption interface.
Page represents a single page of results.
PageIterator is an auto-iterator for paginated endpoints.
Pager is the primary abstraction used to call paginated APIs.
PageRequest represents the information required to identify a single page.
PageResponse represents the information associated with a single page.
QueryParametersOption implements the RequestOption interface.
RequestOptions defines all of the possible request options.
Retrier retries failed requests a configurable number of times with an exponential back-off between each retry.

# Interfaces

HTTPClient is an interface for a subset of the *http.Client.
IdempotentRequestOption adapts the behavior of an individual request.
QueryEncoder is an interface implemented by any type that wishes to encode itself into URL values in a non-standard way.
RequestOption adapts the behavior of the client or an individual request.

# Type aliases

ErrorDecoder decodes *http.Response errors and returns a typed API error (e.g.
PageRequestFunc prepares the *CallParams from the given page request.
PageResponseFunc extracts the next page information from the response.
PagerMode represents the different types of pagination modes.
RetryFunc is a retriable HTTP function call (i.e.
RetryOption adapts the behavior the *Retrier.