Options
All
  • Public
  • Public/Protected
  • All
Menu

@egomobile/azure-storage

Index

Type aliases

BlobServiceClientProvider

BlobServiceClientProvider: (name: string) => BlobServiceClient

Type declaration

    • (name: string): BlobServiceClient
    • Provides a blob service client by name.

      Parameters

      • name: string

        The connection name.

      Returns BlobServiceClient

      The client.

ContainerClientProvider

ContainerClientProvider: (name: string, container?: Nilable<string>) => ContainerClient

Type declaration

    • (name: string, container?: Nilable<string>): ContainerClient
    • Provides a container service client by name.

      Parameters

      • name: string

        Theconnection name.

      • Optional container: Nilable<string>

      Returns ContainerClient

      The client.

GetBlobStorageClientOptions

GetBlobStorageClientOptions: (name: string) => IBlobStorageClientOptions

Type declaration

GetContainerClientOptions

GetContainerClientOptions: (name: string, container?: Nilable<string>) => IContainerClientOptions

Type declaration

Nilable

Nilable<T>: Nullable<T> | Optional<T>

A type that can be (null) or (undefined).

Type parameters

  • T: any = any

Nullable

Nullable<T>: T | null

A type that can also be (null).

Type parameters

  • T: any = any

Optional

Optional<T>: T | undefined

A type that can also be (undefined).

Type parameters

  • T: any = any

Functions

createGetBlobServiceClientFactory

  • Creates a new factory function, that provides a blob storage client by name.

    example
    import { createGetBlobServiceClientFactory } from '@egomobile/azure-storage'

    // create factory function
    const getClient = createGetBlobServiceClientFactory(() => {
    url: '<YOUR-CONNECTION-URL>'
    });

    // now get client from factory
    const client = getClient()

    Parameters

    Returns BlobServiceClientProvider

    The new factory function.

createGetContainerClientFactory

  • Creates a new factory function, that provides a container client by name and container name.

    example
    import { createGetContainerClientFactory } from '@egomobile/azure-storage'

    // create factory function
    const getClient = createGetContainerClientFactory(() => {
    url: '<YOUR-CONNECTION-URL>',
    container: 'my-container'
    });

    // now get client from factory
    const client = getClient()

    Parameters

    Returns ContainerClientProvider

    The new factory function.

Const defaultGetBlobStorageClientOptions

  • Default function, that returns the options for getting a blob storage client by name.

    The variables must have the following structure:

    • AZURE_STORAGE_CONNECTION_{NR} => the name of the connection
    • AZURE_STORAGE_CONNECTION_{NR}_URL => the connection URL

    Parameters

    • name: string

      The connection name.

    Returns IBlobStorageClientOptions

    The options.

Const defaultGetContainerClientOptions

  • Default function, that returns the options for getting a container client by name.

    The variables must have the following structure:

    • AZURE_STORAGE_CONNECTION_{NR} => the name of the connection
    • AZURE_STORAGE_CONNECTION_{NR}_CONTAINER => the default container name
    • AZURE_STORAGE_CONNECTION_{NR}_URL => the connection URL

    Parameters

    • name: string

      The connection name.

    • Optional container: Nilable<string>

    Returns IContainerClientOptions

    The options.

Const getBlobServiceClient

  • getBlobServiceClient(name: string): BlobServiceClient
  • Returns the a blob storage client, that is using environment variables to setup the client.

    example
    import { getBlobServiceClient } from '@egomobile/azure-storage'

    // setup the following environment variables:
    //
    // - AZURE_STORAGE_CONNECTION_1=my-connection
    // - AZURE_STORAGE_CONNECTION_1_CONTAINER=my_container
    // - AZURE_STORAGE_CONNECTION_1_URL=<YOUR-CONNECTION-URL>

    const client = getBlobServiceClient('my-connection')

    The variables must have the following structure:

    • AZURE_STORAGE_CONNECTION_{NR} => the name of the connection
    • AZURE_STORAGE_CONNECTION_{NR}_URL => the connection URL

    Parameters

    • name: string

    Returns BlobServiceClient

Const getContainerClient

  • getContainerClient(name: string, container?: Nilable<string>): ContainerClient
  • Returns the a container client, that is using environment variables to setup the client.

    example
    import { getContainerClient } from '@egomobile/azure-storage'

    // setup the following environment variables:
    //
    // - AZURE_STORAGE_CONNECTION_1=my-connection
    // - AZURE_STORAGE_CONNECTION_1_CONTAINER=my_container
    // - AZURE_STORAGE_CONNECTION_1_URL=<YOUR-CONNECTION-URL>

    const client = getContainerClient('my-connection')

    The variables must have the following structure:

    • AZURE_STORAGE_CONNECTION_{NR} => the name of the connection
    • AZURE_STORAGE_CONNECTION_{NR}_CONTAINER => the default container name
    • AZURE_STORAGE_CONNECTION_{NR}_URL => the connection URL

    Parameters

    • name: string
    • Optional container: Nilable<string>

    Returns ContainerClient

Generated using TypeDoc