2025-01-25 00:27:47 +01:00
|
|
|
public protocol TemplateServicing {
|
|
|
|
|
|
|
|
// MARK: Functions
|
|
|
|
|
2025-02-04 20:58:14 +01:00
|
|
|
func render(_ object: Any, on template: String) async throws (TemplateServiceError) -> String
|
2025-01-25 00:27:47 +01:00
|
|
|
|
|
|
|
}
|
2025-02-04 20:58:14 +01:00
|
|
|
|
|
|
|
// MARK: - Errors
|
|
|
|
|
|
|
|
public enum TemplateServiceError: Error {
|
|
|
|
case contentNotRendered
|
|
|
|
case resourcePathNotFound
|
|
|
|
case serviceNotInitialized
|
|
|
|
case templateNotFound
|
|
|
|
}
|