@akadenia/azure
v1.2.3
Published
Azure storage utility methods
Downloads
53
Maintainers
Readme
Classes
QueueStorage
QueueStorage - A class that contains azure queue storage helpers
Kind: global class
- QueueStorage
- .getQueueClient() ⇒ QueueClient
- .sendMessage(message) ⇒ Promise.<any>
queueStorage.getQueueClient() ⇒ QueueClient
Kind: instance method of QueueStorage Returns: QueueClient - - A QueueClient object
queueStorage.sendMessage(message) ⇒ Promise.<any>
Kind: instance method of QueueStorage Returns: Promise.<any> - - The response from the queue
| Param | Type | Description | | --- | --- | --- | | message | string | The message to send |
BlobStorage
BlobStorage - A class that contains azure blob storage helpers
Kind: global class
- BlobStorage
- .getBlobServiceUrl() ⇒ BlobServiceClient
- .listBlobs(containerName, blobNamePrefix) ⇒ Promise.<Array.<BlobItem>>
- .downloadBlob(containerName, blobName) ⇒ Promise.<Buffer>
- .blobExists(containerName, blobName) ⇒ Promise.<boolean>
- .upload(containerName, blobName, body, contentLength, contentType) ⇒ Promise.<boolean>
- .uploadData(containerName, blobName, data, bufferSize) ⇒ Promise.<boolean>
- .uploadStream(containerName, blobName, stream, bufferSize) ⇒ Promise.<boolean>
- .generateSASUrl(containerName, blobName, sasOptions) ⇒ string
blobStorage.getBlobServiceUrl() ⇒ BlobServiceClient
Kind: instance method of BlobStorage Returns: BlobServiceClient - - A BlobServiceClient object
blobStorage.listBlobs(containerName, blobNamePrefix) ⇒ Promise.<Array.<BlobItem>>
Kind: instance method of BlobStorage Returns: Promise.<Array.<BlobItem>> - - An array of BlobItem objects
| Param | Type | Description | | --- | --- | --- | | containerName | string | The name of the container to check | | blobNamePrefix | string | The prefix of the blob name |
blobStorage.downloadBlob(containerName, blobName) ⇒ Promise.<Buffer>
Kind: instance method of BlobStorage Returns: Promise.<Buffer> - - A Buffer object
| Param | Type | Description | | --- | --- | --- | | containerName | string | The name of the container to download from | | blobName | string | The name of the blob to download |
blobStorage.blobExists(containerName, blobName) ⇒ Promise.<boolean>
Kind: instance method of BlobStorage Returns: Promise.<boolean> - - A boolean indicating whether or not the blob exists
| Param | Type | Description | | --- | --- | --- | | containerName | string | The name of the container to check | | blobName | string | The name of the blob to check |
blobStorage.upload(containerName, blobName, body, contentLength, contentType) ⇒ Promise.<boolean>
Kind: instance method of BlobStorage Returns: Promise.<boolean> - - A boolean indicating whether or not the blob was successfully uploaded
| Param | Type | Description | | --- | --- | --- | | containerName | string | The name of the container to upload to | | blobName | string | The name of the blob to upload | | body | HttpRequestBody | The body of the blob | | contentLength | string | The content length | | contentType | string | The content type of the blob |
blobStorage.uploadData(containerName, blobName, data, bufferSize) ⇒ Promise.<boolean>
Kind: instance method of BlobStorage Returns: Promise.<boolean> - - A boolean indicating whether or not the blob was successfully uploaded
| Param | Type | Description | | --- | --- | --- | | containerName | string | The name of the container to upload to | | blobName | string | The name of the blob to upload | | data | | Buffer | Blob | ArrayBuffer | ArrayBufferView | | bufferSize | | Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB |
blobStorage.uploadStream(containerName, blobName, stream, bufferSize) ⇒ Promise.<boolean>
Kind: instance method of BlobStorage Returns: Promise.<boolean> - - A boolean indicating whether or not the blob was successfully uploaded
| Param | Type | Description | | --- | --- | --- | | containerName | string | The name of the container to upload to | | blobName | string | The name of the blob to upload | | stream | | Node.js Readable stream | | bufferSize | | Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB |
blobStorage.generateSASUrl(containerName, blobName, sasOptions) ⇒ string
Kind: instance method of BlobStorage Returns: string - -The URL for the blob.
| Param | Type | Description | | --- | --- | --- | | containerName | string | The name of the blob container. | | blobName | string | The name of the blob. | | sasOptions | SASOptions | The options used for generating the SAS query. |