-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add scala3 to all project cross versions, but mongodb. - Mongodb does will not support scala3 due to its extensive use of macros. It won't be supported until the scala-mongodb-driver and bson libraries are released for scala3. - Mockito is used for unit testing in a few monix connectors, so we have kept them in a separate package for scala-2.x.x. - Pureconfig major update, which drops macros usage by manual config reader implementation. - Add Scala3 to github-ci matrix.
- Loading branch information
Showing
132 changed files
with
1,099 additions
and
3,193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
sbt ++2.13.8 ci-release | ||
sbt ++3.1.2 ci-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
aws-auth/src/main/scala/monix/connect.aws.auth/configreader/BaseConfigReader.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright (c) 2020-2021 by The Monix Connect Project Developers. | ||
* See the project homepage at: https://connect.monix.io | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package monix.connect.aws.auth.configreader | ||
|
||
import monix.connect.aws.auth.MonixAwsConf.AppConf | ||
import monix.connect.aws.auth.{AwsCredentialsConf, HttpClientConf, MonixAwsConf, StaticCredentialsConf} | ||
import pureconfig.ConfigReader | ||
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider | ||
|
||
private[auth] trait BaseConfigReader { | ||
|
||
def cased(sequence: String*): String | ||
private[auth] implicit val staticCreedsConfConfigReader: ConfigReader[StaticCredentialsConf] = | ||
ConfigReader.forProduct3(cased("access", "key", "id"), cased("secret", "access", "key"), cased("session", "token"))( | ||
StaticCredentialsConf(_, _, _)) | ||
private[auth] implicit val awsCredentialsConfConfigReader: ConfigReader[AwsCredentialsConf] = | ||
ConfigReader.forProduct3(cased("provider"), cased("profile", "name"), cased("static"))(AwsCredentialsConf(_, _, _)) | ||
private[auth] implicit val credentialsProviderReader: ConfigReader[AwsCredentialsProvider] = | ||
ConfigReader[AwsCredentialsConf].map(_.credentialsProvider) | ||
private[auth] implicit val httpClientConfConfigReader: ConfigReader[HttpClientConf] = ConfigReader.forProduct8( | ||
cased("max", "concurrency"), | ||
cased("max", "pending", "connection", "acquires"), | ||
cased("connection", "acquisition", "timeout"), | ||
cased("connection", "max", "idle", "time"), | ||
cased("connection", "time", "to", "live"), | ||
cased("use", "idle", "connection", "reaper"), | ||
cased("read", "timeout"), | ||
cased("write", "timeout") | ||
)(HttpClientConf(_, _, _, _, _, _, _, _)) | ||
private[auth] implicit val monixAwsConfConfigReader: ConfigReader[MonixAwsConf] = | ||
ConfigReader.forProduct4(cased("region"), cased("credentials"), cased("endpoint"), cased("http", "client"))( | ||
MonixAwsConf(_, _, _, _)) | ||
private[auth] implicit val appConfConfigReader: ConfigReader[AppConf] = | ||
ConfigReader.forProduct1(cased("monix", "aws"))(AppConf(_)) | ||
} |
24 changes: 24 additions & 0 deletions
24
aws-auth/src/main/scala/monix/connect.aws.auth/configreader/CamelCaseConfigReader.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2020-2021 by The Monix Connect Project Developers. | ||
* See the project homepage at: https://connect.monix.io | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package monix.connect.aws.auth.configreader | ||
|
||
import pureconfig.CamelCase | ||
|
||
private[auth] object CamelCaseConfigReader extends BaseConfigReader { | ||
override def cased(sequence: String*): String = CamelCase.fromTokens(sequence) | ||
} |
24 changes: 24 additions & 0 deletions
24
aws-auth/src/main/scala/monix/connect.aws.auth/configreader/KebabConfigReader.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2020-2021 by The Monix Connect Project Developers. | ||
* See the project homepage at: https://connect.monix.io | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package monix.connect.aws.auth.configreader | ||
|
||
import pureconfig.KebabCase | ||
|
||
private[auth] object KebabConfigReader extends BaseConfigReader { | ||
override def cased(sequence: String*): String = KebabCase.fromTokens(sequence) | ||
} |
24 changes: 24 additions & 0 deletions
24
aws-auth/src/main/scala/monix/connect.aws.auth/configreader/PascalConfigReader.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2020-2021 by The Monix Connect Project Developers. | ||
* See the project homepage at: https://connect.monix.io | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package monix.connect.aws.auth.configreader | ||
|
||
import pureconfig.PascalCase | ||
|
||
private[auth] object PascalConfigReader extends BaseConfigReader { | ||
override def cased(sequence: String*): String = PascalCase.fromTokens(sequence) | ||
} |
24 changes: 24 additions & 0 deletions
24
aws-auth/src/main/scala/monix/connect.aws.auth/configreader/SnakeCaseConfigReader.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2020-2021 by The Monix Connect Project Developers. | ||
* See the project homepage at: https://connect.monix.io | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package monix.connect.aws.auth.configreader | ||
|
||
import pureconfig.SnakeCase | ||
|
||
private[auth] object SnakeCaseConfigReader extends BaseConfigReader { | ||
override def cased(sequence: String*): String = SnakeCase.fromTokens(sequence) | ||
} |
32 changes: 32 additions & 0 deletions
32
aws-auth/src/main/scala/monix/connect.aws.auth/configreader/package.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) 2020-2021 by The Monix Connect Project Developers. | ||
* See the project homepage at: https://connect.monix.io | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package monix.connect.aws.auth | ||
|
||
import pureconfig.ConfigReader | ||
import software.amazon.awssdk.regions.Region | ||
|
||
import java.net.URI | ||
|
||
package object configreader { | ||
|
||
private[configreader] implicit val providerReader: ConfigReader[Providers.Provider] = | ||
ConfigReader[String].map(Providers.fromString) | ||
private[configreader] implicit val regionReader: ConfigReader[Region] = ConfigReader[String].map(Region.of) | ||
private[configreader] implicit val uriReader: ConfigReader[URI] = ConfigReader[String].map(URI.create) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
MonixAws: { | ||
credentials { | ||
provider: "default" | ||
Credentials { | ||
Provider: "default" | ||
} | ||
region: "eu-west-1" | ||
endpoint: "PascalCase:12345" | ||
Region: "eu-west-1" | ||
Endpoint: "PascalCase:12345" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.