Uploader
No overview available.
Methods
handleSimpleType()
@classmethod
def handleSimpleType(
_: context.Context,
t: core.SimpleType,
filePath: string
) - > *core.Literal, error
Handles the upload of a simple type, converting it into a core.Literal.
Parameters
| Name | Type | Description |
|---|---|---|
| _ | context.Context | The context for the operation, typically used for cancellation and deadlines. |
| t | core.SimpleType | The simple type to be handled and converted. |
| filePath | string | The file path associated with the simple type, if applicable. |
Returns
| Type | Description |
|---|---|
*core.Literal, error | A pointer to a core.Literal representing the uploaded simple type, and an error if the operation fails. |
handleBlobType()
@classmethod
def handleBlobType(
ctx: context.Context,
localPath: string,
toPath: storage.DataReference
) - > *core.Literal, error
Handles the upload of a blob type from a local path to a specified data reference, returning a core.Literal.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and deadlines. |
| localPath | string | The local file path of the blob to be uploaded. |
| toPath | storage.DataReference | The destination data reference where the blob should be uploaded. |
Returns
| Type | Description |
|---|---|
*core.Literal, error | A pointer to a core.Literal representing the uploaded blob, and an error if the upload fails. |
RecursiveUpload()
@classmethod
def RecursiveUpload(
ctx: context.Context,
vars: *core.VariableMap,
fromPath: string,
metaOutputPath: storage.DataReference,
dataRawPath: storage.DataReference
) - > error
Recursively uploads data from a local path, processing variables and storing metadata and raw data at specified references.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and deadlines. |
| vars | *core.VariableMap | A pointer to a VariableMap containing variables to be processed during the upload. |
| fromPath | string | The local directory or file path from which data will be recursively uploaded. |
| metaOutputPath | storage.DataReference | The data reference where metadata generated during the upload should be stored. |
| dataRawPath | storage.DataReference | The data reference where the raw uploaded data should be stored. |
Returns
| Type | Description |
|---|---|
error | An error if the recursive upload operation fails, otherwise nil. |