feat: Initial commit
This commit is contained in:
33
Sources/ManualS/ManualS.swift
Normal file
33
Sources/ManualS/ManualS.swift
Normal file
@@ -0,0 +1,33 @@
|
||||
import Dependencies
|
||||
import DependenciesMacros
|
||||
import Models
|
||||
|
||||
public extension DependencyValues {
|
||||
var manualS: ManualS {
|
||||
get { self[ManualS.self] }
|
||||
set { self[ManualS.self] = newValue }
|
||||
}
|
||||
}
|
||||
|
||||
@DependencyClient
|
||||
public struct ManualS: Sendable {
|
||||
public var balancePoint: @Sendable (BalancePoint.Request) async throws -> BalancePoint.Response
|
||||
public var derating: @Sendable (Derating.Request) async throws -> Derating.Response
|
||||
public var interpolate: @Sendable (Interpolate.Request) async throws -> Interpolate.Response
|
||||
public var requiredKW: @Sendable (RequiredKW.Request) async throws -> RequiredKW.Response
|
||||
public var sizingLimits: @Sendable (SizingLimits.Request) async throws -> SizingLimits.Response
|
||||
}
|
||||
|
||||
extension ManualS: DependencyKey {
|
||||
public static let liveValue = Self(
|
||||
balancePoint: { try await $0.respond() },
|
||||
derating: { try await $0.respond() },
|
||||
interpolate: { try await $0.respond() },
|
||||
requiredKW: { try await $0.respond() },
|
||||
sizingLimits: { try await $0.respond() }
|
||||
)
|
||||
}
|
||||
|
||||
extension ManualS: TestDependencyKey {
|
||||
public static let testValue: ManualS = Self()
|
||||
}
|
||||
Reference in New Issue
Block a user