mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-30 03:51:05 +00:00
21 lines
632 B
Swift
21 lines
632 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
struct AppEnvironment {
|
|
let session: Session
|
|
let webAuthSessionType: WebAuthSession.Type
|
|
let keychainServiceType: KeychainService.Type
|
|
let userDefaults: UserDefaults
|
|
let inMemoryContent: Bool
|
|
let attributedStringCache = AttributedStringCache()
|
|
}
|
|
|
|
extension AppEnvironment {
|
|
static let live: Self = Self(
|
|
session: Session(configuration: .default),
|
|
webAuthSessionType: LiveWebAuthSession.self,
|
|
keychainServiceType: LiveKeychainService.self,
|
|
userDefaults: .standard,
|
|
inMemoryContent: false)
|
|
}
|