Documentation ¶
Index ¶
- func Version() string
- func WasNotFoundError(e error) bool
- type Client
- func (c *Client) BuildMultipartFormRequest(method, path string, files map[string][]byte, ...) (*http.Request, error)
- func (c *Client) BuildNonJSONRequest(method, path string, body io.Reader) (*http.Request, error)
- func (c *Client) BuildRequestBody(method, path string, body []byte) (*http.Request, error)
- func (c *Client) DebugLogString(str string)
- func (c *Client) ExecuteRequest(req *http.Request) (*http.Response, error)
- func (c *Client) MarshallRequestBody(body interface{}) ([]byte, error)
- func (c *Client) WaitFor(description string, pollInterval, timeout time.Duration, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Version ¶ added in v0.6.2
func Version() string
Version returns the semantic version (see http://semver.org).
func WasNotFoundError ¶
WasNotFoundError Used to determine if the checked resource was found or not.
Types ¶
type Client ¶
type Client struct { IdentityDomain *string UserName *string Password *string APIEndpoint *url.URL MaxRetries *int UserAgent *string // contains filtered or unexported fields }
Client represents an authenticated compute client, with compute credentials and an api client.
func (*Client) BuildMultipartFormRequest ¶ added in v0.8.0
func (c *Client) BuildMultipartFormRequest(method, path string, files map[string][]byte, parameters map[string]interface{}) (*http.Request, error)
BuildMultipartFormRequest builds a new HTTP Request for a multipart form request from specifies attributes
func (*Client) BuildNonJSONRequest ¶ added in v0.3.0
BuildNonJSONRequest builds a new HTTP request that doesn't marshall the request body
func (*Client) BuildRequestBody ¶ added in v0.4.0
BuildRequestBody builds an HTTP Request that accepts a pre-marshaled body parameter as a raw byte array Returns the raw HTTP Request and any error occured
func (*Client) DebugLogString ¶
DebugLogString logs a string if debug logs are on
func (*Client) ExecuteRequest ¶
ExecuteRequest executes the http.Request from the BuildRequest method. It is split up to add additional authentication that is Oracle API dependent.
func (*Client) MarshallRequestBody ¶ added in v0.4.0
MarshallRequestBody marshalls the request body and returns the resulting byte slice This is split out of the BuildRequestBody method so as to allow the developer to print a debug string of the request body if they should so choose.