Versions in this module Expand all Collapse all v3 v3.0.12 Jan 18, 2025 Changes in this version + const JSessionIDTimeout + const MaxNumOfRetries + const RetryWaitMaxSeconds + const RetryWaitMinSeconds + const VERSION + const ZWA_API_KEY_ID + const ZWA_API_SECRET + var ContextAccessToken = contextKey("access_token") + type ApiErr struct + Code string + Message string + type AuthRequest struct + APIKeyID string + APIKeySecret string + Timestamp int64 + type AuthToken struct + AccessToken string + ExpiresIn int + TokenType string + func Authenticate(ctx context.Context, cfg *Configuration, logger logger.Logger) (*AuthToken, error) + type BackoffConfig struct + Enabled bool + MaxNumOfRetries int + RetryWaitMaxSeconds int + RetryWaitMinSeconds int + type Client struct + Config *Configuration + func NewClient(config *Configuration) (*Client, error) + func (client *Client) NewRequestDo(ctx context.Context, method, urlStr string, options, body, v interface{}) (*http.Response, error) + type ConfigSetter func(*Configuration) + func WithDebug(debug bool) ConfigSetter + func WithHttpClientPtr(httpClient *http.Client) ConfigSetter + func WithProxyHost(host string) ConfigSetter + func WithProxyPassword(pass string) ConfigSetter + func WithProxyPort(i int32) ConfigSetter + func WithProxyUsername(username string) ConfigSetter + func WithRateLimitMaxRetries(maxRetries int32) ConfigSetter + func WithRateLimitMaxWait(maxWait time.Duration) ConfigSetter + func WithRateLimitMinWait(minWait time.Duration) ConfigSetter + func WithRequestTimeout(requestTimeout time.Duration) ConfigSetter + func WithTestingDisableHttpsCheck(httpsCheck bool) ConfigSetter + func WithUserAgentExtra(userAgent string) ConfigSetter + func WithZWAAPIKeyID(keyID string) ConfigSetter + func WithZWAAPISecret(apiSecret string) ConfigSetter + func WithZWACloud(cloud string) ConfigSetter + type Configuration struct + BaseURL *url.URL + Context context.Context + Debug bool + DefaultHeader map[string]string + HTTPClient *http.Client + Logger logger.Logger + UserAgent string + UserAgentExtra string + ZWA struct{ ... } + func NewConfiguration(conf ...ConfigSetter) (*Configuration, error) + func (c *Configuration) AddDefaultHeader(key string, value string) + func (cfg *Configuration) SetBackoffConfig(backoffConf *BackoffConfig)