ocidatabase

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 50 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

OCI Autonomous Database

Parity grade: B · SDK github.com/oracle/oci-go-sdk/v65@v65.126.2 · last audited 2026-11-01 (34109ed5c)

Coverage

Metric Value
PARITY entries audited 21 (16 ok, 5 partial)
Feature families 7 (3 ok, 4 partial)
Known gaps 5
Deferred items 0
Resource leaks unknown
Known gaps
  • cwallet.sso, keystore.jks and truststore.jks are not in the wallet zip. cwallet.sso is Oracle's auto-login wallet format with no published specification and no library in go.mod; JKS files could be written from the OpenJDK format description but there is no JDK or keytool on the host to check them against and installing a reference reader was refused, so they are not shipped unverified. ewallet.p12 uses the modern PKCS#12 scheme, which very old Oracle clients may not read.
  • Not routed: Data Guard and disaster recovery (FailOver, Switchover, peers, dataguard associations) need a second database with redo shipping; key rotation and Vault keys (RotateAutonomousDatabaseEncryptionKey, ConfigureAutonomousDatabaseVaultKey) and secretId need the ADB encryption-key fields (adb.go:95-96 rejects secretId); Data Safe, Operations Insights and Database Management enable/disable need those services; maintenance windows, resource pools, scheduled operations, regional wallets, shrink, upgrade, character set listing (docs page lists no values, see body), and the Exadata, container database and software image families are not implemented. Clones (source DATABASE, BACKUP_FROM_ID, BACKUP_FROM_TIMESTAMP, refreshable) are rejected at adb.go:97-98: the Archiver dump/import added for backups is the mechanism a full clone needs, but cloneType, sourceId and the inherited settings are not implemented. opc-dry-run is ignored.
  • Docker engine: every consumer group maps to the single FREEPDB1 service, the database is Oracle Database Free (no Autonomous features, ORDS, APEX or Mongo API behind connectionUrls), workload, compute and storage settings do not size the container, and dbName rename does not change the service name. Containers and TLS material do not survive an emulator restart; backup files live in a temporary directory removed on close, so backups restored from a snapshot after a restart have no data.
  • mTLS support is the TLS handshake level: the listener verifies the wallet client certificate against the database's client CA; Oracle's own wallet-based authentication is not involved.
  • IAM policy enforcement and quotas are not modelled (out of scope).

More

Documentation

Index

Constants

View Source
const (
	EngineStub   = "stub"
	EngineDocker = "docker"
)

Engine modes (--oci-database-engine).

View Source
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.

View Source
const DefaultPort = 8170

DefaultPort is the dedicated control-plane listener's default TCP port.

View Source
const (
	// Region is the fixed region key baked into emulated OCIDs.
	Region = "iad"
)

Variables

View Source
var ErrNilAppContext = errors.New("ocidatabase: nil app context")

ErrNilAppContext is returned when Init is called with a nil AppContext.

View Source
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.

View Source
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

type APIError struct {
	Code    string
	Message string
	Status  int
}

APIError is an OCI error response: HTTP status plus the `code` and `message` body fields.

func (*APIError) Error

func (e *APIError) Error() string

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

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation returns the operation name for metrics.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource returns the addressed resource id for metrics.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

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

func (h *Handler) MatchPriority() int

MatchPriority is irrelevant because RouteMatcher never matches.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all in-memory state.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher never matches: OCIDatabase runs on its own listener.

func (*Handler) Shutdown

func (h *Handler) Shutdown(ctx context.Context)

Shutdown stops the listener and the sweeper.

func (*Handler) StartWorker

func (h *Handler) StartWorker(ctx context.Context) error

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

type InMemoryBackend struct {
	Auth *ociauth.Registry
	// contains filtered or unexported fields
}

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

func (b *InMemoryBackend) GenerateWallet(id string, in walletIn) ([]byte, time.Time, error)

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

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

func (b *InMemoryBackend) RestartDatabase(id, ifMatch string) (AdbWire, string, string, error)

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

func (b *InMemoryBackend) StartDatabase(id, ifMatch string) (AdbWire, string, string, error)

StartDatabase starts a stopped database.

func (*InMemoryBackend) StopDatabase

func (b *InMemoryBackend) StopDatabase(id, ifMatch string) (AdbWire, string, string, error)

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

func (b *InMemoryBackend) WorkRequestLogs(id string, o ListOpts) (page.Page[WrLogWire], error)

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

type LaunchSpec struct {
	ID       string
	Image    string
	Password string
}

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 ListOpts

type ListOpts struct {
	SortBy string
	Order  string
	Page   string
	Limit  int
}

ListOpts carries the shared list query parameters.

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

Init creates the backend and handler; the port is bound in StartWorker.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the service provider name.

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

type WorkRequestFilter struct {
	Compartment string
	ResourceID  string
}

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.

type WrErrorWire

type WrErrorWire struct {
	Timestamp time.Time `json:"timestamp"`
	Code      string    `json:"code"`
	Message   string    `json:"message"`
}

WrErrorWire is the work request error wire shape.

type WrLogWire

type WrLogWire struct {
	Timestamp time.Time `json:"timestamp"`
	Message   string    `json:"message"`
}

WrLogWire is the work request log wire shape.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL