Summary: - Sources: update Audit, Configuration, Migrations (+4 more) Stats: - 37 files changed, 256 insertions(+), 22 deletions(-)
24 lines
904 B
Swift
24 lines
904 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?
|
|
|
|
/// Creates a configuration with optional defaults.
|
|
public init(
|
|
defaultKeychainService: String? = nil,
|
|
defaultAppGroupIdentifier: String? = nil
|
|
) {
|
|
self.defaultKeychainService = defaultKeychainService
|
|
self.defaultAppGroupIdentifier = defaultAppGroupIdentifier
|
|
}
|
|
|
|
/// Default configuration with no predefined identifiers.
|
|
public static let `default` = StorageConfiguration()
|
|
}
|