Documentation ¶
Index ¶
- Constants
- type Auth
- type Client
- func (c *Client) Authenticate() error
- func (c *Client) Do(req *http.Request, skipLoggingPayload bool) (*gabs.Container, *http.Response, error)
- func (c *Client) DoRestRequest(ctx context.Context, diags *diag.Diagnostics, path, method string, ...) *gabs.Container
- func (client *Client) InjectAuthenticationHeader(req *http.Request, path string) (*http.Request, error)
- func (c *Client) MakeRestRequest(method string, path string, body *gabs.Container, authenticated bool, ...) (*http.Request, error)
Constants ¶
View Source
const DefaultBackoffDelayFactor float64 = 3
View Source
const DefaultBackoffMaxDelay int = 60
View Source
const DefaultBackoffMinDelay int = 4
View Source
const DefaultReqTimeoutVal int = 100
Default timeout for NGINX in ND is 90 Seconds. Allow the client to set a shorter or longer time depending on their environment
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
func (*Auth) CalculateExpiry ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the main entry point
func GetClient ¶
func GetClient(clientUrl, username, password, proxyUrl, proxyCreds, loginDomain string, isInsecure bool, maxRetries int64) *Client
GetClient returns a singleton
func (*Client) Authenticate ¶
func (*Client) DoRestRequest ¶
func (c *Client) DoRestRequest(ctx context.Context, diags *diag.Diagnostics, path, method string, payload *gabs.Container) *gabs.Container
func (c *Client) DoRestRequest(ctx context.Context, diags *diag.Diagnostics, client *Client, path, method string, payload *gabs.Container) *gabs.Container {
func (*Client) InjectAuthenticationHeader ¶
Click to show internal directories.
Click to hide internal directories.