ociobjectstorage

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: 39 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 Object Storage

Parity grade: B · SDK github.com/oracle/oci-go-sdk/v65@v65.126.2 · last audited 2026-10-25 (3490bdbb3)

Coverage

Metric Value
PARITY entries audited 57 (36 ok, 21 partial)
Feature families 9 (6 ok, 3 partial)
Known gaps 5
Deferred items 0
Resource leaks unknown
Known gaps
  • Resource principal, instance principal and session tokens (ST$ keyIds) are not verified: the tokens come from IMDS and the OCI auth service, which are not emulated, so an ST$ request is accepted unverified by default and rejected under --oci-objectstorage-enforce-auth; only API-key signatures are verified.
  • Cross-tenancy CopyObject is not implemented; regions are nominal (buckets are not partitioned per region, a destination region is any non-empty name and the bucket is found by name).
  • Objects are not encrypted at rest: SSE-C keys are validated and only their SHA-256 is kept (reads with a wrong key fail), KMS key ids are validated against ocivault and recorded.
  • The OCI Amazon S3 compatibility API (structural: ociidentity generates customer secret keys but does not store them, so SigV4 cannot be verified) and the Swift API are out of scope.
  • Namespaces are single-tenant: only one namespace is served and no compartment or IAM policy checks apply.

More

Documentation

Index

Constants

View Source
const (
	EventCreateObject = "com.oraclecloud.objectstorage.createobject"
	EventUpdateObject = "com.oraclecloud.objectstorage.updateobject"
	EventDeleteObject = "com.oraclecloud.objectstorage.deleteobject"
	EventCreateBucket = "com.oraclecloud.objectstorage.createbucket"
	EventUpdateBucket = "com.oraclecloud.objectstorage.updatebucket"
	EventDeleteBucket = "com.oraclecloud.objectstorage.deletebucket"
)

