Changes to method signatures and returns

Signed-off-by: Lucas Guarisco <lucas.guarisco@gmail.com>
This commit is contained in:
Lucas Guarisco
2023-03-06 14:49:39 -03:00
parent 1e7e20559c
commit 550d3476b9
2 changed files with 4 additions and 13 deletions
-9
View File
@@ -50,7 +50,6 @@ import { ReadUrlOptions } from '@backstage/backend-plugin-api';
import { ReadUrlResponse } from '@backstage/backend-plugin-api';
import { RequestHandler } from 'express';
import { Router } from 'express';
import { S3Client } from '@aws-sdk/client-s3';
import { SchedulerService } from '@backstage/backend-plugin-api';
import { SearchOptions } from '@backstage/backend-plugin-api';
import { SearchResponse } from '@backstage/backend-plugin-api';
@@ -74,12 +73,6 @@ export class AwsS3UrlReader implements UrlReader {
},
);
// (undocumented)
buildS3Client(
defaultConfig: Config,
region: string,
integration: AwsS3Integration,
): Promise<S3Client>;
// (undocumented)
static factory: ReaderFactory;
// (undocumented)
read(url: string): Promise<Buffer>;
@@ -88,8 +81,6 @@ export class AwsS3UrlReader implements UrlReader {
// (undocumented)
readUrl(url: string, options?: ReadUrlOptions): Promise<ReadUrlResponse>;
// (undocumented)
retrieveS3ObjectData(stream: Readable): Promise<Readable>;
// (undocumented)
search(): Promise<SearchResponse>;
// (undocumented)
toString(): string;
@@ -162,10 +162,10 @@ export class AwsS3UrlReader implements UrlReader {
secretAccessKey: string,
): AwsCredentialIdentityProvider {
return async () => {
return Promise.resolve({
return {
accessKeyId,
secretAccessKey,
});
};
};
}
@@ -210,7 +210,7 @@ export class AwsS3UrlReader implements UrlReader {
return explicitCredentials;
}
async buildS3Client(
private async buildS3Client(
defaultConfig: Config,
region: string,
integration: AwsS3Integration,
@@ -231,7 +231,7 @@ export class AwsS3UrlReader implements UrlReader {
return s3;
}
async retrieveS3ObjectData(stream: Readable): Promise<Readable> {
private async retrieveS3ObjectData(stream: Readable): Promise<Readable> {
return new Promise((resolve, reject) => {
try {
const chunks: any[] = [];