Add agent support

This commit is contained in:
Max Goedjen
2020-03-08 21:11:59 -07:00
parent 286e2dc558
commit a0bd55d1bf
4 changed files with 30 additions and 16 deletions

View File

@@ -17,7 +17,7 @@ public class AnySecretStore: SecretStore {
_name = { secretStore.name }
_id = { secretStore.id }
_secrets = { secretStore.secrets.map { AnySecret($0) } }
_sign = { try secretStore.sign(data: $0, with: $1 as! SecretStoreType.SecretType) }
_sign = { try secretStore.sign(data: $0, with: $1.base as! SecretStoreType.SecretType) }
sink = secretStore.objectWillChange.sink { _ in
self.objectWillChange.send()
}
@@ -65,5 +65,3 @@ public class AnySecretStoreModifiable: AnySecretStore, SecretStoreModifiable {
}
}

View File

@@ -20,7 +20,11 @@ public class SecretStoreList: ObservableObject {
addInternal(store: modifiable)
}
public func addInternal(store: AnySecretStore) {
}
extension SecretStoreList {
fileprivate func addInternal(store: AnySecretStore) {
stores.append(store)
let sink = store.objectWillChange.sink {
self.objectWillChange.send()