Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { User *string Fingerprint *string KeyFile *string PassPhrase *string Tenancy *string Region *string APIEndpoint *url.URL MaxRetries *int // An integer value representing the logging level. The default log level // is zero (LogOff), which represents no logging. To enable logging set // to a LogLevel Value. LogLevel *LogLevelType // The logger writer interface to write logging messages to. Defaults to // standard out. Logger Logger // The HTTP client to use when sending requests. Defaults to // `http.DefaultClient`. HTTPClient *http.Client }
A Config provides service configuration for service clients.
func FromConfigFile ¶
FromConfigFile retrieves the configuration from the BMC config
type Error ¶
Error is the BMC error defined as: https://docs.us-phoenix-1.oraclecloud.com/api/#/en/iaas/20160918/responses/Error
type LogLevelType ¶
type LogLevelType uint
A LogLevelType defines the level logging should be performed at. Used to instruct the SDK which statements should be logged.
const ( // LogOff states that no logging should be performed by the SDK. This is the // default state of the SDK, and should be use to disable all logging. LogOff LogLevelType = iota * 0x1000 // LogDebug state that debug output should be logged by the SDK. This should // be used to inspect request made and responses received. LogDebug )
const ( // LogDebugWithSigning states that the SDK should log request signing and // presigning events. This should be used to log the signing details of // requests for debugging. Will also enable LogDebug. LogDebugWithSigning LogLevelType = LogDebug | (1 << iota) // LogDebugWithHTTPBody states the SDK should log HTTP request and response // HTTP bodys in addition to the headers and path. This should be used to // see the body content of requests and responses made while using the SDK // Will also enable LogDebug. LogDebugWithHTTPBody // LogDebugWithRequestRetries states the SDK should log when service requests will // be retried. This should be used to log when you want to log when service // requests are being retried. Will also enable LogDebug. LogDebugWithRequestRetries // LogDebugWithRequestErrors states the SDK should log when service requests fail // to build, send, validate, or unmarshal. LogDebugWithRequestErrors )
Debug Logging Sub Levels
func LogLevel ¶
func LogLevel(l LogLevelType) *LogLevelType
LogLevel returns the pointer to a LogLevel. Should be used to workaround not being able to take the address of a non-composite literal.
func (*LogLevelType) Value ¶
func (l *LogLevelType) Value() LogLevelType
Value returns the LogLevel value or the default value LogOff if the LogLevel is nil. Safe to use on nil value LogLevelTypes.