Skip to content

Commit

Permalink
Merge branch 'main' into jbe/modular_retries
Browse files Browse the repository at this point in the history
  • Loading branch information
jbelkins committed May 14, 2024
2 parents b880f83 + 7a485a9 commit 1d7584c
Show file tree
Hide file tree
Showing 793 changed files with 2,380 additions and 112,730 deletions.
1 change: 1 addition & 0 deletions .github/workflows/generate-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
runs-on: ubuntu-latest
container: swift:5.10-jammy
env:
AWS_SWIFT_SDK_ENABLE_DOCC: 1
IGNORE: none
outputs:
version: ${{ steps.set-version.outputs.version }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func addCRTDependency(_ version: Version) {
}

func addDoccDependency() {
guard ProcessInfo.processInfo.environment["AWS_SWIFT_SDK_ENABLE_DOCC"] != nil else { return }
package.dependencies += [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
]
Expand Down
1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func addCRTDependency(_ version: Version) {
}

func addDoccDependency() {
guard ProcessInfo.processInfo.environment["AWS_SWIFT_SDK_ENABLE_DOCC"] != nil else { return }
package.dependencies += [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
]
Expand Down
18 changes: 0 additions & 18 deletions Sources/Core/AWSClientRuntime/Endpoints/AWSEndpoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,3 @@ public struct AWSEndpoint: Equatable {
return try candidate.resolveEndpoint(region: region)
}
}

/// Keys used to access auth scheme container and auth scheme properties
private enum AuthSchemeKeys {
static let authSchemes = "authSchemes"
}

extension Endpoint {
/// Returns list of auth schemes
/// This is an internal API and subject to change without notice
/// - Returns: list of auth schemes if present
public func authSchemes() -> [[String: Any]]? {
guard let schemes = properties[AuthSchemeKeys.authSchemes] as? [[String: Any]] else {
return nil
}

return schemes
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
// Partition definitions are embedded as a static resource in this project, for now.
// When Trebuchet integration is performed, partitions should be obtained from Trebuchet for every
// build instead of being loaded from a static definition.
public let partitionJSON = """
public let awsPartitionJSON = """
{
"version": "1.1",
"partitions": [
Expand Down
123 changes: 0 additions & 123 deletions Sources/Core/AWSClientRuntime/Endpoints/AuthSchemeResolver.swift

This file was deleted.

16 changes: 0 additions & 16 deletions Sources/Core/AWSClientRuntime/Endpoints/CredentialScope.swift

This file was deleted.

13 changes: 0 additions & 13 deletions Sources/Core/AWSClientRuntime/Endpoints/EndpointError.swift

This file was deleted.

7 changes: 4 additions & 3 deletions Sources/Core/AWSClientRuntime/Endpoints/Partition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//
// SPDX-License-Identifier: Apache-2.0
//
import ClientRuntime

public struct Partition {

Expand Down Expand Up @@ -43,19 +44,19 @@ public struct Partition {
self.endpoints = endpoints
}

func canResolveEndpoint(region: String) -> Bool {
public func canResolveEndpoint(region: String) -> Bool {
return endpoints[region] != nil || region.range(of: regionRegex,
options: .regularExpression) != nil
}

func resolveEndpoint(region: String) throws -> AWSEndpoint {
public func resolveEndpoint(region: String) throws -> AWSEndpoint {
let shouldUsePartitionEndpoint = region.isEmpty && !partitionEndpoint.isEmpty
let resolvedRegion = shouldUsePartitionEndpoint ? partitionEndpoint : region
let endpointDefinition = endpointDefinitionForRegion(region: resolvedRegion)
return try endpointDefinition.resolve(region: region, defaults: defaults)
}

func endpointDefinitionForRegion(region: String) -> ServiceEndpointMetadata {
public func endpointDefinitionForRegion(region: String) -> ServiceEndpointMetadata {
if let endpointMetadata = endpoints[region] {
return endpointMetadata
} else if !isRegionalized {
Expand Down
Loading

0 comments on commit 1d7584c

Please sign in to comment.