0.4.0 • Published 4 years ago

@ethronpi/blob-storage v0.4.0

Weekly downloads
2
License
-
Repository
-
Last release
4 years ago

@ethronpi/blob-storage

NPM version Total downloads

Ethron plugin for Azure Blob Storage.

Developed in Dogma, compiled to JavaScript.

Engineered in Valencia, Spain, EU by EthronLabs.

Use

plugins:
  - plugin: "@ethronpi/blob-storage"
    name: blob
    args:
      connectionString: connection string
  • connectionString (string), the connection string to use.

Service tasks

ping

Ping the service.

[blob.ping]

Container tasks

createContainer

Create a blob container.

[blob.createContainer, container, opts]
  • container (text, required), the container name.

  • opts (object), same as ContainerCreateOptions. Additional option: ifNotExists (boolean), when true, no error raised if the container exists.

dropContainer

Delete a blob container. If the container doesn't exist, no error raised.

[blob.dropContainer, container, opts]

setContainerMetadata

Set metadata to a container.

[blob.setContainerMetadata, container, metadata]

Blob tasks

upload

Upload a file to a container.

[blob.upload, file, container, httpHeaders, metadata]

download

Download a blob from a container in an existing destination path.

[blob.download, blob, container, dst]

setMetadata

Set metadata to blob.

[blob.setMetadata, blob, container, metadata]

setAccessTier

Set the access tier to a blob.

[blob.setAccessTier, blob, container, accessTier]
  • accessTier (string), the access tier to set: Archive, Cool or Hot.

createSnapshot

Create snapshot, that is, a read-only version of a blob at this point in time.

[blob.createSnapshot, blob, container, opts]