package
0.0.75
Repository: https://github.com/fern-api/generator-cli-go.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.
NewDate returns a new *Date.
NewDateTime returns a new *DateTime.
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.

# Structs

APIError is a lightweight wrapper around the standard error interface that preserves the status code from the RPC, if any.
BaseURLOption 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.
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.
MaxAttemptsOption 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.
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.
RetryFunc is a retriable HTTP function call (i.e.
RetryOption adapts the behavior the *Retrier.