Versions in this module Expand all Collapse all v0 v0.0.14 Apr 21, 2025 Changes in this version + func EncodeURL(urlFormat string, args ...interface{}) string + func ExtractExtraProperties(bytes []byte, value interface{}, exclude ...string) (map[string]interface{}, error) + func MarshalJSONWithExtraProperties(marshaler interface{}, extraProperties map[string]interface{}) ([]byte, error) + func MarshalJSONWithExtraProperty(marshaler interface{}, key string, value interface{}) ([]byte, error) + func MergeHeaders(left, right http.Header) http.Header + func QueryValues(v interface{}) (url.Values, error) + func ResolveBaseURL(values ...string) string + func StringifyJSON(value interface{}) (string, error) + type CallParams struct + BodyProperties map[string]interface{} + Client core.HTTPClient + ErrorDecoder ErrorDecoder + Headers http.Header + MaxAttempts uint + Method string + QueryParameters url.Values + Request interface{} + Response interface{} + ResponseIsOptional bool + URL string + type Caller struct + func NewCaller(params *CallerParams) *Caller + func (c *Caller) Call(ctx context.Context, params *CallParams) error + type CallerParams struct + Client core.HTTPClient + MaxAttempts uint + type Date struct + func NewDate(t time.Time) *Date + func NewOptionalDate(t *time.Time) *Date + func (d *Date) MarshalJSON() ([]byte, error) + func (d *Date) Time() time.Time + func (d *Date) TimePtr() *time.Time + func (d *Date) UnmarshalJSON(data []byte) error + type DateTime struct + func NewDateTime(t time.Time) *DateTime + func NewOptionalDateTime(t *time.Time) *DateTime + func (d *DateTime) MarshalJSON() ([]byte, error) + func (d *DateTime) Time() time.Time + func (d *DateTime) TimePtr() *time.Time + func (d *DateTime) UnmarshalJSON(data []byte) error + type ErrorCodes map[int]func(*core.APIError) error + type ErrorDecoder func(statusCode int, body io.Reader) error + func NewErrorDecoder(errorCodes ErrorCodes) ErrorDecoder + type HTTPClient interface + Do func(*http.Request) (*http.Response, error) + type QueryEncoder interface + EncodeQueryValues func(key string, v *url.Values) error + type Retrier struct + func NewRetrier(opts ...RetryOption) *Retrier + func (r *Retrier) Run(fn RetryFunc, request *http.Request, errorDecoder ErrorDecoder, ...) (*http.Response, error) + type RetryFunc func(*http.Request) (*http.Response, error) + type RetryOption func(*retryOptions) + func WithMaxAttempts(attempts uint) RetryOption