Documentation ¶
Index ¶
Constants ¶
View Source
const ( ZPA_CLIENT_ID = "ZPA_CLIENT_ID" ZPA_CLIENT_SECRET = "ZPA_CLIENT_SECRET" ZPA_CUSTOMER_ID = "ZPA_CUSTOMER_ID" ZPA_CLOUD = "ZPA_CLOUD" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackoffConfig ¶
type Client ¶
type Client struct {
Config *Config
}
func (*Client) Authenticate ¶
type Config ¶
type Config struct { BaseURL *url.URL // The logger writer interface to write logging messages to. Defaults to standard out. Logger logger.Logger // Credentials for basic authentication. ClientID, ClientSecret, CustomerID, Cloud string // Backoff config BackoffConf *BackoffConfig AuthToken *AuthToken sync.Mutex UserAgent string // contains filtered or unexported fields }
Config contains all the configuration data for the API client
func NewConfig ¶
NewConfig returns a default configuration for the client. By default it will try to read the access and te secret from the environment variable.
Need to implement exponential back off to comply with the API rate limit. https://help.zscaler.com/zpa/about-rate-limiting 20 times in a 10 second interval for a GET call. 10 times in a 10 second interval for any POST/PUT/DELETE call. TODO Add healthCheck method to NewConfig
func (*Config) GetHTTPClient ¶
func (c *Config) GetHTTPClient() plainttp.HttpClient
func (*Config) SetBackoffConfig ¶
func (c *Config) SetBackoffConfig(backoffConf BackoffConfig)
type CredentialsConfig ¶
type ErrorResponse ¶
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
func (ErrorResponse) IsObjectNotFound ¶
func (r ErrorResponse) IsObjectNotFound() bool
IsObjectNotFound returns true on missing object error (404 & 400 with response "id": "resource.not.found",).
Click to show internal directories.
Click to hide internal directories.