11use clap:: Subcommand ;
2- use cosmian_findex_cli:: { CoreFindexActions , reexports:: cosmian_findex_client:: FindexRestClient } ;
2+ use cosmian_findex_cli:: { reexports:: cosmian_findex_client:: FindexRestClient , CoreFindexActions } ;
33use cosmian_kms_cli:: reexport:: cosmian_kms_client:: KmsClient ;
44
5- use super :: {
6- delete_datasets:: DeleteDatasetAction , encrypt_and_index:: EncryptAndIndexAction ,
7- search_and_decrypt:: SearchAndDecryptAction ,
8- } ;
9- use crate :: error:: { CosmianError , result:: CosmianResult } ;
5+ use super :: { encrypt_and_index:: EncryptAndIndexAction , search_and_decrypt:: SearchAndDecryptAction } ;
6+ use crate :: error:: { result:: CosmianResult , CosmianError } ;
107
118#[ derive( Subcommand ) ]
129pub enum FindexActions {
1310 EncryptAndIndex ( EncryptAndIndexAction ) ,
1411 SearchAndDecrypt ( SearchAndDecryptAction ) ,
15- DeleteDataset ( DeleteDatasetAction ) ,
1612 #[ clap( flatten) ]
1713 Findex ( CoreFindexActions ) ,
1814}
@@ -33,9 +29,14 @@ impl FindexActions {
3329 . run ( findex_rest_client)
3430 . await
3531 . map_err ( CosmianError :: from) ,
36- Self :: EncryptAndIndex ( action) => action. run ( findex_rest_client, kms_rest_client) . await ,
37- Self :: SearchAndDecrypt ( action) => action. run ( findex_rest_client, kms_rest_client) . await ,
38- Self :: DeleteDataset ( action) => action. run ( findex_rest_client) . await ,
32+ Self :: EncryptAndIndex ( action) => {
33+ action. run ( findex_rest_client, kms_rest_client) . await ?;
34+ Ok ( ( ) )
35+ }
36+ Self :: SearchAndDecrypt ( action) => {
37+ action. run ( findex_rest_client, kms_rest_client) . await ?;
38+ Ok ( ( ) )
39+ }
3940 }
4041 }
4142}
0 commit comments