Add local CAS file roots
This commit is contained in:
parent
64e17ff957
commit
e1f36ffafb
12 changed files with 581 additions and 13 deletions
|
|
@ -10,6 +10,7 @@ serde.workspace = true
|
|||
serde_json.workspace = true
|
||||
thiserror.workspace = true
|
||||
geth-auth = { path = "../geth-auth" }
|
||||
geth-cas = { path = "../geth-cas" }
|
||||
geth-db = { path = "../geth-db" }
|
||||
geth-document = { path = "../geth-document" }
|
||||
geth-keychain = { path = "../geth-keychain" }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
use geth_auth::{AuthExplanation, AuthOp};
|
||||
use geth_cas::{FileRoot, FileRootScan};
|
||||
use geth_db::{CrSqliteChangeBatch, DbResource};
|
||||
use geth_document::{DocumentResource, DocumentState};
|
||||
use geth_keychain::KeychainOp;
|
||||
|
|
@ -47,6 +48,14 @@ pub enum ControlRequest {
|
|||
dry_run: bool,
|
||||
},
|
||||
CasList,
|
||||
CasRootAdd {
|
||||
name: String,
|
||||
path: PathBuf,
|
||||
},
|
||||
CasRootList,
|
||||
CasRootScan {
|
||||
name: String,
|
||||
},
|
||||
KeychainInit {
|
||||
admin_key_path: Option<PathBuf>,
|
||||
},
|
||||
|
|
@ -209,6 +218,15 @@ pub enum ControlResponse {
|
|||
CasList {
|
||||
blobs: Vec<CasBlob>,
|
||||
},
|
||||
CasRootAdded {
|
||||
root: FileRoot,
|
||||
},
|
||||
CasRootList {
|
||||
roots: Vec<FileRoot>,
|
||||
},
|
||||
CasRootScanned {
|
||||
scan: FileRootScan,
|
||||
},
|
||||
KeychainStatus(KeychainStatusResponse),
|
||||
KeychainInitialized {
|
||||
ops: Vec<KeychainOp>,
|
||||
|
|
@ -446,5 +464,13 @@ mod tests {
|
|||
decode_request(&encode_request(&request).expect("encode")).expect("decode"),
|
||||
request
|
||||
);
|
||||
|
||||
let request = ControlRequest::CasRootScan {
|
||||
name: "notes".to_owned(),
|
||||
};
|
||||
assert_eq!(
|
||||
decode_request(&encode_request(&request).expect("encode")).expect("decode"),
|
||||
request
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue