Options - Go SDK
Options - Go SDK
Options - Go SDK
The Go SDK and docs are currently in beta. Report issues on GitHub.
Global options are passed when initializing the SDK client and apply to all operations.
WithServerURL allows providing an alternative server URL.
WithTemplatedServerURL allows providing an alternative server URL with templated parameters.
WithServer allows the overriding of the default server by name.
WithClient allows the overriding of the default HTTP client used by the SDK.
WithSecurity configures the SDK to use the provided security details.
WithSecuritySource configures the SDK to invoke the provided function on each method call to determine authentication.
WithHTTPReferer allows setting the HTTPReferer parameter for all supported operations.
WithXTitle allows setting the XTitle parameter for all supported operations.
WithRetryConfig allows setting the default retry configuration used by the SDK for all supported operations.
WithTimeout sets the default request timeout for all operations.
Per-method options are passed as the last argument to individual methods and override any global settings for that request.
WithServerURL allows providing an alternative server URL for a single request.
WithTemplatedServerURL allows providing an alternative server URL with templated parameters for a single request.
WithRetries allows customizing the default retry configuration for a single request.
WithOperationTimeout allows setting the request timeout for a single request.
WithSetHeaders allows setting custom headers on a per-request basis. If the request already contains headers matching the provided keys, they will be overwritten.
WithURLOverride allows overriding the default URL for an operation.
WithAcceptHeaderOverride allows overriding the Accept header for operations that support multiple response content types.