Object event types (https://docs.oracle.com/en-us/iaas/Content/Events/Reference/eventsproducers.htm).

View Source
const (
	// Region is the fixed region baked into emulated OCIDs.
	Region = "us-ashburn-1"

	// DefaultMinPartSize disables minimum part size enforcement; the OCI docs state no minimum.
	DefaultMinPartSize = 0
)
View Source
const DefaultNamespace = "gopherstack"

DefaultNamespace is the tenancy namespace served unless overridden.

View Source
const DefaultPort = 8150

DefaultPort is the dedicated listener's default TCP port.

Variables

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

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

View Source
var ErrSnapshotNull = errors.New("ociobjectstorage: null entry in snapshot")

ErrSnapshotNull is returned when a snapshot contains a null bucket.

Functions

This section is empty.

Types

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 AccessTarget

type AccessTarget struct {
	Namespace     string `json:"namespace"`
	CompartmentID string `json:"compartmentId"`
	Bucket        string `json:"bucket"`
}

AccessTarget is one namespace/compartment/bucket triple a private endpoint may reach.

type BatchDeleted

type BatchDeleted struct {
	TimeLastModified time.Time `json:"timeLastModified"`
	ObjectName       string    `json:"objectName"`
}

BatchDeleted is a deleted BatchDeleteObjects entry.

type BatchFailure

type BatchFailure struct {
	ObjectName   string `json:"objectName"`
	ErrorMessage string `json:"errorMessage"`
	StatusCode   int    `json:"statusCode"`
}

BatchFailure is a failed BatchDeleteObjects entry.

type BatchItem

type BatchItem struct {
	ObjectName string `json:"objectName"`
	IfMatch    string `json:"ifMatch"`
}

BatchItem is one entry of a BatchDeleteObjects request.

type Bucket

type Bucket struct {
	TimeCreated         time.Time                 `json:"timeCreated"`
	DefinedTags         map[string]map[string]any `json:"definedTags,omitempty"`
	FreeformTags        map[string]string         `json:"freeformTags,omitempty"`
	Metadata            map[string]string         `json:"metadata,omitempty"`
	Objects             map[string][]*Object      `json:"objects"`
	Uploads             map[string]*Upload        `json:"uploads"`
	PARs                map[string]*PAR           `json:"pars"`
	Retention           map[string]*Retention     `json:"retention"`
	Lifecycle           *Lifecycle                `json:"lifecycle,omitempty"`
	Replication         *ReplicationPolicy        `json:"replication,omitempty"`
	ReplicationSource   *ReplicationSource        `json:"replicationSource,omitempty"`
	Name                string                    `json:"name"`
	Versioning          string                    `json:"versioning"`
	CompartmentID       string                    `json:"compartmentId"`
	CreatedBy           string                    `json:"createdBy"`
	Etag                string                    `json:"etag"`
	PublicAccessType    string                    `json:"publicAccessType"`
	StorageTier         string                    `json:"storageTier"`
	LifecycleEtag       string                    `json:"lifecycleEtag,omitempty"`
	AutoTiering         string                    `json:"autoTiering,omitempty"`
	KmsKeyID            string                    `json:"kmsKeyId,omitempty"`
	ID                  string                    `json:"id"`
	ReplQueue           []ReplTask                `json:"replQueue,omitempty"`
	ObjectEventsEnabled bool                      `json:"objectEventsEnabled"`
	IsBucketKeyEnabled  bool                      `json:"isBucketKeyEnabled"`
}

Bucket is a bucket with all its contents.

type BucketEvent

type BucketEvent struct {
	Time             time.Time
	FreeformTags     map[string]string
	DefinedTags      map[string]map[string]any
	EventType        string
	CompartmentID    string
	Namespace        string
	BucketName       string
	BucketID         string
	ETag             string
	PublicAccessType string
}

BucketEvent describes a bucket create, update or delete; buckets emit regardless of objectEventsEnabled.

type BucketWire

type BucketWire struct {
	TimeCreated               time.Time                 `json:"timeCreated"`
	Metadata                  map[string]string         `json:"metadata,omitempty"`
	FreeformTags              map[string]string         `json:"freeformTags"`
	DefinedTags               map[string]map[string]any `json:"definedTags"`
	ApproximateCount          *int64                    `json:"approximateCount,omitempty"`
	ApproximateSize           *int64                    `json:"approximateSize,omitempty"`
	Namespace                 string                    `json:"namespace"`
	Name                      string                    `json:"name"`
	CompartmentID             string                    `json:"compartmentId"`
	CreatedBy                 string                    `json:"createdBy"`
	Etag                      string                    `json:"etag"`
	PublicAccessType          string                    `json:"publicAccessType"`
	StorageTier               string                    `json:"storageTier"`
	KmsKeyID                  *string                   `json:"kmsKeyId"`
	ObjectLifecyclePolicyEtag *string                   `json:"objectLifecyclePolicyEtag"`
	ID                        string                    `json:"id"`
	Versioning                string                    `json:"versioning"`
	AutoTiering               string                    `json:"autoTiering,omitempty"`
	ObjectEventsEnabled       bool                      `json:"objectEventsEnabled"`
	IsBucketKeyEnabled        bool                      `json:"isBucketKeyEnabled"`
	ReplicationEnabled        bool                      `json:"replicationEnabled"`
	IsReadOnly                bool                      `json:"isReadOnly"`
}

BucketWire is the Bucket / BucketSummary JSON body.

type Checksum

type Checksum struct {
	Algorithm string `json:"algorithm,omitempty"`
	Content   string `json:"content,omitempty"`
	Multipart string `json:"multipart,omitempty"`
}

Checksum is the optional checksum stored next to the default MD5 of an object. Content is the whole-object value (always set for CRC32C, single-part uploads only for SHA); Multipart is "<b64(hash(concat part hashes))>-<parts>" for multipart SHA uploads.

type ChecksumReq

type ChecksumReq struct {
	Algorithm string
	CRC32C    string
	SHA256    string
	SHA384    string
}

ChecksumReq carries the opc-checksum-algorithm and opc-content-* request headers.

type CommitInput

type CommitInput struct {
	PartsToCommit  []CommitPart `json:"partsToCommit"`
	PartsToExclude []int        `json:"partsToExclude"`
}

CommitInput is the CommitMultipartUploadDetails payload.

type CommitPart

type CommitPart struct {
	Etag    string `json:"etag"`
	PartNum int    `json:"partNum"`
}

CommitPart names a part to include in the final object.

type ConfigProvider

type ConfigProvider interface {
	GetOCIObjectStorageSettings() Settings
}

ConfigProvider extracts Object Storage configuration from the AppContext Config.

type CopyInput

type CopyInput struct {
	DestinationMetadata map[string]string `json:"destinationObjectMetadata"`
	SourceObjectName    string            `json:"sourceObjectName"`
	DestinationRegion   string            `json:"destinationRegion"`
	DestinationNS       string            `json:"destinationNamespace"`
	DestinationBucket   string            `json:"destinationBucket"`
	DestinationObject   string            `json:"destinationObjectName"`
	SourceIfMatch       string            `json:"sourceObjectIfMatchETag"`
	SourceVersionID     string            `json:"sourceVersionId"`
	DestIfMatch         string            `json:"destinationObjectIfMatchETag"`
	DestIfNoneMatch     string            `json:"destinationObjectIfNoneMatchETag"`
	DestinationTier     string            `json:"destinationObjectStorageTier"`
}

CopyInput is the CopyObjectDetails payload.

type CopyOptions

type CopyOptions struct {
	Dest   SSEReq
	SrcKey SSEKey
}

CopyOptions are the opc-source-sse-customer-* and destination encryption headers of a copy.

type CreateBucketInput

type CreateBucketInput struct {
	Metadata            map[string]string         `json:"metadata"`
	FreeformTags        map[string]string         `json:"freeformTags"`
	DefinedTags         map[string]map[string]any `json:"definedTags"`
	ObjectEventsEnabled *bool                     `json:"objectEventsEnabled"`
	IsBucketKeyEnabled  *bool                     `json:"isBucketKeyEnabled"`
	Name                string                    `json:"name"`
	CompartmentID       string                    `json:"compartmentId"`
	PublicAccessType    string                    `json:"publicAccessType"`
	StorageTier         string                    `json:"storageTier"`
	KmsKeyID            string                    `json:"kmsKeyId"`
	Versioning          string                    `json:"versioning"`
	AutoTiering         string                    `json:"autoTiering"`
}

CreateBucketInput is the CreateBucketDetails payload.

type CreatePARInput

type CreatePARInput struct {
	TimeExpires         time.Time `json:"timeExpires"`
	Name                string    `json:"name"`
	AccessType          string    `json:"accessType"`
	ObjectName          string    `json:"objectName"`
	BucketListingAction string    `json:"bucketListingAction"`
}

CreatePARInput is the CreatePreauthenticatedRequestDetails payload.

type CreatePrivateEndpointInput

type CreatePrivateEndpointInput struct {
	FreeformTags       map[string]string         `json:"freeformTags"`
	DefinedTags        map[string]map[string]any `json:"definedTags"`
	SecurityAttributes map[string]map[string]any `json:"securityAttributes"`
	Name               string                    `json:"name"`
	CompartmentID      string                    `json:"compartmentId"`
	SubnetID           string                    `json:"subnetId"`
	Prefix             string                    `json:"prefix"`
	PrivateEndpointIP  string                    `json:"privateEndpointIp"`
	AdditionalPrefixes []string                  `json:"additionalPrefixes"`
	NsgIDs             []string                  `json:"nsgIds"`
	AccessTargets      []AccessTarget            `json:"accessTargets"`
}

CreatePrivateEndpointInput is the CreatePrivateEndpointDetails payload.

type CreateReplicationInput

type CreateReplicationInput struct {
	Name                  string `json:"name"`
	DestinationRegionName string `json:"destinationRegionName"`
	DestinationBucketName string `json:"destinationBucketName"`
}

CreateReplicationInput is the CreateReplicationPolicyDetails payload.

type CreateUploadInput

type CreateUploadInput struct {
	Metadata           map[string]string `json:"metadata"`
	Object             string            `json:"object"`
	ContentType        string            `json:"contentType"`
	ContentLanguage    string            `json:"contentLanguage"`
	ContentEncoding    string            `json:"contentEncoding"`
	ContentDisposition string            `json:"contentDisposition"`
	CacheControl       string            `json:"cacheControl"`
	StorageTier        string            `json:"storageTier"`
}

CreateUploadInput is the CreateMultipartUploadDetails payload.

type DeleteResult

type DeleteResult struct {
	LastModified   time.Time
	VersionID      string
	IsDeleteMarker bool
}

DeleteResult describes the outcome of DeleteObject.

type Duration

type Duration struct {
	TimeUnit   string `json:"timeUnit"`
	TimeAmount int64  `json:"timeAmount"`
}

Duration is the OCI Duration shape.

type FqdnsWire

type FqdnsWire struct {
	AdditionalPrefixesFqdns map[string]PrefixFqdnsWire `json:"additionalPrefixesFqdns"`
	PrefixFqdns             PrefixFqdnsWire            `json:"prefixFqdns"`
}

FqdnsWire is the Fqdns body.

type Handler

type Handler struct {
	Backend *InMemoryBackend

	Port        int
	EnforceAuth bool
	// contains filtered or unexported fields
}

Handler serves the OCI Object Storage API 20160918.

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 bucket[/object] 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 Object Storage 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) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

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

