Documentation
¶
Index ¶
- Constants
- Variables
- type ADB
- type APIError
- type AdbWire
- type Archiver
- type Backup
- type BackupFilter
- type BackupWire
- type ConfigProvider
- type DatabaseFilter
- type DockerConfig
- type DockerLauncher
- type DumpDirConfig
- type EngineConfigProvider
- type Handler
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Shutdown(ctx context.Context)
- func (h *Handler) StartWorker(ctx context.Context) error
- func (h *Handler) Trusted() echo.HandlerFunc
- type InMemoryBackend
- func (b *InMemoryBackend) ChangeCompartment(id, ifMatch, compartment string) (string, string, error)
- func (b *InMemoryBackend) Close()
- func (b *InMemoryBackend) Compartments() []string
- func (b *InMemoryBackend) CreateBackup(in backupIn) (BackupWire, string, string, error)
- func (b *InMemoryBackend) CreateDatabase(in createIn, token string) (AdbWire, string, string, error)
- func (b *InMemoryBackend) DeleteBackup(id, ifMatch string) (string, error)
- func (b *InMemoryBackend) EngineMode() string
- func (b *InMemoryBackend) GenerateWallet(id string, in walletIn) ([]byte, time.Time, error)
- func (b *InMemoryBackend) GetBackup(id string) (BackupWire, error)
- func (b *InMemoryBackend) GetDatabase(id string) (AdbWire, string, error)
- func (b *InMemoryBackend) GetWallet(id string) (WalletStatus, error)
- func (b *InMemoryBackend) GetWorkRequest(id string) (WorkRequestWire, error)
- func (b *InMemoryBackend) ListBackups(f BackupFilter, o ListOpts) (page.Page[BackupWire], error)
- func (b *InMemoryBackend) ListDatabases(f DatabaseFilter, o ListOpts) (page.Page[AdbWire], error)
- func (b *InMemoryBackend) ListWorkRequests(f WorkRequestFilter, o ListOpts) (page.Page[WorkRequestWire], error)
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) RestartDatabase(id, ifMatch string) (AdbWire, string, string, error)
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) RestoreDatabase(id, ifMatch string, in restoreIn) (AdbWire, string, string, error)
- func (b *InMemoryBackend) SetAdbAdminPassword(_ context.Context, id, password string) error
- func (b *InMemoryBackend) SetClock(now func() time.Time)
- func (b *InMemoryBackend) SetCloser(fn func())
- func (b *InMemoryBackend) SetCompartmentChecker(fn func(string) bool)
- func (b *InMemoryBackend) SetDumpDir(dir string)
- func (b *InMemoryBackend) SetDumpLimit(n int64)
- func (b *InMemoryBackend) SetLauncher(l Launcher, image string)
- func (b *InMemoryBackend) SetSubnetResolver(fn func(string) (SubnetInfo, bool))
- func (b *InMemoryBackend) SetTransition(d time.Duration)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartDatabase(id, ifMatch string) (AdbWire, string, string, error)
- func (b *InMemoryBackend) StopDatabase(id, ifMatch string) (AdbWire, string, string, error)
- func (b *InMemoryBackend) Sweep()
- func (b *InMemoryBackend) TerminateDatabase(id, ifMatch string, dropLongTerm bool) (string, error)
- func (b *InMemoryBackend) UpdateDatabase(id, ifMatch string, in updateIn) (AdbWire, string, string, error)
- func (b *InMemoryBackend) UpdateWallet(id string, in walletUpdateIn) (string, error)
- func (b *InMemoryBackend) VerifyAdb(_ context.Context, id string) error
- func (b *InMemoryBackend) WorkRequestErrors(id string, o ListOpts) (page.Page[WrErrorWire], error)
- func (b *InMemoryBackend) WorkRequestLogs(id string, o ListOpts) (page.Page[WrLogWire], error)
- type Instance
- type LaunchSpec
- type Launcher
- type ListOpts
- type Provider
- type Settings
- type SubnetInfo
- type WalletStatus
- type WorkRequest
- type WorkRequestFilter
- type WorkRequestWire
- type WrErrorWire
- type WrLogWire
Constants ¶
const ( EngineStub = "stub" EngineDocker = "docker" )
Engine modes (--oci-database-engine).
const DefaultImage = "gvenzl/oracle-free:23.26.3-slim-faststart@" +
"sha256:f5ff19033860d662c821cb04eb10483fa94f14f78eae252d054291ea07028093"
DefaultImage is the Oracle Database Free image behind every Autonomous Database in docker mode: the 26ai Free release in gvenzl's slim, pre-initialised variant (about 1.3 GB compressed). Override it with OCI_DATABASE_IMAGE.
const DefaultPort = 8170
DefaultPort is the dedicated control-plane listener's default TCP port.
const (
// Region is the fixed region key baked into emulated OCIDs.
Region = "iad"
)
Variables ¶
var ErrNilAppContext = errors.New("ocidatabase: nil app context")
ErrNilAppContext is returned when Init is called with a nil AppContext.
var ErrRolledBack = errors.New("the previous contents were kept")
ErrRolledBack marks a failed Import that left the previous schema in place, so the database stays usable.
var ErrSnapshotNull = errors.New("ocidatabase: null entry in snapshot")
ErrSnapshotNull is returned when a snapshot contains a null entry.
Functions ¶
This section is empty.
Types ¶
type ADB ¶
type ADB struct {
Created time.Time `json:"created"`
TransitionAt *time.Time `json:"transitionAt,omitempty"`
WalletRotated *time.Time `json:"walletRotated,omitempty"`
FreeformTags map[string]string `json:"freeformTags,omitempty"`
DefinedTags map[string]map[string]any `json:"definedTags,omitempty"`
ID string `json:"id"`
CompartmentID string `json:"compartmentId"`
DBName string `json:"dbName"`
DisplayName string `json:"displayName"`
State string `json:"state"`
Details string `json:"details,omitempty"`
Target string `json:"target,omitempty"`
Workload string `json:"workload"`
ComputeModel string `json:"computeModel"`
LicenseModel string `json:"licenseModel"`
DBVersion string `json:"dbVersion"`
CharacterSet string `json:"characterSet"`
NCharacterSet string `json:"ncharacterSet"`
SubnetID string `json:"subnetId,omitempty"`
EndpointLabel string `json:"privateEndpointLabel,omitempty"`
EndpointIP string `json:"privateEndpointIp,omitempty"`
Etag string `json:"etag"`
UniqueID string `json:"uniqueId"`
Whitelisted []string `json:"whitelistedIps,omitempty"`
NsgIDs []string `json:"nsgIds,omitempty"`
ComputeCount float32 `json:"computeCount"`
StorageGBs int `json:"storageGBs"`
BackupDays int `json:"backupRetentionDays"`
Seq int64 `json:"seq"`
IsFreeTier bool `json:"isFreeTier"`
AutoScaling bool `json:"autoScaling"`
StorageScales bool `json:"storageAutoScaling"`
Mtls bool `json:"mtlsRequired"`
AccessControl bool `json:"accessControl"`
Engine bool `json:"engine,omitempty"`
}
ADB is one stored Autonomous Database.
type APIError ¶
APIError is an OCI error response: HTTP status plus the `code` and `message` body fields.
type AdbWire ¶
type AdbWire struct {
TimeCreated time.Time `json:"timeCreated"`
FreeformTags map[string]string `json:"freeformTags"`
DefinedTags map[string]map[string]any `json:"definedTags"`
ConnectionStrings *connStringsWire `json:"connectionStrings,omitempty"`
ConnectionURLs *connURLWire `json:"connectionUrls,omitempty"`
Apex *apexWire `json:"apexDetails,omitempty"`
CPUCoreCount *int `json:"cpuCoreCount,omitempty"`
OcpuCount *float32 `json:"ocpuCount,omitempty"`
DBName string `json:"dbName"`
PrivateEndpointLabel string `json:"privateEndpointLabel,omitempty"`
LifecycleState string `json:"lifecycleState"`
DisplayName string `json:"displayName"`
DBWorkload string `json:"dbWorkload"`
ComputeModel string `json:"computeModel"`
LicenseModel string `json:"licenseModel"`
DBVersion string `json:"dbVersion"`
CharacterSet string `json:"characterSet"`
NcharacterSet string `json:"ncharacterSet"`
InfrastructureType string `json:"infrastructureType"`
OpenMode string `json:"openMode"`
PermissionLevel string `json:"permissionLevel"`
SubnetID string `json:"subnetId,omitempty"`
PrivateEndpoint string `json:"privateEndpoint,omitempty"`
LifecycleDetails string `json:"lifecycleDetails,omitempty"`
PrivateEndpointIP string `json:"privateEndpointIp,omitempty"`
ID string `json:"id"`
CompartmentID string `json:"compartmentId"`
WhitelistedIps []string `json:"whitelistedIps,omitempty"`
AccessTypes []string `json:"accessTypes,omitempty"`
NsgIDs []string `json:"nsgIds,omitempty"`
BackupRetentionDays int `json:"backupRetentionPeriodInDays"`
DataStorageSizeInTBs int `json:"dataStorageSizeInTBs"`
DataStorageSizeInGBs int `json:"dataStorageSizeInGBs"`
ComputeCount float32 `json:"computeCount"`
IsFreeTier bool `json:"isFreeTier"`
IsDedicated bool `json:"isDedicated"`
IsAutoScalingEnabled bool `json:"isAutoScalingEnabled"`
IsAutoScalingForStorage bool `json:"isAutoScalingForStorageEnabled"`
IsMtlsConnectionRequired bool `json:"isMtlsConnectionRequired"`
IsAccessControlEnabled bool `json:"isAccessControlEnabled"`
}
AdbWire is the Autonomous Database wire shape.
type Archiver ¶
type Archiver interface {
// Export writes a logical dump of the ADMIN schema to w and returns the database SCN it was taken at.
Export(ctx context.Context, w io.Writer) (int64, error)
// Import replaces the ADMIN schema with the dump in r; a failed import leaves the previous contents in place.
Import(ctx context.Context, r io.Reader) error
}
Archiver is implemented by running databases that can dump and reload the ADMIN schema.
type Backup ¶
type Backup struct {
Started time.Time `json:"started"`
Ended *time.Time `json:"ended,omitempty"`
AvailableTill *time.Time `json:"availableTill,omitempty"`
TransitionAt *time.Time `json:"transitionAt,omitempty"`
ID string `json:"id"`
CompartmentID string `json:"compartmentId"`
DBID string `json:"autonomousDatabaseId"`
DisplayName string `json:"displayName"`
Type string `json:"type"`
State string `json:"state"`
Details string `json:"details,omitempty"`
DBVersion string `json:"dbVersion"`
DumpSHA256 string `json:"dumpSha256,omitempty"`
SizeTBs float64 `json:"sizeInTBs"`
DumpBytes int64 `json:"dumpBytes,omitempty"`
SCN int64 `json:"scn,omitempty"`
Seq int64 `json:"seq"`
RetentionDays int `json:"retentionDays"`
IsAutomatic bool `json:"isAutomatic"`
}
Backup is one Autonomous Database backup record.
type BackupFilter ¶
type BackupFilter struct {
DBID string
Compartment string
State string
DisplayName string
Type string
}
BackupFilter selects backups in a list.
type BackupWire ¶
type BackupWire struct {
TimeStarted time.Time `json:"timeStarted"`
TimeEnded *time.Time `json:"timeEnded,omitempty"`
TimeAvailableTill *time.Time `json:"timeAvailableTill,omitempty"`
ID string `json:"id"`
CompartmentID string `json:"compartmentId"`
AutonomousDatabaseID string `json:"autonomousDatabaseId"`
DisplayName string `json:"displayName"`
Type string `json:"type"`
LifecycleState string `json:"lifecycleState"`
LifecycleDetails string `json:"lifecycleDetails,omitempty"`
DBVersion string `json:"dbVersion"`
RetentionDays int `json:"retentionPeriodInDays,omitempty"`
IsAutomatic bool `json:"isAutomatic"`
IsRestorable bool `json:"isRestorable"`
}
BackupWire is the backup wire shape.
type ConfigProvider ¶
type ConfigProvider interface {
GetOCIDatabaseSettings() Settings
}
ConfigProvider extracts OCI Database configuration from the AppContext Config.
type DatabaseFilter ¶
type DatabaseFilter struct {
FreeTier *bool
Compartment string
State string
StateNot string
Workload string
DBVersion string
DisplayName string
}
DatabaseFilter selects Autonomous Databases in a list.
type DockerConfig ¶
type DockerConfig struct {
// Runtime dials the container runtime on first use.
Runtime func() (gcpserve.Runner, error)
// Ports hands out the loopback ports the database listeners are published on; nil probes for free ones.
Ports *portalloc.Allocator
StartTimeout time.Duration
}
DockerConfig configures the docker launcher.
type DockerLauncher ¶
type DockerLauncher struct {
// contains filtered or unexported fields
}
DockerLauncher runs each database in its own Oracle Database Free container.
func NewDockerLauncher ¶
func NewDockerLauncher(cfg DockerConfig) *DockerLauncher
NewDockerLauncher creates a launcher.
func (*DockerLauncher) Launch ¶
func (l *DockerLauncher) Launch(ctx context.Context, spec LaunchSpec) (Instance, error)
Launch starts the container and returns once ADMIN can log in to FREEPDB1.
type DumpDirConfig ¶
type DumpDirConfig interface {
GetOCIDatabaseDumpDir() string
}
DumpDirConfig locates the directory manual backups are kept in so they outlive the process; empty keeps them in a temporary directory that is removed on shutdown.
type EngineConfigProvider ¶
type EngineConfigProvider interface {
GetOCIDatabaseEngine() string
}
EngineConfigProvider exposes the effective engine mode (stub or docker).
type Handler ¶
type Handler struct {
Backend *InMemoryBackend
Port int
EnforceAuth bool
// contains filtered or unexported fields
}
Handler serves OCI Database on its own listener.
func NewHandler ¶
func NewHandler(backend *InMemoryBackend) *Handler
NewHandler creates a Handler; callers override Port and EnforceAuth from Settings.
func (*Handler) ExtractOperation ¶
ExtractOperation returns the operation name for metrics.
func (*Handler) ExtractResource ¶
ExtractResource returns the addressed resource id for metrics.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations lists the supported operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler for all OCIDatabase requests.
func (*Handler) MatchPriority ¶
MatchPriority is irrelevant because RouteMatcher never matches.
func (*Handler) RouteMatcher ¶
RouteMatcher never matches: OCIDatabase runs on its own listener.
func (*Handler) StartWorker ¶
StartWorker binds the dedicated listener synchronously so a port conflict is returned to the caller.
func (*Handler) Trusted ¶
func (h *Handler) Trusted() echo.HandlerFunc
Trusted returns a handler that skips request-signature verification, for the in-process dashboard proxy.
type InMemoryBackend ¶
InMemoryBackend holds every Autonomous Database, backup and work request under one lock.
func NewInMemoryBackend ¶
func NewInMemoryBackend() *InMemoryBackend
NewInMemoryBackend creates an empty backend running in stub mode.
func (*InMemoryBackend) ChangeCompartment ¶
func (b *InMemoryBackend) ChangeCompartment(id, ifMatch, compartment string) (string, string, error)
ChangeCompartment moves a database and its backups.
func (*InMemoryBackend) Close ¶
func (b *InMemoryBackend) Close()
Close stops every running database.
func (*InMemoryBackend) Compartments ¶
func (b *InMemoryBackend) Compartments() []string
Compartments lists the distinct compartments that hold Autonomous Databases.
func (*InMemoryBackend) CreateBackup ¶
func (b *InMemoryBackend) CreateBackup(in backupIn) (BackupWire, string, string, error)
CreateBackup starts a manual backup. A running docker database is dumped (Data Pump export of the ADMIN schema) into the backup; otherwise the backup holds no data.
func (*InMemoryBackend) CreateDatabase ¶
func (b *InMemoryBackend) CreateDatabase(in createIn, token string) (AdbWire, string, string, error)
CreateDatabase provisions an Autonomous Database and returns it with its work request.
func (*InMemoryBackend) DeleteBackup ¶
func (b *InMemoryBackend) DeleteBackup(id, ifMatch string) (string, error)
DeleteBackup deletes a manual backup.
func (*InMemoryBackend) EngineMode ¶
func (b *InMemoryBackend) EngineMode() string
EngineMode reports the active engine: EngineDocker or EngineStub.
func (*InMemoryBackend) GenerateWallet ¶
GenerateWallet builds the wallet zip of a database, encrypted with in.Password.
func (*InMemoryBackend) GetBackup ¶
func (b *InMemoryBackend) GetBackup(id string) (BackupWire, error)
GetBackup returns one backup.
func (*InMemoryBackend) GetDatabase ¶
func (b *InMemoryBackend) GetDatabase(id string) (AdbWire, string, error)
GetDatabase returns one Autonomous Database with its etag.
func (*InMemoryBackend) GetWallet ¶
func (b *InMemoryBackend) GetWallet(id string) (WalletStatus, error)
GetWallet returns the wallet status of a database.
func (*InMemoryBackend) GetWorkRequest ¶
func (b *InMemoryBackend) GetWorkRequest(id string) (WorkRequestWire, error)
GetWorkRequest returns one work request.
func (*InMemoryBackend) ListBackups ¶
func (b *InMemoryBackend) ListBackups(f BackupFilter, o ListOpts) (page.Page[BackupWire], error)
ListBackups lists backups by database or compartment.
func (*InMemoryBackend) ListDatabases ¶
func (b *InMemoryBackend) ListDatabases(f DatabaseFilter, o ListOpts) (page.Page[AdbWire], error)
ListDatabases lists the Autonomous Databases of a compartment.
func (*InMemoryBackend) ListWorkRequests ¶
func (b *InMemoryBackend) ListWorkRequests(f WorkRequestFilter, o ListOpts) (page.Page[WorkRequestWire], error)
ListWorkRequests lists the work requests of a compartment, newest first.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all state and stops every running database.
func (*InMemoryBackend) RestartDatabase ¶
RestartDatabase restarts an available database.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state. Engine databases come back STOPPED: their containers do not survive a restart.
func (*InMemoryBackend) RestoreDatabase ¶
func (b *InMemoryBackend) RestoreDatabase(id, ifMatch string, in restoreIn) (AdbWire, string, string, error)
RestoreDatabase restores an available database to a point in time. A running docker database is reloaded from the newest backup with data that is not newer than the request; without one no data changes.
func (*InMemoryBackend) SetAdbAdminPassword ¶
func (b *InMemoryBackend) SetAdbAdminPassword(_ context.Context, id, password string) error
SetAdbAdminPassword changes the ADMIN password of an Autonomous Database, as a secret rotation does.
func (*InMemoryBackend) SetClock ¶
func (b *InMemoryBackend) SetClock(now func() time.Time)
SetClock injects the time source used for lifecycle transitions.
func (*InMemoryBackend) SetCloser ¶
func (b *InMemoryBackend) SetCloser(fn func())
SetCloser registers fn to run when the backend closes.
func (*InMemoryBackend) SetCompartmentChecker ¶
func (b *InMemoryBackend) SetCompartmentChecker(fn func(string) bool)
SetCompartmentChecker validates compartmentId arguments against another service (OCI Identity).
func (*InMemoryBackend) SetDumpDir ¶
func (b *InMemoryBackend) SetDumpDir(dir string)
SetDumpDir keeps backup files under dir instead of a temporary directory. The directory belongs to the operator: Close leaves it in place so backups outlive the process, Reset empties it.
func (*InMemoryBackend) SetDumpLimit ¶
func (b *InMemoryBackend) SetDumpLimit(n int64)
SetDumpLimit overrides the largest backup file the emulator keeps.
func (*InMemoryBackend) SetLauncher ¶
func (b *InMemoryBackend) SetLauncher(l Launcher, image string)
SetLauncher switches the backend to engine mode: databases created from now on run in launcher.
func (*InMemoryBackend) SetSubnetResolver ¶
func (b *InMemoryBackend) SetSubnetResolver(fn func(string) (SubnetInfo, bool))
SetSubnetResolver validates subnetId arguments against another service (OCI Core).
func (*InMemoryBackend) SetTransition ¶
func (b *InMemoryBackend) SetTransition(d time.Duration)
SetTransition sets how long asynchronous stub-mode operations take to complete.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state, including registered API keys. The ADMIN password, the TLS material and the running databases are not part of it.
func (*InMemoryBackend) StartDatabase ¶
StartDatabase starts a stopped database.
func (*InMemoryBackend) StopDatabase ¶
StopDatabase stops an available database.
func (*InMemoryBackend) Sweep ¶
func (b *InMemoryBackend) Sweep()
Sweep applies due time-based transitions against the backend clock.
func (*InMemoryBackend) TerminateDatabase ¶
func (b *InMemoryBackend) TerminateDatabase(id, ifMatch string, dropLongTerm bool) (string, error)
TerminateDatabase deletes a database; its listeners and container go with it.
func (*InMemoryBackend) UpdateDatabase ¶
func (b *InMemoryBackend) UpdateDatabase(id, ifMatch string, in updateIn) (AdbWire, string, string, error)
UpdateDatabase applies an UpdateAutonomousDatabase request.
func (*InMemoryBackend) UpdateWallet ¶
func (b *InMemoryBackend) UpdateWallet(id string, in walletUpdateIn) (string, error)
UpdateWallet rotates the client trust of a database: wallets issued before stop working once the grace period (in hours) is over.
func (*InMemoryBackend) VerifyAdb ¶
func (b *InMemoryBackend) VerifyAdb(_ context.Context, id string) error
VerifyAdb reports whether an Autonomous Database exists and can take a rotated ADMIN password.
func (*InMemoryBackend) WorkRequestErrors ¶
func (b *InMemoryBackend) WorkRequestErrors(id string, o ListOpts) (page.Page[WrErrorWire], error)
WorkRequestErrors lists the errors of a failed work request.
func (*InMemoryBackend) WorkRequestLogs ¶
WorkRequestLogs lists the progress log of a work request, oldest first.
type Instance ¶
type Instance interface {
// Endpoint is the host and port of the database listener.
Endpoint() (string, int)
Stop(ctx context.Context) error
// Start restarts a stopped database and returns once it accepts connections.
Start(ctx context.Context) error
SetAdminPassword(ctx context.Context, current, next string) error
Close(ctx context.Context)
}
Instance is the running Oracle database of one Autonomous Database.
type LaunchSpec ¶
LaunchSpec describes the database of one Autonomous Database. Password is the ADMIN password.
type Launcher ¶
type Launcher interface {
Launch(ctx context.Context, spec LaunchSpec) (Instance, error)
}
Launcher starts databases and returns once they accept connections.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for OCI Database. It runs on its own listener (see Handler.StartWorker) and never matches on the shared AWS router.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init creates the backend and handler; the port is bound in StartWorker.
type Settings ¶
type Settings struct {
Engine string `` //nolint:lll // config struct tags are intentionally verbose
/* 257-byte string literal not displayed */
Port int `` //nolint:lll // config struct tags are intentionally verbose
/* 184-byte string literal not displayed */
EnforceAuth bool `` //nolint:lll // config struct tags are intentionally verbose
/* 238-byte string literal not displayed */
}
Settings holds service-level configuration, embedded in the root CLI as CLI.OCIDatabase.
func DefaultSettings ¶
func DefaultSettings() Settings
DefaultSettings returns the settings used when no ConfigProvider is available.
type SubnetInfo ¶
type SubnetInfo struct {
CIDR string
}
SubnetInfo describes a subnet known to OCI Core.
type WalletStatus ¶
type WalletStatus struct {
TimeRotated *time.Time `json:"timeRotated,omitempty"`
LifecycleState string `json:"lifecycleState"`
}
WalletStatus is the wire form of AutonomousDatabaseWallet.
type WorkRequest ¶
type WorkRequest struct {
Accepted time.Time `json:"accepted"`
FinishAt *time.Time `json:"finishAt,omitempty"`
FinishedAt *time.Time `json:"finishedAt,omitempty"`
ID string `json:"id"`
Type string `json:"type"`
Compartment string `json:"compartmentId"`
ResourceID string `json:"resourceId"`
ResourceType string `json:"resourceType"`
Action string `json:"action"`
Status string `json:"status"`
ErrCode string `json:"errCode,omitempty"`
ErrMsg string `json:"errMsg,omitempty"`
Seq int64 `json:"seq"`
}
WorkRequest tracks one asynchronous operation.
type WorkRequestFilter ¶
WorkRequestFilter selects work requests in a list.
type WorkRequestWire ¶
type WorkRequestWire struct {
TimeAccepted time.Time `json:"timeAccepted"`
TimeStarted time.Time `json:"timeStarted"`
TimeFinished *time.Time `json:"timeFinished,omitempty"`
Type string `json:"operationType"`
Status string `json:"status"`
ID string `json:"id"`
Compartment string `json:"compartmentId"`
Resources []wrResourceWire `json:"resources"`
Percent float32 `json:"percentComplete"`
}
WorkRequestWire is the wire form of a work request.