(path: &str, expected: Option<&str>, actual: &str)
| 91 | } |
| 92 | |
| 93 | pub(crate) fn require_revision(path: &str, expected: Option<&str>, actual: &str) -> CliResult<()> { |
| 94 | match expected { |
| 95 | Some(expected) if !expected.eq_ignore_ascii_case(actual) => { |
| 96 | return Err(CliError::InvalidArgument { |
| 97 | message: format!( |
| 98 | "Vault entry revision changed for {path}: expected {expected}, found {actual}" |
| 99 | ), |
| 100 | }); |
| 101 | } |
| 102 | _ => {} |
| 103 | } |
| 104 | Ok(()) |
| 105 | } |
| 106 | |
| 107 | pub(crate) fn entry_json(path: &str, entry: &VaultEntry, revision_hash: &str) -> serde_json::Value { |
| 108 | serde_json::json!({ |
no outgoing calls