Versions in this module Expand all Collapse all v0 v0.9.0 Mar 19, 2016 Changes in this version + const DefaultUserAgent + const RFC3339Milli + const STACK_TIME_FMT + var ErrEndpointNotFound = errors.New("No suitable endpoint could be found in the service catalog.") + var ErrServiceNotFound = errors.New("No suitable service could be found in the service catalog.") + func BuildHeaders(opts interface{}) (map[string]string, error) + func BuildQueryString(opts interface{}) (*url.URL, error) + func DecodeHeader(from, to interface{}) error + func ExtractNextURL(links []Link) (string, error) + func IDSliceToQueryString(name string, ids []int) string + func IntToPointer(i int) *int + func IntWithinRange(val, min, max int) bool + func MaybeInt(original int) *int + func MaybeString(original string) *string + func NormalizePathURL(basePath, rawPath string) (string, error) + func NormalizeURL(url string) string + func WaitFor(timeout int, predicate func() (bool, error)) error + type AuthOptions struct + APIKey string + AllowReauth bool + DomainID string + DomainName string + IdentityEndpoint string + Password string + TenantID string + TenantName string + TokenID string + UserID string + Username string + type AuthResults interface + ExpiresAt func() (time.Time, error) + TokenID func() (string, error) + type Availability string + const AvailabilityAdmin + const AvailabilityInternal + const AvailabilityPublic + type EnabledState *bool + var Disabled EnabledState = &iFalse + var Enabled EnabledState = &iTrue + type EndpointLocator func(EndpointOpts) (string, error) + type EndpointOpts struct + Availability Availability + Name string + Region string + Type string + func (eo *EndpointOpts) ApplyDefaults(t string) + type ErrResult struct + func (r ErrResult) ExtractErr() error + type HeaderResult struct + func (hr HeaderResult) ExtractHeader() (http.Header, error) + type Link struct + Href string + Rel string + type ProviderClient struct + EndpointLocator EndpointLocator + HTTPClient http.Client + IdentityBase string + IdentityEndpoint string + ReauthFunc func() error + TokenID string + UserAgent UserAgent + func (client *ProviderClient) AuthenticatedHeaders() map[string]string + func (client *ProviderClient) Delete(url string, opts *RequestOpts) (*http.Response, error) + func (client *ProviderClient) Get(url string, JSONResponse *interface{}, opts *RequestOpts) (*http.Response, error) + func (client *ProviderClient) Post(url string, JSONBody interface{}, JSONResponse *interface{}, opts *RequestOpts) (*http.Response, error) + func (client *ProviderClient) Put(url string, JSONBody interface{}, JSONResponse *interface{}, opts *RequestOpts) (*http.Response, error) + func (client *ProviderClient) Request(method, url string, options RequestOpts) (*http.Response, error) + type RequestOpts struct + JSONBody interface{} + JSONResponse interface{} + MoreHeaders map[string]string + OkCodes []int + RawBody io.ReadSeeker + type Result struct + Body interface{} + Err error + Header http.Header + func (r Result) PrettyPrintJSON() string + type ServiceClient struct + Endpoint string + ResourceBase string + func (client *ServiceClient) ResourceBaseURL() string + func (client *ServiceClient) ServiceURL(parts ...string) string + type UnexpectedResponseCodeError struct + Actual int + Body []byte + Expected []int + Method string + URL string + func (err *UnexpectedResponseCodeError) Error() string + type UserAgent struct + func (ua *UserAgent) Join() string + func (ua *UserAgent) Prepend(s ...string)