RouteMatcher never matches: Object Storage runs on its own listener.

func (*Handler) Shutdown

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

Shutdown stops the listener and the lifecycle sweeper.

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable by delegating to the backend.

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, then starts the lifecycle sweeper.

type InMemoryBackend

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

InMemoryBackend holds every bucket under one lock.

func NewInMemoryBackend

func NewInMemoryBackend() *InMemoryBackend

NewInMemoryBackend creates an empty backend serving the default namespace.

func (*InMemoryBackend) AbortUpload

func (b *InMemoryBackend) AbortUpload(ns, bucket, object, id string) error

AbortUpload discards an upload.

func (*InMemoryBackend) AllBuckets

func (b *InMemoryBackend) AllBuckets() []*BucketWire

AllBuckets lists every bucket of the namespace across compartments, sorted by name.

func (*InMemoryBackend) AuthorizePAR

func (b *InMemoryBackend) AuthorizePAR(token, ns, bucket, object string, use PARAccess) error

AuthorizePAR checks token against the bucket/object/use; every failure is the same opaque 404.

func (*InMemoryBackend) BatchDelete

func (b *InMemoryBackend) BatchDelete(ns, bucket string, items []BatchItem) ([]BatchDeleted, []BatchFailure, error)

BatchDelete deletes several objects, reporting per-object outcomes.

func (*InMemoryBackend) CommitUpload

func (b *InMemoryBackend) CommitUpload(
	ns, bucket, object, id string, in CommitInput, pre Preconds,
) (ObjectInfo, error)

CommitUpload assembles the parts into an object.

func (*InMemoryBackend) CopyObject

func (b *InMemoryBackend) CopyObject(ns, bucket string, in CopyInput) (string, error)

CopyObject copies an object and returns a work request id.

func (*InMemoryBackend) CopyObjectWith

func (b *InMemoryBackend) CopyObjectWith(ns, bucket string, in CopyInput, opt CopyOptions) (string, error)

CopyObjectWith copies an object, honouring SSE-C source/destination keys. A copy to a region other than Region is accepted as a pending work request that completes once the clock passes asyncLag.

func (*InMemoryBackend) CreateBucket

func (b *InMemoryBackend) CreateBucket(ns string, in CreateBucketInput, user string) (*BucketWire, error)

CreateBucket creates a bucket.

func (*InMemoryBackend) CreatePAR

func (b *InMemoryBackend) CreatePAR(ns, bucket string, in CreatePARInput) (PARWire, error)

CreatePAR creates a pre-authenticated request; the returned wire includes the accessUri.

func (*InMemoryBackend) CreatePrivateEndpoint

func (b *InMemoryBackend) CreatePrivateEndpoint(ns string, in CreatePrivateEndpointInput, user string) (string, error)

CreatePrivateEndpoint creates a private endpoint backed by a VNIC in the subnet and returns its work request id.

func (*InMemoryBackend) CreateReplicationPolicy

func (b *InMemoryBackend) CreateReplicationPolicy(
	ns, bucket string, in CreateReplicationInput,
) (ReplicationPolicy, error)

CreateReplicationPolicy starts replicating new objects of the bucket into a destination bucket.

func (*InMemoryBackend) CreateRetention

func (b *InMemoryBackend) CreateRetention(ns, bucket string, in RetentionInput) (RetentionWire, error)

CreateRetention adds a retention rule.

func (*InMemoryBackend) CreateUpload

func (b *InMemoryBackend) CreateUpload(ns, bucket string, in CreateUploadInput, pre Preconds) (*Upload, error)

CreateUpload starts a multipart upload.

func (*InMemoryBackend) CreateUploadWith

func (b *InMemoryBackend) CreateUploadWith(
	ns, bucket string, in CreateUploadInput, pre Preconds, opt UploadOptions,
) (*Upload, error)

CreateUploadWith starts a multipart upload with a checksum algorithm and encryption selection.

func (*InMemoryBackend) DeleteBucket

func (b *InMemoryBackend) DeleteBucket(ns, name string, pre Preconds) error

DeleteBucket removes an empty bucket.

func (*InMemoryBackend) DeleteLifecycle

func (b *InMemoryBackend) DeleteLifecycle(ns, bucket string, pre Preconds) error

DeleteLifecycle removes the lifecycle policy.

func (*InMemoryBackend) DeleteObject

func (b *InMemoryBackend) DeleteObject(ns, bucket, name, versionID, ifMatch string) (DeleteResult, error)

DeleteObject deletes an object or one version of it.

func (*InMemoryBackend) DeletePAR

func (b *InMemoryBackend) DeletePAR(ns, bucket, id string) error

DeletePAR revokes a PAR.

func (*InMemoryBackend) DeletePrivateEndpoint

func (b *InMemoryBackend) DeletePrivateEndpoint(ns, name string, pre Preconds) (string, error)

DeletePrivateEndpoint removes a private endpoint and its VNIC and returns its work request id.

func (*InMemoryBackend) DeleteReplicationPolicy

func (b *InMemoryBackend) DeleteReplicationPolicy(ns, bucket, id string) error

DeleteReplicationPolicy stops replication; the destination stays read-only until MakeBucketWritable.

func (*InMemoryBackend) DeleteRetention

func (b *InMemoryBackend) DeleteRetention(ns, bucket, id string, pre Preconds) error

DeleteRetention removes a rule unless it is locked.

func (*InMemoryBackend) DeleteWorkRequest

