Documentation
¶
Index ¶
- type ClientOption
- func WithAPIKey(apiKey string) ClientOption
- func WithCSPUrl(cspURL string) ClientOption
- func WithClientName(clientName string) ClientOption
- func WithDebug(debug bool) ClientOption
- func WithDefaultTags(defaultTags map[string]string) ClientOption
- func WithHTTPClient(httpClient *http.Client) ClientOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientOption ¶
type ClientOption func(configuration *internal.Configuration)
ClientOption is a function that applies configuration options to the API Client.
func WithAPIKey ¶
func WithAPIKey(apiKey string) ClientOption
WithAPIKey returns a ClientOption that sets the APIKey for accessing the BloxOne API. Can also be configured by using the `BLOXONE_API_KEY` environment variable.
You can configure an API key for your user account in the BloxOne Cloud Services Portal. Please refer to the following link for more information: https://docs.infoblox.com/space/BloxOneCloud/35430405/Configuring+User+API+Keys
Required.
func WithCSPUrl ¶
func WithCSPUrl(cspURL string) ClientOption
WithCSPUrl returns a ClientOption that sets the URL for BloxOne Cloud Services Portal. Can also be configured using the `BLOXONE_CSP_URL` environment variable. Optional. Default is https://csp.infoblox.com
func WithClientName ¶
func WithClientName(clientName string) ClientOption
WithClientName returns a ClientOption that sets the name of the client using the SDK. This can be used to identify the client in the audit logs. Optional. If not provided, the client name will be set to "bloxone-go-client".
func WithDebug ¶
func WithDebug(debug bool) ClientOption
WithDebug returns a ClientOption that sets the debug mode. Enabling the debug flag will write the request and response to the log.
func WithDefaultTags ¶
func WithDefaultTags(defaultTags map[string]string) ClientOption
WithDefaultTags returns a ClientOption that sets the tags the client can set by default for objects that has tags support. Optional.
func WithHTTPClient ¶
func WithHTTPClient(httpClient *http.Client) ClientOption
WithHTTPClient returns a ClientOption that sets the HTTPClient to use for the SDK. Optional. The default HTTPClient will be used if not provided.