| 1 | package main |
| 2 | |
| 3 | import "reasonix/internal/config" |
| 4 | |
| 5 | // CredentialDiagnostics exposes the shared read-only credential report to the |
| 6 | // Desktop diagnostics page. Probe performs a bounded temporary create/rename. |
| 7 | func (a *App) CredentialDiagnostics(probe bool) (config.CredentialDiagnosticReport, error) { |
| 8 | return config.DiagnoseCredentials(config.CredentialDiagnosticOptions{Probe: probe}) |
| 9 | } |
| 10 | |
| 11 | // RepairCredentials applies the same conservative repair used by |
| 12 | // `reasonix doctor credentials --repair`. dryRun returns the action preview. |
| 13 | func (a *App) RepairCredentials(dryRun bool) (config.CredentialDiagnosticReport, error) { |
| 14 | return config.DiagnoseCredentials(config.CredentialDiagnosticOptions{Probe: true, Repair: true, DryRun: dryRun}) |
| 15 | } |
| 16 |