func (b *InMemoryBackend) DeleteWorkRequest(id string) error

DeleteWorkRequest cancels a work request; finished ones cannot be canceled.

func (*InMemoryBackend) GetBlob

func (b *InMemoryBackend) GetBlob(ns, bucket, object string) ([]byte, error)

GetBlob reads an object body for an in-process caller.

func (*InMemoryBackend) GetBlobPAR

func (b *InMemoryBackend) GetBlobPAR(uri string) ([]byte, error)

GetBlobPAR reads through a pre-authenticated request URI.

func (*InMemoryBackend) GetBucket

func (b *InMemoryBackend) GetBucket(ns, name string, fields []string, pre Preconds) (*BucketWire, error)

GetBucket returns a bucket; fields may include approximateCount, approximateSize, autoTiering.

func (*InMemoryBackend) GetLifecycle

func (b *InMemoryBackend) GetLifecycle(ns, bucket string) (LifecycleWire, string, error)

GetLifecycle returns the lifecycle policy.

func (*InMemoryBackend) GetObject

func (b *InMemoryBackend) GetObject(
	ns, bucket, name, versionID string, pre Preconds, body bool,
) (ObjectInfo, error)

GetObject reads an object (or only its headers when body is false).

func (*InMemoryBackend) GetObjectWith

func (b *InMemoryBackend) GetObjectWith(
	ns, bucket, name, versionID string, pre Preconds, body bool, key SSEKey,
) (ObjectInfo, error)

GetObjectWith reads an object that may be encrypted with the customer-provided key.

func (*InMemoryBackend) GetPAR

func (b *InMemoryBackend) GetPAR(ns, bucket, id string) (PARWire, error)

GetPAR returns a PAR (without its accessUri, which is only shown at creation).

func (*InMemoryBackend) GetPrivateEndpoint

func (b *InMemoryBackend) GetPrivateEndpoint(ns, name string, pre Preconds) (PrivateEndpointWire, error)

GetPrivateEndpoint returns one private endpoint.

func (*InMemoryBackend) GetReplicationPolicy

func (b *InMemoryBackend) GetReplicationPolicy(ns, bucket, id string) (ReplicationPolicy, error)

GetReplicationPolicy returns the bucket's policy.

func (*InMemoryBackend) GetRetention

func (b *InMemoryBackend) GetRetention(ns, bucket, id string) (RetentionWire, error)

GetRetention returns one retention rule.

func (*InMemoryBackend) GetWorkRequest

func (b *InMemoryBackend) GetWorkRequest(id string) (WorkRequestWire, error)

GetWorkRequest returns a work request.

func (*InMemoryBackend) HoldsInCompartment

func (b *InMemoryBackend) HoldsInCompartment(compartmentID string) string

HoldsInCompartment names a bucket held in the compartment, or returns "".

func (*InMemoryBackend) ListBuckets

func (b *InMemoryBackend) ListBuckets(ns, compartment, token string, limit int) (page.Page[*BucketWire], error)

ListBuckets lists buckets in a compartment.

func (*InMemoryBackend) ListObjectVersions

func (b *InMemoryBackend) ListObjectVersions(
	ns, bucket string, opt ListOptions,
) (page.Page[ObjectInfo], []string, error)

ListObjectVersions lists every version and delete marker, newest first per name.

func (*InMemoryBackend) ListObjects

func (b *InMemoryBackend) ListObjects(ns, bucket string, opt ListOptions) ([]ObjectInfo, []string, string, error)

ListObjects lists live objects (names only are guaranteed meaningful for fields=name).

func (*InMemoryBackend) ListPARs

func (b *InMemoryBackend) ListPARs(ns, bucket, prefix, token string, limit int) (page.Page[PARWire], error)

ListPARs lists PARs ordered by creation time.

func (*InMemoryBackend) ListParts

func (b *InMemoryBackend) ListParts(ns, bucket, object, id, token string, limit int) (page.Page[PartSummary], error)

ListParts lists uploaded parts in part-number order.

func (*InMemoryBackend) ListPrivateEndpoints

func (b *InMemoryBackend) ListPrivateEndpoints(
	ns, compartment, state, token string, limit int,
) (page.Page[PrivateEndpointWire], error)

ListPrivateEndpoints lists the private endpoints of a compartment, optionally filtered by lifecycle state.

func (*InMemoryBackend) ListReplicationPolicies

func (b *InMemoryBackend) ListReplicationPolicies(
	ns, bucket, token string, limit int,
) (page.Page[ReplicationPolicy], error)

ListReplicationPolicies lists the bucket's policies (at most one).

func (*InMemoryBackend) ListReplicationSources

func (b *InMemoryBackend) ListReplicationSources(
	ns, bucket, token string, limit int,
) (page.Page[ReplicationSource], error)

ListReplicationSources lists the policies replicating into the bucket.

func (*InMemoryBackend) ListRetention

func (b *InMemoryBackend) ListRetention(ns, bucket, token string) (page.Page[RetentionWire], error)

ListRetention lists retention rules.

func (*InMemoryBackend) ListUploads

func (b *InMemoryBackend) ListUploads(ns, bucket, token string, limit int) (page.Page[UploadWire], error)

ListUploads lists in-flight uploads ordered by object name then id.

func (*InMemoryBackend) ListWorkRequests

func (b *InMemoryBackend) ListWorkRequests(compartment, token string, limit int) (page.Page[WorkRequestWire], error)

ListWorkRequests lists work requests in a compartment.

func (*InMemoryBackend) MakeBucketWritable

func (b *InMemoryBackend) MakeBucketWritable(ns, bucket string) error

MakeBucketWritable ends a destination's read-only state; the source policy turns CLIENT_ERROR.

func (*InMemoryBackend) Namespace

func (b *InMemoryBackend) Namespace() string

Namespace returns the served namespace.

func (*InMemoryBackend) NamespaceMetadata

func (b *InMemoryBackend) NamespaceMetadata(ns string) (nsMetaWire, error)

NamespaceMetadata returns the namespace's default compartments.

func (*InMemoryBackend) PutBlob

func (b *InMemoryBackend) PutBlob(ns, bucket, object string, data []byte) error

PutBlob stores an object for an in-process caller, bypassing HTTP and authentication.

func (*InMemoryBackend) PutBlobPAR

