UNPKG

@allthings/cloud-toolkit

Version:

Standardizes the setup of aws, Datadog and other things

23 lines (22 loc) 790 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; export interface IParameterStoreInstance { getSecret: TGetSecret; getSecrets: TGetSecrets; } declare const parameterStore: (userConfig: IParameterStore) => IParameterStoreInstance; export default parameterStore;