Sha256: 6320125d8a121597d0ccb6b695712fe233beafac1217e2350e9a9ad71edae08a
Contents?: true
Size: 1.31 KB
Versions: 20
Compression:
Stored size: 1.31 KB
Contents
package s3.website.model case class S3Endpoint( s3WebsiteHostname: String, s3Hostname: String ) object S3Endpoint { val defaultEndpoint = S3Endpoint("s3-website-us-east-1.amazonaws.com", "s3.amazonaws.com") def forString(locationConstraint: String): Either[ClientError, S3Endpoint] = locationConstraint match { case "EU" | "eu-west-1" => Right(S3Endpoint("s3-website-eu-west-1.amazonaws.com", "s3-eu-west-1.amazonaws.com")) case "us-east-1" => Right(defaultEndpoint) case "us-west-1" => Right(S3Endpoint("s3-website-us-west-1.amazonaws.com", "s3-us-west-1.amazonaws.com")) case "us-west-2" => Right(S3Endpoint("s3-website-us-west-2.amazonaws.com", "s3-us-west-2.amazonaws.com")) case "ap-southeast-1" => Right(S3Endpoint("s3-website-ap-southeast-1.amazonaws.com", "s3-ap-southeast-1.amazonaws.com")) case "ap-southeast-2" => Right(S3Endpoint("s3-website-ap-southeast-2.amazonaws.com", "s3-ap-southeast-2.amazonaws.com")) case "ap-northeast-1" => Right(S3Endpoint("s3-website-ap-northeast-1.amazonaws.com", "s3-ap-northeast-1.amazonaws.com")) case "sa-east-1" => Right(S3Endpoint("s3-website-sa-east-1.amazonaws.com", "s3-sa-east-1.amazonaws.com")) case _ => Left(ClientError(s"Unrecognised endpoint: $locationConstraint")) } }
Version data entries
20 entries across 20 versions & 1 rubygems