Needlessly Provoking Marsupials
    Wondering what’s next for npm?Check out our public roadmap! »

    @tractorzoom/secrets-manager

    2.9.24 • Public • Published

    @tractorzoom/secrets-manager

    Extracted common secret getters

    Commitizen friendly jest Prettier Renovate enabled semantic-release

    pull_request_verify publish

    Available Methods

    Method: getSecret()
    parameter type description
    secretId String The key for which you need the secrets values from aws secrets manager
    Method: getTractorZoomConnectionInfo()
    parameter type description
    None --- ---

    Retrieves the necessary database connection parameters for creating, reading, updating, and deleting data in the TractorZoom database for the runtime environment

    Method: getIronCompsConnectionInfo()
    parameter type description
    None --- ---

    Retrieves the necessary database connection parameters for creating, reading, updating, and deleting data in the IronComps database for the runtime environment

    How do I use? 🤔

    Installation:
    npm i @tractorzoom/secrets-manager
    Usage:
    import { getSecret } from '@tractorzoom/secrets-manager';
    
    export const getSuperTopSecretInformation = async () => {
        const secretsManagerKey = 'something-very-secret';
        const superTopSecretValue = await getSecret(secretsManagerKey);
        return superTopSecretValue;
    };
    import { getIronCompsConnectionInfo } from '@tractorzoom/secrets-manager';
    import { executeQuery } from '@tractorzoom/serverless-mysql-utils';
    
    export const getItems = async () => {
        const dbConfig = await getIronCompsConnectionInfo();
        const queryString = `SELECT * FROM MyTable WHERE id = "some-guid"`;
    
        return await executeQuery(queryString, dbConfig);
    };
    import { getTractorZoomConnectionInfo } from '@tractorzoom/secrets-manager';
    import { executeQuery } from '@tractorzoom/serverless-mysql-utils';
    
    export const getItems = async () => {
        const dbConfig = await getTractorZoomConnectionInfo();
        const queryString = `SELECT * FROM MyTable WHERE id = "some-guid"`;
    
        return await executeQuery(queryString, dbConfig);
    };

    Install

    npm i @tractorzoom/secrets-manager

    DownloadsWeekly Downloads

    249

    Version

    2.9.24

    License

    MIT

    Unpacked Size

    30.4 kB

    Total Files

    26

    Last publish

    Collaborators

    • avatar