Add remote sync removal flow

This commit is contained in:
Joe Julian
2026-04-06 20:53:14 -07:00
parent 26748d4b84
commit 84512172f3
7 changed files with 322 additions and 1 deletions
+16
View File
@@ -115,6 +115,22 @@ func ConfigureRemoteBinding(model *vault.Model, input RemoteBindingInput) (Remot
}, nil
}
func RemoveRemoteBinding(model *vault.Model, binding RemoteBinding) error {
if model == nil {
return fmt.Errorf("model is required")
}
if strings.TrimSpace(binding.RemoteProfileID) == "" {
return fmt.Errorf("remote profile id is required")
}
if strings.TrimSpace(binding.CredentialEntryID) == "" {
return fmt.Errorf("credential entry id is required")
}
model.RemoveRemoteProfileByID(binding.RemoteProfileID)
model.RemoveEntryByID(binding.CredentialEntryID)
return nil
}
func normalizeSyncMode(mode SyncMode) SyncMode {
switch mode {
case SyncModeAutomaticOnOpenSave: