Akadenia Azure
Installation
npm install @akadenia/azure --save
Classes
QueueStorage
QueueStorage - A class that contains azure queue storage helpers
Kind: global class
- QueueStorage
- .getQueueClient() ⇒
QueueClient
- .sendMessage(message) ⇒
Promise.<any>
- .getQueueClient() ⇒
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
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 | |
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. |