Files
purchases-ios/Sources/Logging/Strings/FileRepositoryStrings.swift
T
Jacob Rakidzich f730d9df52 Create File Repository for use in upcoming feature work (#5477)
* Pull files from staging branch to introduce a file repository and intelligent task sharing

* removed typed throws and fix some docs

* Make tests satisfy predictive swift 6 failures

* @_spi(Internal) public

* Stop using the shared instance in an instance method

* Pull cache directory logic out of file repository

* update cache naming conventions

* @fire-at-will feedback -> use url instead of path

* Use strings file pattern

* remove priority from repository

* Remove RC Internal access from keyed deferred value store

* Remove spi internal from cache and network service

* makeSUT -> makeSystemUnderTest

* remove public scope in extensions

* rename function for clarity
2025-08-21 05:41:52 -05:00

38 lines
1.1 KiB
Swift

//
// Copyright RevenueCat Inc. All Rights Reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// FileRepositoryStrings.swift
//
// Created by Jacob Zivan Rakidzich on 8/14/25.
import Foundation
enum FileRepositoryStrings {
case failedToSaveCachedFile(URL, Error)
case failedToFetchFileFromRemoteSource(URL, Error)
case failedToCreateCacheDirectory(URL)
}
extension FileRepositoryStrings: LogMessage {
var description: String {
switch self {
case .failedToSaveCachedFile(let url, let error):
"Failed to save file to \(url.absoluteString): \(error)"
case .failedToFetchFileFromRemoteSource(let url, let error):
"Failed to download file from \(url.absoluteString): \(error)"
case .failedToCreateCacheDirectory(let url):
"Failed to create cache directory for \(url.absoluteString)"
}
}
var category: String { return "file_repository" }
}