• Get the basic configuration definitions for Database specific settings

    Parameters

    • variables: Dict<undefined | string> = process.env

      process.env variables or custom provided values

    • Optional logger: LoggerFn

    Returns {
        dbGqlRole: (() => string);
        dbLogin: (() => string);
        dbLoginConnectionString: (() => string);
        dbLoginPassword: (() => string);
        dbName: (() => string);
        dbOwner: (() => string);
        dbOwnerConnectionString: (() => string);
        dbOwnerPassword: (() => string);
        dbOwnerReplicationConnectionString: (() => string);
        dbShadowConnectionString: (() => string);
        pgHost: (() => string);
        pgPoolMaxConnections: (() => number);
        pgPort: (() => number);
        pgReplicationPort: (() => number);
        pgRoot: (() => undefined | string);
        pgRootConnectionString: (() => string);
        pgRootPassword: (() => undefined | string);
        pgSSLMode: (() => "require" | "allow" | "disable" | "prefer" | "verify-ca" | "verify-full");
        pgUserSuffix: (() => string);
    }

    The following configuration values are included:

    pgHost // e.g. POSTGRESQL_HOST=localhost
    pgPort // e.g. POSTGRESQL_PORT=5432
    pgUserSuffix // e.g. POSTGRESQL_USER_SUFFIX=@azure-suffix
    pgSSLMode // e.g. PGSSLMODE=require
    pgRoot // e.g. POSTGRESQL_ROOT=postgres
    pgRootPassword // e.g. POSTGRESQL_ROOT_PASSWORD=C~iZ[r0U-]wYdHXm>T
    dbName // e.g. DATABASE_NAME=my_business_service
    dbOwner // e.g. DATABASE_OWNER=my_business_owner
    dbOwnerPassword // e.g. DATABASE_OWNER_PASSWORD=x4HKTiFEY]iDov!+a
    dbLogin // e.g. DATABASE_LOGIN=my_business_login
    dbLoginPassword // e.g. DATABASE_LOGIN_PASSWORD=Cl1sJh56n'>caX@7[,
    dbGqlRole // e.g. DATABASE_GQL_ROLE=my_business_gql_role
    pgPoolMaxConnections // e.g. PG_POOL_MAX_CONNECTIONS=25
    pgRootConnectionString // calculated from the above settings
    dbOwnerConnectionString // calculated from the above settings
    dbOwnerReplicationConnectionString // calculated from the above settings
    dbShadowConnectionString // calculated from the above settings
    dbLoginConnectionString // calculated from the above settings
    • dbGqlRole: (() => string)
        • (): string
        • Returns string

          Example

          DATABASE_GQL_ROLE=my_business_gql_role
          
    • dbLogin: (() => string)
        • (): string
        • Returns string

          Example

          DATABASE_LOGIN=my_business_login
          
    • dbLoginConnectionString: (() => string)
        • (): string
        • calculated from env variables: POSTGRESQL_* and DATABASE_*

          Returns string

    • dbLoginPassword: (() => string)
        • (): string
        • Returns string

          Example

          DATABASE_LOGIN_PASSWORD=Cl1sJh56n'>caX@7[,
          
    • dbName: (() => string)
        • (): string
        • Returns string

          Example

          DATABASE_NAME=my_business_service
          
    • dbOwner: (() => string)
        • (): string
        • Returns string

          Example

          DATABASE_OWNER=my_business_owner
          
    • dbOwnerConnectionString: (() => string)
        • (): string
        • calculated from env variables: POSTGRESQL_* and DATABASE_*

          Returns string

    • dbOwnerPassword: (() => string)
        • (): string
        • Returns string

          Example

          DATABASE_OWNER_PASSWORD=x4HKTiFEY]iDov!+a
          
    • dbOwnerReplicationConnectionString: (() => string)
        • (): string
        • calculated from env variables: POSTGRESQL_* and DATABASE_* using POSTGRESQL_REPLICATION_PORT

          Returns string

    • dbShadowConnectionString: (() => string)
        • (): string
        • calculated from env variables: POSTGRESQL_* and DATABASE_*

          Returns string

    • pgHost: (() => string)
        • (): string
        • Returns string

          Example

          POSTGRESQL_HOST=localhost
          
    • pgPoolMaxConnections: (() => number)
        • (): number
        • Returns number

          Example

          PG_POOL_MAX_CONNECTIONS=25
          
    • pgPort: (() => number)
        • (): number
        • Returns number

          Example

          POSTGRESQL_PORT=5432
          
    • pgReplicationPort: (() => number)
        • (): number
        • Returns number

          Example

          POSTGRESQL_PORT=5432
          
    • pgRoot: (() => undefined | string)
        • (): undefined | string
        • Returns undefined | string

          Example

          POSTGRESQL_ROOT=postgres
          
    • pgRootConnectionString: (() => string)
        • (): string
        • calculated from env variables: POSTGRESQL_* and DATABASE_*

          Returns string

    • pgRootPassword: (() => undefined | string)
        • (): undefined | string
        • Returns undefined | string

          Example

          POSTGRESQL_ROOT_PASSWORD=C~iZ[r0U-]wYdHXm>T
          
    • pgSSLMode: (() => "require" | "allow" | "disable" | "prefer" | "verify-ca" | "verify-full")
        • (): "require" | "allow" | "disable" | "prefer" | "verify-ca" | "verify-full"
        • Returns "require" | "allow" | "disable" | "prefer" | "verify-ca" | "verify-full"

          Example

          PGSSLMODE=require
          
    • pgUserSuffix: (() => string)
        • (): string
        • Returns string

          Example

          POSTGRESQL_USER_SUFFIX=@azure-suffix
          

Generated using TypeDoc