generated from ydataai/opensource-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support execution as a command (#21)
- Loading branch information
Showing
17 changed files
with
241 additions
and
62 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import Foundation | ||
import SotoAutoScaling | ||
|
||
protocol ASGProvider { | ||
public protocol ASGProvider { | ||
func createOrUpdateTags(_ input: AutoScaling.CreateOrUpdateTagsType, logger: Logger) async throws | ||
} | ||
|
||
extension AutoScaling: ASGProvider { | ||
@inlinable | ||
func createOrUpdateTags(_ input: CreateOrUpdateTagsType, logger: Logger) async throws { | ||
public func createOrUpdateTags(_ input: CreateOrUpdateTagsType, logger: Logger) async throws { | ||
try await createOrUpdateTags(input, logger: logger, on: nil) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import Foundation | ||
import SotoEKS | ||
|
||
protocol EKSProvider { | ||
public protocol EKSProvider { | ||
func describeNodegroup(_ input: EKS.DescribeNodegroupRequest, logger: Logger) async throws | ||
-> EKS.DescribeNodegroupResponse | ||
} | ||
|
||
extension EKS: EKSProvider { | ||
@inlinable | ||
func describeNodegroup(_ input: DescribeNodegroupRequest, logger: Logger) async throws -> DescribeNodegroupResponse { | ||
public func describeNodegroup(_ input: DescribeNodegroupRequest, logger: Logger) async throws | ||
-> DescribeNodegroupResponse { | ||
try await describeNodegroup(input, logger: logger, on: nil) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Foundation | ||
|
||
enum Environment { | ||
static var decoder: JSONDecoder = JSONDecoder() | ||
|
||
static func get<Key: CodingKey>(_ key: Key) -> String? { | ||
ProcessInfo.processInfo.environment[key.stringValue] | ||
} | ||
|
||
static func get<Key: CodingKey, D: Decodable>( | ||
_ key: Key, | ||
_ type: D.Type = D.self, | ||
decoder: JSONDecoder = Self.decoder | ||
) throws -> D? { | ||
guard let data = get(key)?.data(using: .utf8) else { | ||
return nil | ||
} | ||
|
||
return try decoder.decode(D.self, from: data) | ||
} | ||
} |
Oops, something went wrong.