Files
velody/packages/apple/VelodyNetworking/Sources/VelodyNetworking/VelodyAPIClient.swift
T
2026-05-24 20:53:42 +02:00

36 lines
899 B
Swift

import Foundation
import VelodyDomain
public struct HealthStatusSummary: Hashable, Sendable {
public var databaseStatus: String
public var storageStatus: String
public init(
databaseStatus: String,
storageStatus: String
) {
self.databaseStatus = databaseStatus
self.storageStatus = storageStatus
}
}
public protocol VelodyAPIClient: Sendable {
func fetchHealthStatus() async throws -> HealthStatusSummary
}
public struct StubVelodyAPIClient: VelodyAPIClient {
public let environment: ServerEnvironment
public init(environment: ServerEnvironment) {
self.environment = environment
}
public func fetchHealthStatus() async throws -> HealthStatusSummary {
_ = environment
return HealthStatusSummary(
databaseStatus: "placeholder",
storageStatus: "placeholder"
)
}
}