Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient represents a client for interaction with a ONTAP REST API
func NewClient ¶
func NewClient(ctx context.Context, cxProfile HTTPProfile, tag string) HTTPClient
NewClient creates a new HTTP client
func (*HTTPClient) Do ¶
Do sends the API Request, parses the response as JSON, and returns the HTTP status code as int, the "result" value as byte possible errors:
no response body: failed to build HTTP request - statusCode forced to -1 failed to send HTTP request - statusCode forced to -1 unless it is present in the response failed to read HTTP response body - statusCode from response if present, otherwise -1 empty response body (check with POST/PATCH/DELETE if this is really a problem) - statusCode from response if present, otherwise -1
type HTTPProfile ¶
type HTTPProfile struct { APIRoot string Hostname string Username string Password string ValidateCerts bool }
HTTPProfile defines the connection attributes to build the base URL and authentication header
Click to show internal directories.
Click to hide internal directories.