Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIError ¶
type APIError struct { StatusCode int `json:"-"` // contains filtered or unexported fields }
APIError is a lightweight wrapper around the standard error interface that preserves the status code from the RPC, if any.
func NewAPIError ¶
NewAPIError constructs a new API error.
type ClientOption ¶
type ClientOption func(*ClientOptions)
ClientOption adapts the behavior of the generated client.
type ClientOptions ¶
type ClientOptions struct { BaseURL string HTTPClient HTTPClient HTTPHeader http.Header Token string }
ClientOptions defines all of the possible client options. This type is primarily used by the generated code and is not meant to be used directly; use ClientOption instead.
func NewClientOptions ¶
func NewClientOptions() *ClientOptions
NewClientOptions returns a new *ClientOptions value. This function is primarily used by the generated code and is not meant to be used directly; use ClientOption instead.
func (*ClientOptions) ToHeader ¶
func (c *ClientOptions) ToHeader() http.Header
ToHeader maps the configured client options into a http.Header issued on every request.
type ErrorDecoder ¶
ErrorDecoder decodes *http.Response errors and returns a typed API error (e.g. *APIError).
type HTTPClient ¶
HTTPClient is an interface for a subset of the *http.Client.
type Optional ¶ added in v0.0.28
Optional is a wrapper used to distinguish zero values from null or omitted fields.
To instantiate an Optional, use the `Optional()` and `Null()` helpers exported from the root package.