func (b *InMemoryBackend) PutBlobPAR(uri string, data []byte) error

PutBlobPAR writes through a pre-authenticated request URI (…/p/<token>/n/<ns>/b/<bucket>/o/<object>).

func (*InMemoryBackend) PutLifecycle

func (b *InMemoryBackend) PutLifecycle(
	ns, bucket string,
	items []LifecycleRule,
	pre Preconds,
) (LifecycleWire, string, error)

PutLifecycle replaces the bucket's lifecycle policy and returns it with the policy etag.

func (*InMemoryBackend) PutObject

func (b *InMemoryBackend) PutObject(
	ns, bucket, name string, data []byte, meta ObjectMeta, pre Preconds, contentMD5 string,
) (ObjectInfo, error)

PutObject stores an object; contentMD5 is the optional base64 Content-MD5 request header.

func (*InMemoryBackend) PutObjectWith

func (b *InMemoryBackend) PutObjectWith(
	ns, bucket, name string, data []byte, meta ObjectMeta, pre Preconds, opt PutOptions,
) (ObjectInfo, error)

PutObjectWith stores an object with checksum and encryption options.

func (*InMemoryBackend) ReencryptBucket

func (b *InMemoryBackend) ReencryptBucket(ns, bucket string) (string, error)

ReencryptBucket re-encrypts every object not under an SSE-C key with the bucket's current key and returns a completed REENCRYPT work request id.

func (*InMemoryBackend) ReencryptObject

func (b *InMemoryBackend) ReencryptObject(ns, bucket, name, versionID string, in ReencryptInput) error

ReencryptObject re-wraps an object's data key under a Vault key, an SSE-C key or the bucket key.

func (*InMemoryBackend) RenameObject

func (b *InMemoryBackend) RenameObject(ns, bucket string, in RenameInput) (ObjectInfo, error)

RenameObject moves an object to a new name within its bucket.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all state.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore loads backend state from a snapshot.

func (*InMemoryBackend) RestoreObjects

func (b *InMemoryBackend) RestoreObjects(ns, bucket, name, versionID string, hours int) error

RestoreObjects begins restoring an archived object.

func (*InMemoryBackend) SetBucketEventSink

func (b *InMemoryBackend) SetBucketEventSink(fn func(BucketEvent))

SetBucketEventSink installs the receiver of bucket events; it is called outside the backend lock.

func (*InMemoryBackend) SetClock

func (b *InMemoryBackend) SetClock(now func() time.Time)

SetClock injects the time source used for expiry, restore and lifecycle decisions.

func (*InMemoryBackend) SetKeyChecker

func (b *InMemoryBackend) SetKeyChecker(fn func(keyID string) (string, bool))

SetKeyChecker installs the Vault key lookup (OCID to lifecycle state) used to validate KMS key ids.

func (*InMemoryBackend) SetMinPartSize

func (b *InMemoryBackend) SetMinPartSize(n int64)

SetMinPartSize overrides the minimum size of every multipart part except the last.

func (*InMemoryBackend) SetNamespace

func (b *InMemoryBackend) SetNamespace(ns string)

SetNamespace overrides the single tenancy namespace this backend serves.

func (*InMemoryBackend) SetNetwork

func (b *InMemoryBackend) SetNetwork(n Network)

SetNetwork wires private endpoints to an OCI Core VCN/subnet source.

func (*InMemoryBackend) SetObjectEventSink

func (b *InMemoryBackend) SetObjectEventSink(fn func(ObjectEvent))

SetObjectEventSink installs the receiver of object events; it is called outside the backend lock.

func (*InMemoryBackend) SetTagLookup

func (b *InMemoryBackend) SetTagLookup(fn ocitags.Lookup)

SetTagLookup wires defined-tag validation against a tag namespace source (OCI Identity); nil accepts any namespace.

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serialises the backend state, including registered API keys.

func (*InMemoryBackend) SweepAsync

func (b *InMemoryBackend) SweepAsync() int

SweepAsync applies due replication tasks and completes due cross-region copies on the backend clock.

func (*InMemoryBackend) SweepLifecycle

func (b *InMemoryBackend) SweepLifecycle() int

SweepLifecycle applies every enabled lifecycle rule using the backend clock and returns the actions taken.

func (*InMemoryBackend) UpdateBucket

func (b *InMemoryBackend) UpdateBucket(ns, name string, in UpdateBucketInput, pre Preconds) (*BucketWire, error)

UpdateBucket applies a partial update.

func (*InMemoryBackend) UpdateNamespaceMetadata

func (b *InMemoryBackend) UpdateNamespaceMetadata(ns string, in nsMetaWire) (nsMetaWire, error)

UpdateNamespaceMetadata sets the default S3 / Swift compartments.

func (*InMemoryBackend) UpdatePrivateEndpoint

func (b *InMemoryBackend) UpdatePrivateEndpoint(
	ns, name string, in UpdatePrivateEndpointInput, pre Preconds,
) (string, error)

UpdatePrivateEndpoint replaces the given fields of a private endpoint and returns its work request id.

func (*InMemoryBackend) UpdateRetention

func (b *InMemoryBackend) UpdateRetention(
	ns, bucket, id string,
	in RetentionInput,
	pre Preconds,
) (RetentionWire, error)

UpdateRetention modifies a rule; a locked rule can only be lengthened.

func (*InMemoryBackend) UpdateStorageTier

func (b *InMemoryBackend) UpdateStorageTier(ns, bucket, name, versionID, tier string) error

UpdateStorageTier changes an object's tier.

func (*InMemoryBackend) UploadPart

func (b *InMemoryBackend) UploadPart(
	ns, bucket, object, id string, num int, data []byte, contentMD5 string,
) (string, string, error)

UploadPart stores one part and returns its etag and md5.

func (*InMemoryBackend) UploadPartWith

func (b *InMemoryBackend) UploadPartWith(
	ns, bucket, object, id string, num int, data []byte, opt PartOptions,
) (PartResult, error)

UploadPartWith stores one part, replacing any earlier part with the same number.

type Lifecycle

type Lifecycle struct {
	TimeCreated time.Time       `json:"timeCreated"`
	Items       []LifecycleRule `json:"items"`
}

Lifecycle is a bucket's lifecycle policy.

type LifecycleRule

