@goldstack/template-s3
Version:
Building blocks for linking a package to an AWS S3 bucket.
28 lines • 1.11 kB
TypeScript
import { S3Client } from '@aws-sdk/client-s3';
/**
* Type for the createS3Client function from mock-aws-s3-v3
*/
export type CreateS3ClientSignature = (options: {
localDirectory: string;
s3Client?: S3Client;
bucket: string;
}) => S3Client;
/**
* Gets a mocked S3 client for local development
*/
export declare const getMockedS3: (goldstackConfig: any, bucket?: string) => S3Client;
/**
* Gets the local bucket name for a given configuration
*/
export declare function getLocalBucketName(goldstackConfig: any): string;
/**
* Gets the local bucket URL for a given configuration
*/
export declare function getLocalBucketUrl(goldstackConfig: any): string;
/**
* Connects to S3, using a mocked client for local deployment or a real S3 client for other environments
*/
export declare function connect(goldstackConfig: any, packageSchema: any, bucket?: string): Promise<S3Client>;
export declare const isMocked: (client: S3Client) => boolean;
export declare function resetMocksIfRequired(deploymentName: string | undefined, goldstackConfig: any): void;
//# sourceMappingURL=connectLocal.d.ts.map