RawStore
RawStore defines a low level interface for accessing and storing bytes.
Methods
GetBaseContainerFQN()
@classmethod
def GetBaseContainerFQN(
ctx: context.Context
) - > [DataReference](datareference.md?sid=flytestdlib_storage_datareference)
Returns a FQN DataReference with the configured base init container
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, typically used for cancellation and deadlines. |
Returns
| Type | Description |
|---|---|
[DataReference](datareference.md?sid=flytestdlib_storage_datareference) | A fully qualified name (FQN) DataReference representing the base initialization container. |
CreateSignedURL()
@classmethod
def CreateSignedURL(
ctx: context.Context,
reference: [DataReference](datareference.md?sid=flytestdlib_storage_datareference),
properties: [SignedURLProperties](signedurlproperties.md?sid=flytestdlib_storage_signedurlproperties)
) - > ([SignedURLResponse](signedurlresponse.md?sid=flytestdlib_storage_signedurlresponse), error)
Creates a signed url with the provided properties.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, typically used for cancellation and deadlines. |
| reference | [DataReference](datareference.md?sid=flytestdlib_storage_datareference) | The DataReference pointing to the resource for which the signed URL is to be created. |
| properties | [SignedURLProperties](signedurlproperties.md?sid=flytestdlib_storage_signedurlproperties) | Properties defining the signed URL, such as expiration time and permissions. |
Returns
| Type | Description |
|---|---|
([SignedURLResponse](signedurlresponse.md?sid=flytestdlib_storage_signedurlresponse), error) | A SignedURLResponse containing the generated signed URL and an error if the operation failed. |
Head()
@classmethod
def Head(
ctx: context.Context,
reference: [DataReference](datareference.md?sid=flytestdlib_storage_datareference)
) - > ([Metadata](../../flyteplugins/go/tasks/pluginmachinery/catalog/metadata.md?sid=flyteplugins_go_tasks_pluginmachinery_catalog_metadata), error)
Gets metadata about the reference. This should generally be a light weight operation.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, typically used for cancellation and deadlines. |
| reference | [DataReference](datareference.md?sid=flytestdlib_storage_datareference) | The DataReference to retrieve metadata for. |
Returns
| Type | Description |
|---|---|
([Metadata](../../flyteplugins/go/tasks/pluginmachinery/catalog/metadata.md?sid=flyteplugins_go_tasks_pluginmachinery_catalog_metadata), error) | Metadata associated with the DataReference and an error if the operation failed. |
List()
@classmethod
def List(
ctx: context.Context,
reference: [DataReference](datareference.md?sid=flytestdlib_storage_datareference),
maxItems: int,
cursor: [Cursor](cursor.md?sid=flytestdlib_storage_cursor)
) - > ([][DataReference](datareference.md?sid=flytestdlib_storage_datareference), [Cursor](cursor.md?sid=flytestdlib_storage_cursor), error)
Gets a list of items (relative path to the reference input) given a prefix, using a paginated API
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, typically used for cancellation and deadlines. |
| reference | [DataReference](datareference.md?sid=flytestdlib_storage_datareference) | The DataReference representing the base path or prefix to list items under. |
| maxItems | int | The maximum number of items to return in a single page. |
| cursor | [Cursor](cursor.md?sid=flytestdlib_storage_cursor) | A pagination cursor to retrieve the next set of results. |
Returns
| Type | Description |
|---|---|
([][DataReference](datareference.md?sid=flytestdlib_storage_datareference), [Cursor](cursor.md?sid=flytestdlib_storage_cursor), error) | A slice of DataReferences representing the listed items, a Cursor for pagination, and an error if the operation failed. |
ReadRaw()
@classmethod
def ReadRaw(
ctx: context.Context,
reference: [DataReference](datareference.md?sid=flytestdlib_storage_datareference)
) - > (io.ReadCloser, error)
Retrieves a byte array from the Blob store or an error
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, typically used for cancellation and deadlines. |
| reference | [DataReference](datareference.md?sid=flytestdlib_storage_datareference) | The DataReference pointing to the raw data to be read. |
Returns
| Type | Description |
|---|---|
(io.ReadCloser, error) | An io.ReadCloser to read the raw byte data and an error if the operation failed. |
WriteRaw()
@classmethod
def WriteRaw(
ctx: context.Context,
reference: [DataReference](datareference.md?sid=flytestdlib_storage_datareference),
size: int64,
opts: [Options](../../flyteplugins/go/tasks/pluginmachinery/k8s/options.md?sid=flyteplugins_go_tasks_pluginmachinery_k8s_options),
raw: io.Reader
) - > error
Stores a raw byte array.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, typically used for cancellation and deadlines. |
| reference | [DataReference](datareference.md?sid=flytestdlib_storage_datareference) | The DataReference specifying where to store the raw data. |
| size | int64 | The size of the raw byte array to be written. |
| opts | [Options](../../flyteplugins/go/tasks/pluginmachinery/k8s/options.md?sid=flyteplugins_go_tasks_pluginmachinery_k8s_options) | Options for the write operation, such as content type or metadata. |
| raw | io.Reader | An io.Reader providing the raw byte data to be stored. |
Returns
| Type | Description |
|---|---|
error | An error if the operation failed, otherwise nil. |
CopyRaw()
@classmethod
def CopyRaw(
ctx: context.Context,
source: [DataReference](datareference.md?sid=flytestdlib_storage_datareference),
destination: [DataReference](datareference.md?sid=flytestdlib_storage_datareference),
opts: [Options](../../flyteplugins/go/tasks/pluginmachinery/k8s/options.md?sid=flyteplugins_go_tasks_pluginmachinery_k8s_options)
) - > error
Copies from source to destination.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, typically used for cancellation and deadlines. |
| source | [DataReference](datareference.md?sid=flytestdlib_storage_datareference) | The DataReference pointing to the source data to be copied. |
| destination | [DataReference](datareference.md?sid=flytestdlib_storage_datareference) | The DataReference specifying the destination for the copied data. |
| opts | [Options](../../flyteplugins/go/tasks/pluginmachinery/k8s/options.md?sid=flyteplugins_go_tasks_pluginmachinery_k8s_options) | Options for the copy operation, such as metadata to apply to the destination. |
Returns
| Type | Description |
|---|---|
error | An error if the operation failed, otherwise nil. |
Delete()
@classmethod
def Delete(
ctx: context.Context,
reference: [DataReference](datareference.md?sid=flytestdlib_storage_datareference)
) - > error
Removes the referenced data from the blob store.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, typically used for cancellation and deadlines. |
| reference | [DataReference](datareference.md?sid=flytestdlib_storage_datareference) | The DataReference pointing to the data to be deleted. |
Returns
| Type | Description |
|---|---|
error | An error if the operation failed, otherwise nil. |