StorageCategoryBehavior

public protocol StorageCategoryBehavior

Behavior of the Storage category that clients will use

  • Retrieve the remote URL for the object from storage.

    Declaration

    Swift

    @discardableResult
    func getURL(key: String,
                options: StorageGetURLOperation.Request.Options?,
                resultListener: StorageGetURLOperation.ResultListener?) -> StorageGetURLOperation

    Parameters

    key

    The unique identifier for the object in storage.

    options

    Parameters to specific plugin behavior

    resultListener

    Triggered when the operation is complete

    Return Value

    An operation object that provides notifications and actions related to the execution of the work

  • Retrieve the object from storage into memory.

    Declaration

    Swift

    @discardableResult
    func downloadData(key: String,
                      options: StorageDownloadDataOperation.Request.Options?,
                      progressListener: ProgressListener?,
                      resultListener: StorageDownloadDataOperation.ResultListener?) -> StorageDownloadDataOperation

    Parameters

    key

    The unique identifier for the object in storage

    options

    Options to adjust the behavior of this request, including plugin-options

    progressListener

    Triggered intermittently to represent the ongoing progress of this operation

    resultListener

    Triggered when the download is complete

    Return Value

    An operation object that provides notifications and actions related to the execution of the work

  • Download to file the object from storage.

    Declaration

    Swift

    @discardableResult
    func downloadFile(key: String,
                      local: URL,
                      options: StorageDownloadFileOperation.Request.Options?,
                      progressListener: ProgressListener?,
                      resultListener: StorageDownloadFileOperation.ResultListener?) -> StorageDownloadFileOperation

    Parameters

    key

    The unique identifier for the object in storage.

    local

    The local file to download the object to.

    options

    Parameters to specific plugin behavior

    progressListener

    Triggered intermittently to represent the ongoing progress of this operation

    resultListener

    Triggered when the download is complete

    Return Value

    An operation object that provides notifications and actions related to the execution of the work

  • Upload data to storage

    Declaration

    Swift

    @discardableResult
    func uploadData(key: String,
                    data: Data,
                    options: StorageUploadDataOperation.Request.Options?,
                    progressListener: ProgressListener?,
                    resultListener: StorageUploadDataOperation.ResultListener?) -> StorageUploadDataOperation

    Parameters

    key

    The unique identifier of the object in storage.

    data

    The data in memory to be uploaded

    options

    Parameters to specific plugin behavior

    progressListener

    Triggered intermittently to represent the ongoing progress of this operation

    resultListener

    Triggered when the upload is complete

    Return Value

    An operation object that provides notifications and actions related to the execution of the work

  • Upload local file to storage

    Declaration

    Swift

    @discardableResult
    func uploadFile(key: String,
                    local: URL,
                    options: StorageUploadFileOperation.Request.Options?,
                    progressListener: ProgressListener?,
                    resultListener: StorageUploadFileOperation.ResultListener?) -> StorageUploadFileOperation

    Parameters

    key

    The unique identifier of the object in storage.

    local

    The path to a local file.

    options

    Parameters to specific plugin behavior

    progressListener

    Triggered intermittently to represent the ongoing progress of this operation

    resultListener

    Triggered when the upload is complete

    Return Value

    An operation object that provides notifications and actions related to the execution of the work

  • Delete object from storage

    Declaration

    Swift

    @discardableResult
    func remove(key: String,
                options: StorageRemoveOperation.Request.Options?,
                resultListener: StorageRemoveOperation.ResultListener?) -> StorageRemoveOperation

    Parameters

    key

    The unique identifier of the object in storage.

    options

    Parameters to specific plugin behavior

    resultListener

    Triggered when the remove is complete

    Return Value

    An operation object that provides notifications and actions related to the execution of the work

  • List the object identifiers under the heiarchy specified by the path, relative to access level, from storage

    Declaration

    Swift

    @discardableResult
    func list(options: StorageListOperation.Request.Options?,
              resultListener: StorageListOperation.ResultListener?) -> StorageListOperation

    Parameters

    options

    Parameters to specific plugin behavior

    resultListener

    Triggered when the list is complete

    Return Value

    An operation object that provides notifications and actions related to the execution of the work

  • downloadData(key:options:) Extension method

    Retrieve the object from storage into memory.

    Declaration

    Swift

    public func downloadData(
        key: String,
        options: StorageDownloadDataRequest.Options? = nil
    ) -> StorageDownloadDataOperation

    Parameters

    key

    The unique identifier for the object in storage

    options

    Options to adjust the behavior of this request, including plugin-options

    Return Value

    An operation object that provides notifications and actions related to the execution of the work

  • Download to file the object from storage.

    Declaration

    Swift

    public func downloadFile(
        key: String,
        local: URL,
        options: StorageDownloadFileRequest.Options? = nil
    ) -> StorageDownloadFileOperation

    Parameters

    key

    The unique identifier for the object in storage.

    local

    The local file to download the object to.

    options

    Parameters to specific plugin behavior

    Return Value

    An operation object that provides notifications and actions related to the execution of the work

  • getURL(key:options:) Extension method

    Retrieve the remote URL for the object from storage.

    Declaration

    Swift

    public func getURL(
        key: String,
        options: StorageGetURLRequest.Options? = nil
    ) -> StorageGetURLOperation

    Parameters

    key

    The unique identifier for the object in storage.

    options

    Parameters to specific plugin behavior

    Return Value

    An operation object that provides notifications and actions related to the execution of the work

  • list(options:) Extension method

    List the object identifiers under the heiarchy specified by the path, relative to access level, from storage

    Declaration

    Swift

    public func list(options: StorageListRequest.Options? = nil) -> StorageListOperation

    Parameters

    options

    Parameters to specific plugin behavior

    Return Value

    An operation object that provides notifications and actions related to the execution of the work

  • remove(key:options:) Extension method

    Delete object from storage

    Declaration

    Swift

    public func remove(
        key: String,
        options: StorageRemoveRequest.Options? = nil
    ) -> StorageRemoveOperation

    Parameters

    key

    The unique identifier of the object in storage.

    options

    Parameters to specific plugin behavior

    Return Value

    An operation object that provides notifications and actions related to the execution of the work

  • Upload data to storage

    Declaration

    Swift

    public func uploadData(
        key: String,
        data: Data,
        options: StorageUploadDataRequest.Options? = nil
    ) -> StorageUploadDataOperation

    Parameters

    key

    The unique identifier of the object in storage.

    data

    The data in memory to be uploaded

    options

    Parameters to specific plugin behavior

    Return Value

    An operation object that provides notifications and actions related to the execution of the work

  • Upload local file to storage

    Declaration

    Swift

    public func uploadFile(
        key: String,
        local: URL,
        options: StorageUploadFileRequest.Options? = nil
    ) -> StorageUploadFileOperation

    Parameters

    key

    The unique identifier of the object in storage.

    local

    The path to a local file.

    options

    Parameters to specific plugin behavior

    Return Value

    An operation object that provides notifications and actions related to the execution of the work