type LifecycleRule struct {
	ObjectNameFilter *NameFilter `json:"objectNameFilter,omitempty"`
	Target           *string     `json:"target,omitempty"`
	Name             string      `json:"name"`
	Action           string      `json:"action"`
	TimeUnit         string      `json:"timeUnit"`
	TimeAmount       int64       `json:"timeAmount"`
	IsEnabled        bool        `json:"isEnabled"`
}

LifecycleRule is one object lifecycle rule.

type LifecycleWire

type LifecycleWire struct {
	TimeCreated time.Time       `json:"timeCreated"`
	Items       []LifecycleRule `json:"items"`
}

LifecycleWire is the ObjectLifecyclePolicy body.

type ListOptions

type ListOptions struct {
	Prefix, Start, End, StartAfter, Delimiter, Page string
	Limit                                           int
}

ListOptions are the ListObjects / ListObjectVersions query parameters.

type NameFilter

type NameFilter struct {
	InclusionPatterns []string `json:"inclusionPatterns,omitempty"`
	ExclusionPatterns []string `json:"exclusionPatterns,omitempty"`
	InclusionPrefixes []string `json:"inclusionPrefixes,omitempty"`
}

NameFilter restricts a lifecycle rule to matching object names.

type Network

type Network struct {
	Subnet    func(id string) (SubnetInfo, bool)
	CreateNic func(NicRequest) (Nic, error)
	DeleteNic func(vnicID string)
}

Network is the in-process view of OCI Core that private endpoints depend on.

type Nic

type Nic struct {
	VnicID    string
	IPAddress string
}

Nic is the VNIC and private IP created for a private endpoint.

type NicRequest

type NicRequest struct {
	CompartmentID string
	AD            string
	SubnetID      string
	DisplayName   string
	IPAddress     string
	NsgIDs        []string
}

NicRequest asks the network service for the VNIC that backs a private endpoint.

type Object

type Object struct {
	TimeCreated    time.Time  `json:"timeCreated"`
	TimeModified   time.Time  `json:"timeModified"`
	RestoreReadyAt time.Time  `json:"restoreReadyAt"`
	RestoreExpiry  time.Time  `json:"restoreExpiry"`
	TimeArchived   time.Time  `json:"timeArchived,omitzero"`
	Checksum       Checksum   `json:"checksum,omitzero"`
	Meta           ObjectMeta `json:"meta"`
	Name           string     `json:"name"`
	VersionID      string     `json:"versionId"`
	Etag           string     `json:"etag"`
	MD5            string     `json:"md5"`
	MultipartMD5   string     `json:"multipartMd5,omitempty"`
	SseKeySha256   string     `json:"sseKeySha256,omitempty"`
	KmsKeyID       string     `json:"kmsKeyId,omitempty"`
	Data           []byte     `json:"data"`
	IsDeleteMarker bool       `json:"isDeleteMarker"`
}

Object is one stored version of an object (or a delete marker).

type ObjectEvent

type ObjectEvent struct {
	Time          time.Time
	EventType     string
	CompartmentID string
	Namespace     string
	BucketName    string
	BucketID      string
	ObjectName    string
	ETag          string
}

ObjectEvent describes an object state change in a bucket with objectEventsEnabled.

type ObjectInfo

type ObjectInfo struct {
	Archival string
	Object
}

ObjectInfo is an object version plus its archival state evaluated at read time.

type ObjectMeta

type ObjectMeta struct {
	Metadata           map[string]string `json:"metadata,omitempty"`
	ContentType        string            `json:"contentType,omitempty"`
	ContentLanguage    string            `json:"contentLanguage,omitempty"`
	ContentEncoding    string            `json:"contentEncoding,omitempty"`
	ContentDisposition string            `json:"contentDisposition,omitempty"`
	CacheControl       string            `json:"cacheControl,omitempty"`
	StorageTier        string            `json:"storageTier,omitempty"`
}

ObjectMeta is the user-settable metadata of an object.

type PAR

type PAR struct {
	TimeCreated         time.Time `json:"timeCreated"`
	TimeExpires         time.Time `json:"timeExpires"`
	ID                  string    `json:"id"`
	Name                string    `json:"name"`
	Token               string    `json:"token"`
	AccessType          string    `json:"accessType"`
	ObjectName          string    `json:"objectName"`
	BucketListingAction string    `json:"bucketListingAction"`
}

PAR is a pre-authenticated request.

type PARAccess

type PARAccess int

PARAccess is what a PAR token is being used for.

const (
	PARRead PARAccess = iota
	PARWrite
	PARList
)

PAR usage kinds.

type PARWire

type PARWire struct {
	TimeExpires         time.Time `json:"timeExpires"`
	TimeCreated         time.Time `json:"timeCreated"`
	ObjectName          *string   `json:"objectName"`
	AccessURI           string    `json:"accessUri,omitempty"`
	ID                  string    `json:"id"`
	Name                string    `json:"name"`
	AccessType          string    `json:"accessType"`
	BucketListingAction string    `json:"bucketListingAction,omitempty"`
}

PARWire is the PreauthenticatedRequest / PreauthenticatedRequestSummary body.

type Part

type Part struct {
	Etag        string `json:"etag"`
	MD5         string `json:"md5"`
	ChecksumAlg string `json:"checksumAlg,omitempty"`
	Checksum    string `json:"checksum,omitempty"`
	Data        []byte `json:"data"`
}

Part is one uploaded multipart part.

type PartOptions

type PartOptions struct {
	ContentMD5 string
	Checksum   ChecksumReq
	Key        SSEKey
}

PartOptions are the optional integrity and encryption inputs of UploadPart.

type PartResult

type PartResult struct {
	Etag     string
	MD5      string
	Checksum Checksum
}

PartResult is what UploadPart reports back.

type PartSummary

type PartSummary struct {
	Etag       string `json:"etag"`
	MD5        string `json:"md5"`
	Size       int64  `json:"size"`
	PartNumber int    `json:"partNumber"`
}

PartSummary is a ListMultipartUploadParts item.

type PendingCopy

type PendingCopy struct {
	SourceNS     string    `json:"sourceNs"`
	SourceBucket string    `json:"sourceBucket"`
	VersionID    string    `json:"versionId"`
	DueAt        time.Time `json:"dueAt"`
	Input        CopyInput `json:"input"`
	SseKeySha256 string    `json:"sseKeySha256,omitempty"`
	KmsKeyID     string    `json:"kmsKeyId,omitempty"`
}

