Versions in this module Expand all Collapse all v61 v61.0.0 Mar 8, 2022 Changes in this version + const CircuitBreakerDefaultClosedWindow + const CircuitBreakerDefaultFailureRateThreshold + const CircuitBreakerDefaultResetTimeout + const CircuitBreakerDefaultVolumeThreshold + const DefaultCircuitBreakerHistoryCount + const DefaultCircuitBreakerName + const DefaultCircuitBreakerServiceName + const DefaultHostURLTemplate + const EndpointTemplateForRegionWithDot + const OciGoSdkEcConfigEnvVarName + const UnlimitedNumAttemptsValue + const UsingExpectHeaderEnvVar + var DeadlineExceededByBackoff error = deadlineExceededByBackoffError + var EcContext = newEcContext() + func Bool(value bool) *bool + func CloseBodyIfValid(httpResponse *http.Response) + func CloseLogFile() error + func ConfigCircuitBreakerFromEnvVar(baseClient *BaseClient) + func ConfigCircuitBreakerFromGlobalVar(baseClient *BaseClient) + func Debug(v ...interface{}) + func Debugf(format string, v ...interface{}) + func Debugln(v ...interface{}) + func DefaultBodyHeaders() []string + func DefaultGenericHeaders() []string + func DefaultShouldRetryOperation(r OCIOperationResponse) bool + func EnableInstanceMetadataServiceLookup() + func EventuallyConsistentShouldRetryOperation(r OCIOperationResponse) bool + func Float32(value float32) *float32 + func Float64(value float64) *float64 + func GetBackoffWithoutJitter(policy RetryPolicy, attempt uint) time.Duration + func GetBodyHash(request *http.Request) (hashString string, err error) + func GetEventuallyConsistentBackoffWithoutJitter(policy RetryPolicy, attempt uint, backoffScalingFactor float64) time.Duration + func GetMaximumCumulativeBackoffWithoutJitter(policy RetryPolicy) time.Duration + func GetMaximumCumulativeEventuallyConsistentBackoffWithoutJitter(policy RetryPolicy) time.Duration + func HTTPRequestMarshaller(requestStruct interface{}, httpRequest *http.Request) (err error) + func IfDebug(fn func()) + func IfInfo(fn func()) + func InitializeEcContextFile(timestampFileName string) + func InitializeEcContextFromEnvVar() + func InitializeEcContextInProcess() + func Int(value int) *int + func Int64(value int64) *int64 + func IsCircuitBreakerError(err error) bool + func IsConfigurationProviderValid(conf ConfigurationProvider) (ok bool, err error) + func IsEnvVarFalse(envVarKey string) bool + func IsEnvVarTrue(envVarKey string) bool + func IsErrorAffectedByEventualConsistency(Error error) bool + func IsErrorRetryableByDefault(Error error) bool + func IsNetworkError(err error) bool + func Logf(format string, v ...interface{}) + func Logln(v ...interface{}) + func MakeDefaultHTTPRequest(method, path string) (httpRequest http.Request) + func MakeDefaultHTTPRequestWithTaggedStruct(method, path string, requestStruct interface{}) (httpRequest http.Request, err error) + func MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path string, requestStruct interface{}, extraHeaders map[string]string) (httpRequest http.Request, err error) + func NewGoCircuitBreaker(st gobreaker.Settings) *gobreaker.CircuitBreaker + func PointerString(datastruct interface{}) (representation string) + func PrivateKeyFromBytes(pemData []byte, password *string) (key *rsa.PrivateKey, e error) + func PrivateKeyFromBytesWithPassword(pemData, password []byte) (key *rsa.PrivateKey, e error) + func RetryToken() string + func String(value string) *string + func Uint(value uint) *uint + func UnmarshalResponse(httpResponse *http.Response, responseStruct interface{}) (err error) + func UnmarshalResponseWithPolymorphicBody(httpResponse *http.Response, responseStruct interface{}, ...) (err error) + func UpdateRequestBinaryBody(httpRequest *http.Request, rsc *OCIReadSeekCloser) + func Version() string + type AuthConfig struct + AuthType AuthenticationType + IsFromConfigFile bool + OboToken *string + type AuthenticationType string + const InstancePrincipal + const InstancePrincipalDelegationToken + const UnknownAuthenticationType + const UserPrincipal + type BaseClient struct + BasePath string + Configuration CustomClientConfiguration + HTTPClient HTTPRequestDispatcher + Host string + Interceptor RequestInterceptor + Signer HTTPRequestSigner + UserAgent string + func DefaultBaseClientWithSigner(signer HTTPRequestSigner) BaseClient + func NewClientWithConfig(configProvider ConfigurationProvider) (client BaseClient, err error) + func NewClientWithOboToken(configProvider ConfigurationProvider, oboToken string) (client BaseClient, err error) + func (client *BaseClient) Endpoint() string + func (client *BaseClient) RetryPolicy() *RetryPolicy + func (client *BaseClient) SetCustomClientConfiguration(config CustomClientConfiguration) + func (client BaseClient) Call(ctx context.Context, request *http.Request) (response *http.Response, err error) + func (client BaseClient) CallWithDetails(ctx context.Context, request *http.Request, details ClientCallDetails) (response *http.Response, err error) + func (client BaseClient) IsRefreshableAuthType() bool + func (client BaseClient) RefreshableTokenWrappedCallWithDetails(ctx context.Context, request *http.Request, details ClientCallDetails) (response *http.Response, err error) + type CircuitBreakerOption func(cbst *CircuitBreakerSetting) + func WithCloseStateWindow(window time.Duration) CircuitBreakerOption + func WithFailureRateThreshold(threshold float64) CircuitBreakerOption + func WithHistoryCount(count int) CircuitBreakerOption + func WithIsEnabled(isEnabled bool) CircuitBreakerOption + func WithMinimumRequests(num uint32) CircuitBreakerOption + func WithName(name string) CircuitBreakerOption + func WithOpenStateWindow(window time.Duration) CircuitBreakerOption + func WithServiceName(serviceName string) CircuitBreakerOption + func WithSuccessStatCodeMap(successStatCodeMap map[int]bool) CircuitBreakerOption + func WithSuccessStatErrCodeMap(successStatErrCodeMap map[StatErrCode]bool) CircuitBreakerOption + type CircuitBreakerSetting struct + var GlobalCircuitBreakerSetting *CircuitBreakerSetting = nil + func DefaultCircuitBreakerSetting() *CircuitBreakerSetting + func DefaultCircuitBreakerSettingWithServiceName() *CircuitBreakerSetting + func NewCircuitBreakerSettingWithOptions(opts ...CircuitBreakerOption) *CircuitBreakerSetting + func NoCircuitBreakerSetting() *CircuitBreakerSetting + func (cbst CircuitBreakerSetting) String() string + type ClientCallDetails struct + Signer HTTPRequestSigner + type ConfigurationProvider interface + AuthType func() (AuthConfig, error) + KeyFingerprint func() (string, error) + Region func() (string, error) + TenancyOCID func() (string, error) + UserOCID func() (string, error) + func ComposingConfigurationProvider(providers []ConfigurationProvider) (ConfigurationProvider, error) + func ConfigurationProviderEnvironmentVariables(environmentVariablePrefix, privateKeyPassword string) ConfigurationProvider + func ConfigurationProviderFromFile(configFilePath, privateKeyPassword string) (ConfigurationProvider, error) + func ConfigurationProviderFromFileWithProfile(configFilePath, profile, privateKeyPassword string) (ConfigurationProvider, error) + func CustomProfileConfigProvider(customConfigPath string, profile string) ConfigurationProvider + func DefaultConfigProvider() ConfigurationProvider + func NewRawConfigurationProvider(tenancy, user, region, fingerprint, privateKey string, ...) ConfigurationProvider + type CustomClientConfiguration struct + CircuitBreaker *OciCircuitBreaker + RetryPolicy *RetryPolicy + type EcMode int64 + const File + const InProcess + const Uninitialized + type EventuallyConsistentContext struct + func (e *EventuallyConsistentContext) GetEndOfWindow() *time.Time + func (e *EventuallyConsistentContext) UpdateEndOfWindow(windowSize time.Duration) *time.Time + type HTTPRequestDispatcher interface + Do func(req *http.Request) (*http.Response, error) + type HTTPRequestSigner interface + Sign func(r *http.Request) error + func DefaultRequestSigner(provider KeyProvider) HTTPRequestSigner + func NewSignerFromOCIRequestSigner(oldSigner HTTPRequestSigner, predicate SignerBodyHashPredicate) (HTTPRequestSigner, error) + func RequestSigner(provider KeyProvider, genericHeaders, bodyHeaders []string) HTTPRequestSigner + func RequestSignerExcludeBody(provider KeyProvider) HTTPRequestSigner + func RequestSignerWithBodyHashingPredicate(provider KeyProvider, genericHeaders, bodyHeaders []string, ...) HTTPRequestSigner + type KeyProvider interface + KeyID func() (string, error) + PrivateRSAKey func() (*rsa.PrivateKey, error) + type NonSeekableRequestRetryFailure struct + func (ne NonSeekableRequestRetryFailure) Error() string + type OCIOperation func(context.Context, OCIRequest, *OCIReadSeekCloser, map[string]string) (OCIResponse, error) + type OCIOperationResponse struct + AttemptNumber uint + BackoffScalingFactor float64 + EndOfWindowTime *time.Time + Error error + InitialAttemptTime time.Time + Response OCIResponse + func NewOCIOperationResponse(response OCIResponse, err error, attempt uint) OCIOperationResponse + func NewOCIOperationResponseExtended(response OCIResponse, err error, attempt uint, endOfWindowTime *time.Time, ...) OCIOperationResponse + type OCIReadSeekCloser struct + func NewOCIReadSeekCloser(rc io.ReadCloser) *OCIReadSeekCloser + func (rsc *OCIReadSeekCloser) Close() error + func (rsc *OCIReadSeekCloser) Read(p []byte) (n int, err error) + func (rsc *OCIReadSeekCloser) Seek(offset int64, whence int) (int64, error) + func (rsc *OCIReadSeekCloser) Seekable() bool + type OCIRequest interface + HTTPRequest func(method, path string, binaryRequestBody *OCIReadSeekCloser, ...) (http.Request, error) + type OCIResponse interface + HTTPResponse func() *http.Response + func Retry(ctx context.Context, request OCIRetryableRequest, operation OCIOperation, ...) (OCIResponse, error) + type OCIRetryableRequest interface + BinaryRequestBody func() (*OCIReadSeekCloser, bool) + RetryPolicy func() *RetryPolicy + type OciCircuitBreaker struct + Cb *gobreaker.CircuitBreaker + Cbst *CircuitBreakerSetting + func NewCircuitBreaker(cbst *CircuitBreakerSetting) *OciCircuitBreaker + func NewOciCircuitBreaker(cbst *CircuitBreakerSetting, gbcb *gobreaker.CircuitBreaker) *OciCircuitBreaker + func (ocb *OciCircuitBreaker) AddToHistory(resp *http.Response, err ServiceError) + func (ocb *OciCircuitBreaker) GetHistory() string + type PolymorphicJSONUnmarshaler interface + UnmarshalPolymorphicJSON func(data []byte) (interface{}, error) + type RefreshableConfigurationProvider interface + Refreshable func() bool + type Region string + const RegionAFJohannesburg1 + const RegionAPChiyoda1 + const RegionAPChuncheon1 + const RegionAPDccCanberra1 + const RegionAPHyderabad1 + const RegionAPIbaraki1 + const RegionAPMelbourne1 + const RegionAPMumbai1 + const RegionAPOsaka1 + const RegionAPSeoul1 + const RegionAPSingapore1 + const RegionAPSydney1 + const RegionAPTokyo1 + const RegionCAMontreal1 + const RegionCAToronto1 + const RegionEUAmsterdam1 + const RegionEUMarseille1 + const RegionEUMilan1 + const RegionEUStockholm1 + const RegionEUZurich1 + const RegionFRA + const RegionIAD + const RegionILJerusalem1 + const RegionLHR + const RegionMEAbudhabi1 + const RegionMEDccMuscat1 + const RegionMEDubai1 + const RegionMEJeddah1 + const RegionPHX + const RegionSASantiago1 + const RegionSASaopaulo1 + const RegionSAVinhedo1 + const RegionSJC1 + const RegionUKCardiff1 + const RegionUKGovCardiff1 + const RegionUKGovLondon1 + const RegionUSGovAshburn1 + const RegionUSGovChicago1 + const RegionUSGovPhoenix1 + const RegionUSLangley1 + const RegionUSLuke1 + func StringToRegion(stringRegion string) (r Region) + func (region Region) Endpoint(service string) string + func (region Region) EndpointForTemplate(service string, serviceEndpointTemplate string) string + func (region Region) EndpointForTemplateDottedRegion(service string, serviceEndpointTemplate string, endpointServiceName string) (string, error) + func (region Region) RealmID() (string, error) + type RequestInterceptor func(*http.Request) error + type RequestMetadata struct + RetryPolicy *RetryPolicy + type ResponseHistory struct + type RetryPolicy struct + DeterminePolicyToUse func(policy RetryPolicy) (RetryPolicy, *time.Time, float64) + ExponentialBackoffBase float64 + MaxSleepBetween float64 + MaximumCumulativeBackoffWithoutJitter float64 + MaximumNumberAttempts uint + MinSleepBetween float64 + NextDuration func(OCIOperationResponse) time.Duration + NonEventuallyConsistentPolicy *RetryPolicy + ShouldRetryOperation func(OCIOperationResponse) bool + var GlobalRetry *RetryPolicy = nil + func DefaultRetryPolicy() RetryPolicy + func DefaultRetryPolicyWithoutEventualConsistency() RetryPolicy + func EventuallyConsistentRetryPolicy(nonEventuallyConsistentPolicy RetryPolicy) RetryPolicy + func NewRetryPolicy(attempts uint, retryOperation func(OCIOperationResponse) bool, ...) RetryPolicy + func NewRetryPolicyWithEventualConsistencyUnlimitedAttempts(attempts uint, retryOperation func(OCIOperationResponse) bool, ...) (*RetryPolicy, error) + func NewRetryPolicyWithOptions(opts ...RetryPolicyOption) RetryPolicy + func NoRetryPolicy() RetryPolicy + func (rp RetryPolicy) GetMaximumCumulativeBackoffWithoutJitter() time.Duration + func (rp RetryPolicy) String() string + type RetryPolicyOption func(rp *RetryPolicy) + func ReplaceWithValuesFromRetryPolicy(other RetryPolicy) RetryPolicyOption + func WithConditionalOption(enabled bool, otherOption RetryPolicyOption) RetryPolicyOption + func WithEventualConsistency() RetryPolicyOption + func WithExponentialBackoff(newMaxSleepBetween time.Duration, newExponentialBackoffBase float64) RetryPolicyOption + func WithFixedBackoff(newSleepBetween time.Duration) RetryPolicyOption + func WithMaximumNumberAttempts(attempts uint) RetryPolicyOption + func WithNextDuration(nextDuration func(OCIOperationResponse) time.Duration) RetryPolicyOption + func WithShouldRetryOperation(retryOperation func(OCIOperationResponse) bool) RetryPolicyOption + func WithUnlimitedAttempts(maximumCumulativeBackoffWithoutJitter time.Duration) RetryPolicyOption + type SDKDate struct + Date time.Time + func NewSDKDateFromString(dateString string) (*SDKDate, error) + func (t *SDKDate) MarshalJSON() (buff []byte, e error) + func (t *SDKDate) String() string + func (t *SDKDate) UnmarshalJSON(data []byte) (e error) + type SDKTime struct + func (t *SDKTime) MarshalJSON() (buff []byte, e error) + func (t *SDKTime) UnmarshalJSON(data []byte) (e error) + type ServiceError interface + GetCode func() string + GetHTTPStatusCode func() int + GetMessage func() string + GetOpcRequestID func() string + func IsServiceError(err error) (failure ServiceError, ok bool) + type SignerBodyHashPredicate func(r *http.Request) bool + type StatErrCode struct Other modules containing this package github.com/oracle/oci-go-sdk github.com/oracle/oci-go-sdk/v25 github.com/oracle/oci-go-sdk/v26 github.com/oracle/oci-go-sdk/v27 github.com/oracle/oci-go-sdk/v28 github.com/oracle/oci-go-sdk/v29 github.com/oracle/oci-go-sdk/v30 github.com/oracle/oci-go-sdk/v31 github.com/oracle/oci-go-sdk/v32 github.com/oracle/oci-go-sdk/v33 github.com/oracle/oci-go-sdk/v34 github.com/oracle/oci-go-sdk/v35 github.com/oracle/oci-go-sdk/v36 github.com/oracle/oci-go-sdk/v37 github.com/oracle/oci-go-sdk/v38 github.com/oracle/oci-go-sdk/v39 github.com/oracle/oci-go-sdk/v40 github.com/oracle/oci-go-sdk/v41 github.com/oracle/oci-go-sdk/v42 github.com/oracle/oci-go-sdk/v43 github.com/oracle/oci-go-sdk/v44 github.com/oracle/oci-go-sdk/v45 github.com/oracle/oci-go-sdk/v46 github.com/oracle/oci-go-sdk/v47 github.com/oracle/oci-go-sdk/v48 github.com/oracle/oci-go-sdk/v49 github.com/oracle/oci-go-sdk/v50 github.com/oracle/oci-go-sdk/v51 github.com/oracle/oci-go-sdk/v52 github.com/oracle/oci-go-sdk/v53 github.com/oracle/oci-go-sdk/v54 github.com/oracle/oci-go-sdk/v55 github.com/oracle/oci-go-sdk/v56 github.com/oracle/oci-go-sdk/v57 github.com/oracle/oci-go-sdk/v58 github.com/oracle/oci-go-sdk/v59 github.com/oracle/oci-go-sdk/v60 github.com/oracle/oci-go-sdk/v62 github.com/oracle/oci-go-sdk/v63 github.com/oracle/oci-go-sdk/v64 github.com/oracle/oci-go-sdk/v65