cipherstash-grpc-wasm 0.1.0-beta.0

Bindings for CipherStash gRPC calls.
Documentation
# [doc = r" Generated client implementations."] pub mod api_client { # ! [allow (unused_variables , dead_code , missing_docs , clippy :: let_unit_value ,)] use tonic :: codegen :: * ; # [derive (Debug , Clone)] pub struct ApiClient < T > { inner : tonic :: client :: Grpc < T > , } impl < T > ApiClient < T > where T : tonic :: client :: GrpcService < tonic :: body :: BoxBody > , T :: ResponseBody : Body + Send + 'static , T :: Error : Into < StdError > , < T :: ResponseBody as Body > :: Error : Into < StdError > + Send , { pub fn new (inner : T) -> Self { let inner = tonic :: client :: Grpc :: new (inner) ; Self { inner } } pub fn with_interceptor < F > (inner : T , interceptor : F) -> ApiClient < InterceptedService < T , F >> where F : tonic :: service :: Interceptor , T : tonic :: codegen :: Service < http :: Request < tonic :: body :: BoxBody > , Response = http :: Response << T as tonic :: client :: GrpcService < tonic :: body :: BoxBody >> :: ResponseBody > > , < T as tonic :: codegen :: Service < http :: Request < tonic :: body :: BoxBody >> > :: Error : Into < StdError > + Send + Sync , { ApiClient :: new (InterceptedService :: new (inner , interceptor)) } # [doc = r" Compress requests with `gzip`."] # [doc = r""] # [doc = r" This requires the server to support it otherwise it might respond with an"] # [doc = r" error."] pub fn send_gzip (mut self) -> Self { self . inner = self . inner . send_gzip () ; self } # [doc = r" Enable decompressing responses with `gzip`."] pub fn accept_gzip (mut self) -> Self { self . inner = self . inner . accept_gzip () ; self } pub async fn put (& mut self , request : impl tonic :: IntoRequest < super :: documents :: PutRequest > ,) -> Result < tonic :: Response < super :: documents :: PutReply > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/stash.GRPC.V1.API/put") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn put_stream (& mut self , request : impl tonic :: IntoStreamingRequest < Message = super :: documents :: StreamingPutRequest >) -> Result < tonic :: Response < super :: documents :: StreamingPutReply > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/stash.GRPC.V1.API/putStream") ; self . inner . client_streaming (request . into_streaming_request () , path , codec) . await } pub async fn get (& mut self , request : impl tonic :: IntoRequest < super :: documents :: GetRequest > ,) -> Result < tonic :: Response < super :: documents :: GetReply > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/stash.GRPC.V1.API/get") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn get_all (& mut self , request : impl tonic :: IntoRequest < super :: documents :: GetAllRequest > ,) -> Result < tonic :: Response < super :: documents :: GetAllReply > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/stash.GRPC.V1.API/getAll") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn delete (& mut self , request : impl tonic :: IntoRequest < super :: documents :: DeleteRequest > ,) -> Result < tonic :: Response < super :: documents :: DeleteReply > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/stash.GRPC.V1.API/delete") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn query (& mut self , request : impl tonic :: IntoRequest < super :: queries :: QueryRequest > ,) -> Result < tonic :: Response < super :: queries :: QueryReply > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/stash.GRPC.V1.API/query") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn migrate_records (& mut self , request : impl tonic :: IntoStreamingRequest < Message = super :: documents :: MigrateRequest >) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: documents :: MigrateReply >> , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/stash.GRPC.V1.API/migrateRecords") ; self . inner . streaming (request . into_streaming_request () , path , codec) . await } pub async fn create_collection (& mut self , request : impl tonic :: IntoRequest < super :: collections :: CreateRequest > ,) -> Result < tonic :: Response < super :: collections :: InfoReply > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/stash.GRPC.V1.API/createCollection") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn migrate_collection (& mut self , request : impl tonic :: IntoRequest < super :: collections :: MigrateRequest > ,) -> Result < tonic :: Response < super :: collections :: MigrateReply > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/stash.GRPC.V1.API/migrateCollection") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn delete_collection (& mut self , request : impl tonic :: IntoRequest < super :: collections :: DeleteRequest > ,) -> Result < tonic :: Response < super :: collections :: InfoReply > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/stash.GRPC.V1.API/deleteCollection") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn collection_info (& mut self , request : impl tonic :: IntoRequest < super :: collections :: InfoRequest > ,) -> Result < tonic :: Response < super :: collections :: InfoReply > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/stash.GRPC.V1.API/collectionInfo") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn collection_list (& mut self , request : impl tonic :: IntoRequest < super :: collections :: ListRequest > ,) -> Result < tonic :: Response < super :: collections :: ListReply > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/stash.GRPC.V1.API/collectionList") ; self . inner . unary (request . into_request () , path , codec) . await } } }