PendingCopy is a cross-region copy waiting for the injectable clock to reach its due time.

type Preconds

type Preconds struct {
	IfMatch     string
	IfNoneMatch string
}

Preconds are the If-Match / If-None-Match request headers.

type PrefixFqdnsWire

type PrefixFqdnsWire struct {
	ObjectStorageAPIFqdn   string `json:"objectStorageApiFqdn"`
	S3CompatibilityAPIFqdn string `json:"s3CompatibilityApiFqdn"`
	SwiftAPIFqdn           string `json:"swiftApiFqdn"`
}

PrefixFqdnsWire is the PrefixFqdns body.

type PrivateEndpoint

type PrivateEndpoint struct {
	TimeCreated        time.Time                 `json:"timeCreated"`
	TimeModified       time.Time                 `json:"timeModified"`
	FreeformTags       map[string]string         `json:"freeformTags,omitempty"`
	DefinedTags        map[string]map[string]any `json:"definedTags,omitempty"`
	SecurityAttributes map[string]map[string]any `json:"securityAttributes,omitempty"`
	ID                 string                    `json:"id"`
	Name               string                    `json:"name"`
	CompartmentID      string                    `json:"compartmentId"`
	CreatedBy          string                    `json:"createdBy"`
	SubnetID           string                    `json:"subnetId"`
	VcnID              string                    `json:"vcnId"`
	IP                 string                    `json:"privateEndpointIp"`
	VnicID             string                    `json:"vnicId"`
	Prefix             string                    `json:"prefix"`
	Etag               string                    `json:"etag"`
	AdditionalPrefixes []string                  `json:"additionalPrefixes,omitempty"`
	NsgIDs             []string                  `json:"nsgIds,omitempty"`
	AccessTargets      []AccessTarget            `json:"accessTargets"`
}

PrivateEndpoint is a stored private endpoint.

type PrivateEndpointWire

type PrivateEndpointWire struct {
	TimeCreated        time.Time                 `json:"timeCreated"`
	TimeModified       time.Time                 `json:"timeModified"`
	FreeformTags       map[string]string         `json:"freeformTags,omitempty"`
	DefinedTags        map[string]map[string]any `json:"definedTags,omitempty"`
	SecurityAttributes map[string]map[string]any `json:"securityAttributes,omitempty"`
	Fqdns              FqdnsWire                 `json:"fqdns"`
	ID                 string                    `json:"id,omitempty"`
	Name               string                    `json:"name"`
	Namespace          string                    `json:"namespace"`
	CompartmentID      string                    `json:"compartmentId"`
	CreatedBy          string                    `json:"createdBy"`
	SubnetID           string                    `json:"subnetId,omitempty"`
	PrivateEndpointIP  string                    `json:"privateEndpointIp,omitempty"`
	Prefix             string                    `json:"prefix"`
	Etag               string                    `json:"etag"`
	LifecycleState     string                    `json:"lifecycleState"`
	AdditionalPrefixes []string                  `json:"additionalPrefixes,omitempty"`
	NsgIDs             []string                  `json:"nsgIds,omitempty"`
	AccessTargets      []AccessTarget            `json:"accessTargets,omitempty"`
}

PrivateEndpointWire is the PrivateEndpoint / PrivateEndpointSummary JSON body.

type Provider

type Provider struct{}

Provider implements service.Provider for OCI Object Storage. 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 PutOptions

type PutOptions struct {
	ContentMD5 string
	Checksum   ChecksumReq
	SSE        SSEReq
}

PutOptions are the optional integrity and encryption inputs of a write.

type ReencryptInput

type ReencryptInput struct {
	SSECustomerKey       *SSEKey `json:"sseCustomerKey"`
	SourceSSECustomerKey *SSEKey `json:"sourceSseCustomerKey"`
	KmsKeyID             string  `json:"kmsKeyId"`
}

ReencryptInput is the ReencryptObjectDetails payload.

type RenameInput

type RenameInput struct {
	SourceName   string `json:"sourceName"`
	NewName      string `json:"newName"`
	SrcIfMatch   string `json:"srcObjIfMatchETag"`
	NewIfMatch   string `json:"newObjIfMatchETag"`
	NewIfNoMatch string `json:"newObjIfNoneMatchETag"`
}

RenameInput is the RenameObjectDetails payload.

type ReplTask

type ReplTask struct {
	DueAt  time.Time `json:"dueAt"`
	Name   string    `json:"name"`
	Delete bool      `json:"delete,omitempty"`
}

ReplTask is one pending replication of an object (or of its deletion).

type ReplicationPolicy

type ReplicationPolicy struct {
	TimeCreated           time.Time `json:"timeCreated"`
	TimeLastSync          time.Time `json:"timeLastSync"`
	ID                    string    `json:"id"`
	Name                  string    `json:"name"`
	DestinationRegionName string    `json:"destinationRegionName"`
	DestinationBucketName string    `json:"destinationBucketName"`
	Status                string    `json:"status"`
	StatusMessage         string    `json:"statusMessage"`
}

ReplicationPolicy is a bucket replication policy (wire form of ReplicationPolicy / ReplicationPolicySummary).

type ReplicationSource

type ReplicationSource struct {
	PolicyName       string `json:"policyName"`
	SourceRegionName string `json:"sourceRegionName"`
	SourceBucketName string `json:"sourceBucketName"`
}

ReplicationSource marks a bucket as the read-only destination of a policy.

type Retention

type Retention struct {
	TimeCreated    time.Time  `json:"timeCreated"`
	TimeModified   time.Time  `json:"timeModified"`
	TimeRuleLocked *time.Time `json:"timeRuleLocked,omitempty"`
	ID             string     `json:"id"`
	DisplayName    string     `json:"displayName"`
	Etag           string     `json:"etag"`
	Unit           string     `json:"unit,omitempty"`
	Amount         int64      `json:"amount"`
	HasDuration    bool       `json:"hasDuration"`
}

Retention is a bucket retention rule.

type RetentionInput

type RetentionInput struct {
	TimeRuleLocked *time.Time `json:"timeRuleLocked"`
	Duration       *Duration  `json:"duration"`
	DisplayName    string     `json:"displayName"`
}

