UNPKG

@allthings/cloud-toolkit

Version:

Standardizes the setup of aws, datadog and other things

22 lines (21 loc) 725 B
import { SSMClientConfig } from '@aws-sdk/client-ssm'; import { Logger } from 'winston'; export interface IParameterStore { clientConfig?: SSMClientConfig; endpoint?: string; logger?: Logger; onlyDefault?: boolean; prefix?: string; } interface IParameter { name: string; value: string; } export type TGetSecret = (parameter: string, defaultValue?: string) => Promise<string>; export type TGetSecrets = (parameters: string[], defaultValues?: IParameter[]) => Promise<IParameter[]>; export declare const DEFAULT_CLIENT_CONFIG: IParameterStore; declare const parameterStore: (userConfig: IParameterStore) => { getSecret: TGetSecret; getSecrets: TGetSecrets; }; export default parameterStore;