Summary: - Sources: Configuration, Models, Services - Docs: README - Added symbols: struct FileStorageConfiguration, struct StorageConfiguration, func updateConfiguration, func updateFileStorageConfiguration, func updateStorageConfiguration, func resolveService (+1 more) Stats: - 9 files changed, 144 insertions(+), 24 deletions(-)
22 lines
786 B
Swift
22 lines
786 B
Swift
import Foundation
|
|
|
|
/// Global configuration for the storage engine.
|
|
/// Allows setting default identifiers for Keychain services and App Groups.
|
|
public struct StorageConfiguration: Sendable {
|
|
/// The default Keychain service to use if none is specified in a StorageKey.
|
|
public let defaultKeychainService: String?
|
|
|
|
/// The default App Group identifier to use if none is specified in a StorageKey.
|
|
public let defaultAppGroupIdentifier: String?
|
|
|
|
public init(
|
|
defaultKeychainService: String? = nil,
|
|
defaultAppGroupIdentifier: String? = nil
|
|
) {
|
|
self.defaultKeychainService = defaultKeychainService
|
|
self.defaultAppGroupIdentifier = defaultAppGroupIdentifier
|
|
}
|
|
|
|
public static let `default` = StorageConfiguration()
|
|
}
|