RetentionInput is Create/UpdateRetentionRuleDetails.

type RetentionWire

type RetentionWire struct {
	TimeCreated    time.Time  `json:"timeCreated"`
	TimeModified   time.Time  `json:"timeModified"`
	TimeRuleLocked *time.Time `json:"timeRuleLocked,omitempty"`
	Duration       *Duration  `json:"duration,omitempty"`
	ID             string     `json:"id"`
	DisplayName    string     `json:"displayName"`
	Etag           string     `json:"etag"`
}

RetentionWire is the RetentionRule body.

type SSEKey

type SSEKey struct {
	Algorithm string `json:"algorithm"`
	Key       string `json:"key"`
	KeySha256 string `json:"keySha256"`
}

SSEKey is a customer-supplied encryption key as sent on the wire (sseCustomerKey / opc-sse-customer-* headers).

type SSEReq

type SSEReq struct {
	KmsKeyID string
	Key      SSEKey
}

SSEReq is the encryption selection of a write: an SSE-C key or a Vault key OCID.

type Settings

type Settings struct {
	Namespace string `` //nolint:lll // config struct tags are intentionally verbose
	/* 193-byte string literal not displayed */
	Port int `` //nolint:lll // config struct tags are intentionally verbose
	/* 202-byte string literal not displayed */
	EnforceAuth bool `` //nolint:lll // config struct tags are intentionally verbose
	/* 236-byte string literal not displayed */
}

Settings holds service-level configuration, embedded in the root CLI command as CLI.OCIObjectStorage.

func DefaultSettings

func DefaultSettings() Settings

DefaultSettings returns the settings used when no ConfigProvider is available.

type SubnetInfo

type SubnetInfo struct {
	VcnID         string
	AD            string
	CompartmentID string
}

SubnetInfo is the part of an OCI Core subnet a private endpoint needs.

type UpdateBucketInput

type UpdateBucketInput struct {
	Metadata            map[string]string         `json:"metadata"`
	FreeformTags        map[string]string         `json:"freeformTags"`
	DefinedTags         map[string]map[string]any `json:"definedTags"`
	ObjectEventsEnabled *bool                     `json:"objectEventsEnabled"`
	IsBucketKeyEnabled  *bool                     `json:"isBucketKeyEnabled"`
	Name                string                    `json:"name"`
	PublicAccessType    string                    `json:"publicAccessType"`
	KmsKeyID            string                    `json:"kmsKeyId"`
	Versioning          string                    `json:"versioning"`
	AutoTiering         string                    `json:"autoTiering"`
	CompartmentID       string                    `json:"compartmentId"`
}

UpdateBucketInput is the UpdateBucketDetails payload; nil/empty fields are left unchanged.

type UpdatePrivateEndpointInput

type UpdatePrivateEndpointInput struct {
	FreeformTags       map[string]string         `json:"freeformTags"`
	DefinedTags        map[string]map[string]any `json:"definedTags"`
	SecurityAttributes map[string]map[string]any `json:"securityAttributes"`
	Name               *string                   `json:"name"`
	Namespace          *string                   `json:"namespace"`
	AccessTargets      []AccessTarget            `json:"accessTargets"`
}

UpdatePrivateEndpointInput is the UpdatePrivateEndpointDetails payload; absent fields are left unchanged.

type Upload

type Upload struct {
	TimeCreated time.Time    `json:"timeCreated"`
	Parts       map[int]Part `json:"parts"`
	ID          string       `json:"id"`
	Object      string       `json:"object"`
	Meta        ObjectMeta   `json:"meta"`
	ChecksumAlg string       `json:"checksumAlg,omitempty"`
	SseKeySha   string       `json:"sseKeySha256,omitempty"`
	KmsKeyID    string       `json:"kmsKeyId,omitempty"`
}

Upload is an in-flight multipart upload.

type UploadOptions

type UploadOptions struct {
	Algorithm string
	SSE       SSEReq
}

UploadOptions are the opc-checksum-algorithm and encryption headers of CreateMultipartUpload.

type UploadWire

type UploadWire struct {
	TimeCreated time.Time `json:"timeCreated"`
	Namespace   string    `json:"namespace"`
	Bucket      string    `json:"bucket"`
	Object      string    `json:"object"`
	UploadID    string    `json:"uploadId"`
	StorageTier string    `json:"storageTier,omitempty"`
}

UploadWire is the MultipartUpload JSON body.

func UploadInfo

func UploadInfo(ns, bucket string, u *Upload) UploadWire

UploadInfo returns the wire form of a freshly created upload.

type WorkRequest

type WorkRequest struct {
	TimeAccepted  time.Time    `json:"timeAccepted"`
	TimeFinished  time.Time    `json:"timeFinished"`
	Pending       *PendingCopy `json:"pending,omitempty"`
	ID            string       `json:"id"`
	OperationType string       `json:"operationType"`
	Status        string       `json:"status"`
	CompartmentID string       `json:"compartmentId"`
	EntityURI     string       `json:"entityUri"`
	EntityType    string       `json:"entityType,omitempty"`
	ActionType    string       `json:"actionType,omitempty"`
	EntityID      string       `json:"entityId,omitempty"`
	Message       string       `json:"message,omitempty"`
}

WorkRequest records an asynchronous operation (copy, reencrypt).

type WorkRequestResource

type WorkRequestResource struct {
	EntityType string `json:"entityType"`
	ActionType string `json:"actionType"`
	EntityURI  string `json:"entityUri"`
	Identifier string `json:"identifier,omitempty"`
}

WorkRequestResource is an entity touched by a work request.

type WorkRequestWire

type WorkRequestWire struct {
	TimeAccepted    time.Time             `json:"timeAccepted"`
	TimeStarted     time.Time             `json:"timeStarted"`
	TimeFinished    time.Time             `json:"timeFinished"`
	OperationType   string                `json:"operationType"`
	Status          string                `json:"status"`
	ID              string                `json:"id"`
	CompartmentID   string                `json:"compartmentId"`
	Resources       []WorkRequestResource `json:"resources"`
	PercentComplete float32               `json:"percentComplete"`
}

WorkRequestWire is the WorkRequest / WorkRequestSummary body.

Jump to

Keyboard shortcuts

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