Documentation
¶
Index ¶
- Constants
- func WasNotFoundError(e error) bool
- type Client
- func (c *Client) BuildNonJSONRequest(method, path string, body io.ReadSeeker) (*http.Request, error)
- func (c *Client) BuildRequest(method, path string, body interface{}) (*http.Request, error)
- func (c *Client) BuildRequestBody(method, path string, body []byte) (*http.Request, error)
- func (c *Client) DebugLogReq(req *http.Request)
- 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, timeout time.Duration, test func() (bool, error)) error
Constants ¶
const DEFAULT_MAX_RETRIES = 1
Variables ¶
This section is empty.
Functions ¶
func 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 // contains filtered or unexported fields }
Client represents an authenticated compute client, with compute credentials and an api client.
func (*Client) BuildNonJSONRequest ¶ added in v0.3.0
func (c *Client) BuildNonJSONRequest(method, path string, body io.ReadSeeker) (*http.Request, error)
Build a new HTTP request that doesn't marshall the request body
func (*Client) BuildRequest ¶
This builds an http request. After calling this you need to add the authentication. Header/Cookie/etc Then call ExecuteRequest and pass in the return value of this method It is split up to add additional authentication that is Oracle API dependent. DEPRECATED
func (*Client) BuildRequestBody ¶ added in v0.4.0
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) DebugLogReq ¶
func (*Client) DebugLogString ¶
Log a string if debug logs are on
func (*Client) ExecuteRequest ¶
This method 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
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.