Documentation
¶
Overview ¶
Package objectstorage provides a BinaryStore implementation backed by OCI Object Storage. Each named file maps 1:1 to an object inside the configured bucket.
Index ¶
- func NewOCIObjectStorage(log logger.Logger) binarystore.BinaryStore
- type ObjectStorage
- func (o *ObjectStorage) Close() error
- func (o *ObjectStorage) Delete(ctx context.Context, req *binarystore.DeleteRequest) error
- func (o *ObjectStorage) Features() []binarystore.Feature
- func (o *ObjectStorage) Get(ctx context.Context, req *binarystore.GetRequest) (*binarystore.GetResponse, error)
- func (o *ObjectStorage) GetComponentMetadata() (metadataInfo contribMetadata.MetadataMap)
- func (o *ObjectStorage) Init(ctx context.Context, md binarystore.Metadata) error
- func (o *ObjectStorage) Set(ctx context.Context, req *binarystore.SetRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOCIObjectStorage ¶
func NewOCIObjectStorage(log logger.Logger) binarystore.BinaryStore
NewOCIObjectStorage returns a new OCI Object Storage binary store.
Types ¶
type ObjectStorage ¶
type ObjectStorage struct {
// contains filtered or unexported fields
}
ObjectStorage implements binarystore.BinaryStore using OCI Object Storage.
func (*ObjectStorage) Close ¶
func (o *ObjectStorage) Close() error
Close releases the resources held by the underlying OCI client.
func (*ObjectStorage) Delete ¶
func (o *ObjectStorage) Delete(ctx context.Context, req *binarystore.DeleteRequest) error
Delete removes an object from OCI Object Storage. If the object does not exist, binarystore.ErrFileNotFound is returned.
func (*ObjectStorage) Features ¶
func (o *ObjectStorage) Features() []binarystore.Feature
Features returns the optional features supported by this component.
func (*ObjectStorage) Get ¶
func (o *ObjectStorage) Get(ctx context.Context, req *binarystore.GetRequest) (*binarystore.GetResponse, error)
Get downloads binary data from OCI Object Storage as a streaming reader.
func (*ObjectStorage) GetComponentMetadata ¶
func (o *ObjectStorage) GetComponentMetadata() (metadataInfo contribMetadata.MetadataMap)
GetComponentMetadata returns the metadata schema for this component.
func (*ObjectStorage) Init ¶
func (o *ObjectStorage) Init(ctx context.Context, md binarystore.Metadata) error
Init initialises the OCI Object Storage client from component metadata.
func (*ObjectStorage) Set ¶
func (o *ObjectStorage) Set(ctx context.Context, req *binarystore.SetRequest) error
Set uploads binary data to OCI Object Storage.
When req.Overwrite is false, an If-None-Match: * condition is applied so the service atomically rejects the upload if the object already exists. When req.Overwrite is true, the object is created or replaced.