Versions in this module Expand all Collapse all v1 v1.0.21 Mar 14, 2020 Changes in this version + const CE_ApiNotFoundCode + const CE_ApiNotFoundMessage + const CE_ErrUnexpectedTypeCode + const CE_ErrUnexpectedTypeMessage + const CE_InvalidInputCode + const CE_InvalidInputMessage + const CE_MissingInputCode + const CE_MissingInputMessage + const CE_MultipleResourcesFoundCode + const CE_MultipleResourcesFoundMessage + const CE_NoClientProvidedCode + const CE_NoClientProvidedMessage + const CE_NoEndPointInCatalogCode + const CE_NoEndPointInCatalogMessage + const CE_OptionTypeNotStructCode + const CE_OptionTypeNotStructMessage + const CE_ReauthExceedCode + const CE_ReauthExceedMessage + const CE_ReauthFuncErrorCode + const CE_ReauthFuncErrorMessage + const CE_ResourceNotFoundCode + const CE_ResourceNotFoundMessage + const CE_StreamControlApiCode + const CE_StreamControlApiMessage + const CE_TimeoutErrorCode + const CE_TimeoutErrorMessage + const DefaultUserAgent + const ELB1071QuotaExceeded + const ELB2001AdminStateUpFalse + const ELB2002IpNotValid + const ELB2003PoolNotFound + const ELB2004MemberNotSupportPort + const ELB2005SubnetMismatch + const ELB2006IpPortAlreadyPresent + const ELB2007MemberNotFound + const ELB2541QuotaExceeded + const ELB6101QuotaExceeded + const ELBb015QuotaExceeded + const EcsAZUnavailable + const EcsAuthRequired + const EcsBlockDevInvalid + const EcsBlockImageNotFound + const EcsErrorRoleToPerform + const EcsFlavorMemoryNotEnough + const EcsFlavorNotFound + const EcsImageNotFound + const EcsInstCantBeOperated + const EcsInstanceDiskExceed + const EcsInstanceGroupNotFound + const EcsInstanceIsLocked + const EcsInstanceNotFound + const EcsInvalidFlavorRef + const EcsInvalidInputField + const EcsInvalidKeyName + const EcsInvalidMetadata + const EcsKeyPairNotFound + const EcsNetworkNotFound + const EcsPoilcyNotAllow + const EcsPortNumberExceed + const EcsQuotaExceeded + const EcsResourceSoldOut + const EcsSecurityGroupNotFound + const EcsServerCantComply + const EcsTokenRoleEmpty + const EcsTokenRoleForbidden + const EcsUnexpectedApiERROR + const EcsUserDataBase64 + const EcsUserDataTooLarge + const EcsVolumeNumberOver + const Ims0027NoImageFoundWithId + const Ims0144FailedFindImage + const RFC3339Milli + const RFC3339MilliNoZ + const RFC3339NoZ + var EnableDebug bool + func BuildHeaders(opts interface{}) (map[string]string, error) + func BuildQueryString(opts interface{}) (*url.URL, error) + func BuildRequestBody(opts interface{}, parent string) (map[string]interface{}, error) + func ExtractNextURL(links []Link) (string, error) + func IDSliceToQueryString(name string, ids []int) string + func InitStructWithDefaultTag(bean interface{}) + func IntToPointer(i int) *int + func IntWithinRange(val, min, max int) bool + func IsInStrSlice(sliceStr []string, s string) bool + func MatchErrorCode(httpStatus int, message string) string + func MaybeInt(original int) *int + func MaybeString(original string) *string + func NewSystemCommonError(code, message string) error + func NewSystemServerError(httpStatus int, responseContent string) error + func NormalizePathURL(basePath, rawPath string) (string, error) + func NormalizeURL(url string) string + func ParseSeverError(httpStatus int, responseContent string) error + func WaitFor(timeout int, predicate func() (bool, error)) error + type Availability string + const AvailabilityAdmin + const AvailabilityInternal + const AvailabilityPublic + type Config struct + HttpTransport *http.Transport + Timeout time.Duration + func NewConfig() (config *Config) + func (c *Config) WithHttpTransport(httpTransport *http.Transport) *Config + func (c *Config) WithTimeout(timeout time.Duration) *Config + 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 (r HeaderResult) ExtractInto(to interface{}) error + type IPVersion int + const IPv4 + const IPv6 + type JSONRFC1123 time.Time + func (jt *JSONRFC1123) UnmarshalJSON(data []byte) error + type JSONRFC3339Milli time.Time + func (jt *JSONRFC3339Milli) UnmarshalJSON(data []byte) error + type JSONRFC3339MilliNoZ time.Time + func (jt *JSONRFC3339MilliNoZ) UnmarshalJSON(data []byte) error + type JSONRFC3339NoZ time.Time + func (jt *JSONRFC3339NoZ) UnmarshalJSON(data []byte) error + type JSONUnix time.Time + func (jt *JSONUnix) UnmarshalJSON(data []byte) error + type Link struct + Href string + Rel string + type Logger struct + DebugEnable bool + func GetLogger() *Logger + func (log *Logger) Debug(format string, v ...interface{}) + type OneLevelError struct + Code string + ErrCode string + ErrMsg string + Message string + Request_id string + type ProviderClient struct + AKSKOptions aksk.AKSKOptions + Conf *Config + DomainID string + EndpointLocator EndpointLocator + HTTPClient http.Client + IdentityBase string + IdentityEndpoint string + ProjectID string + ReauthFunc func() error + TokenID string + UserAgent UserAgent + func (client *ProviderClient) AuthenticatedHeaders() (m map[string]string) + func (client *ProviderClient) GetProjectID() string + func (client *ProviderClient) Reauthenticate(previousToken string) (err error) + func (client *ProviderClient) Request(method, url string, options *RequestOpts) (*http.Response, error) + func (client *ProviderClient) SetToken(t string) + func (client *ProviderClient) Token() string + func (client *ProviderClient) UseTokenLock() + type RequestOpts struct + ErrorContext error + HandleError func(httpStatus int, responseContent string) error + JSONBody interface{} + JSONResponse interface{} + MoreHeaders map[string]string + OkCodes []int + RawBody io.Reader + type Result struct + Body interface{} + Err error + Header http.Header + func (r Result) ExtractInto(to interface{}) error + func (r Result) ExtractIntoSlicePtr(to interface{}, label string) error + func (r Result) ExtractIntoStructPtr(to interface{}, label string) error + func (r Result) PrettyPrintJSON() string + type ServiceClient struct + Endpoint string + HandleError func(httpStatus int, responseContent string) error + Microversion string + MoreHeaders map[string]string + ResourceBase string + Type string + func (client *ServiceClient) Delete(url string, opts *RequestOpts) (*http.Response, error) + func (client *ServiceClient) Get(url string, JSONResponse interface{}, opts *RequestOpts) (*http.Response, error) + func (client *ServiceClient) Head(url string, opts *RequestOpts) (*http.Response, error) + func (client *ServiceClient) Patch(url string, JSONBody interface{}, JSONResponse interface{}, opts *RequestOpts) (*http.Response, error) + func (client *ServiceClient) Post(url string, JSONBody interface{}, JSONResponse interface{}, opts *RequestOpts) (*http.Response, error) + func (client *ServiceClient) Put(url string, JSONBody interface{}, JSONResponse interface{}, opts *RequestOpts) (*http.Response, error) + func (client *ServiceClient) Request(method, url string, options *RequestOpts) (*http.Response, error) + func (client *ServiceClient) ResourceBaseURL() string + func (client *ServiceClient) ServiceURL(parts ...string) string + func (client *ServiceClient) SetMicroversion(microversion string) + func (client *ServiceClient) UnsetMicroversion() + type UnifiedError struct + ErrCode interface{} + ErrMessage string + func (e UnifiedError) Error() string + func (e UnifiedError) ErrorCode() string + func (e UnifiedError) Message() string + type UserAgent struct + func (ua *UserAgent) Join() string + func (ua *UserAgent) Prepend(s ...string)