Skip to main content

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

NameTypeDescription
_context.ContextThe context for the operation, typically used for cancellation and deadlines.
tcore.SimpleTypeThe simple type to be handled and converted.
filePathstringThe file path associated with the simple type, if applicable.

Returns

TypeDescription
*core.Literal, errorA 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

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for cancellation and deadlines.
localPathstringThe local file path of the blob to be uploaded.
toPathstorage.DataReferenceThe destination data reference where the blob should be uploaded.

Returns

TypeDescription
*core.Literal, errorA 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

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for cancellation and deadlines.
vars*core.VariableMapA pointer to a VariableMap containing variables to be processed during the upload.
fromPathstringThe local directory or file path from which data will be recursively uploaded.
metaOutputPathstorage.DataReferenceThe data reference where metadata generated during the upload should be stored.
dataRawPathstorage.DataReferenceThe data reference where the raw uploaded data should be stored.

Returns

TypeDescription
errorAn error if the recursive upload operation fails, otherwise nil.