Files
swift-manual-s/Sources/ManualS/ManualS.swift

34 lines
1.1 KiB
Swift

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 coolingInterpolation: @Sendable (CoolingInterpolation.Request) async throws -> CoolingInterpolation.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() },
coolingInterpolation: { try await $0.respond() },
requiredKW: { try await $0.respond() },
sizingLimits: { try await $0.respond() }
)
}
extension ManualS: TestDependencyKey {
public static let testValue: ManualS = Self()
}