Search in sources :

Example 1 with AwsS3Resource

use of org.flywaydb.core.internal.resource.s3.AwsS3Resource in project flyway by flyway.

the class AwsS3Scanner method getLoadableResources.

private Collection<LoadableResource> getLoadableResources(String bucketName, final ListObjectsV2Response listObjectResult) {
    List<S3Object> objectSummaries = listObjectResult.contents();
    Set<LoadableResource> resources = new TreeSet<>();
    for (S3Object objectSummary : objectSummaries) {
        LOG.debug("Found Amazon S3 resource: " + bucketName.concat("/").concat(objectSummary.key()));
        resources.add(new AwsS3Resource(bucketName, objectSummary, encoding));
    }
    return resources;
}
Also used : AwsS3Resource(org.flywaydb.core.internal.resource.s3.AwsS3Resource) LoadableResource(org.flywaydb.core.api.resource.LoadableResource) S3Object(software.amazon.awssdk.services.s3.model.S3Object)

Aggregations

LoadableResource (org.flywaydb.core.api.resource.LoadableResource)1 AwsS3Resource (org.flywaydb.core.internal.resource.s3.AwsS3Resource)1 S3Object (software.amazon.awssdk.services.s3.model.S3Object)1