exchange broker options
This commit is contained in:
Binary file not shown.
@@ -18,6 +18,16 @@ pub struct ExchangeRateSelection {
|
||||
pub rate_source_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct RateSourceProvider {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct ListRateSourcesResponse {
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub sources: ::prost::alloc::vec::Vec<RateSourceProvider>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct PreviewDirectConversionRequest {
|
||||
#[prost(string, tag = "1")]
|
||||
pub original_amount: ::prost::alloc::string::String,
|
||||
@@ -408,6 +418,37 @@ pub mod exchange_rate_service_client {
|
||||
self.inner = self.inner.max_encoding_message_size(limit);
|
||||
self
|
||||
}
|
||||
/// Lists the direct-rate providers compiled into and registered by this
|
||||
/// server instance. Clients use these stable IDs when configuring profiles.
|
||||
pub async fn list_rate_sources(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::super::common::Empty>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::ListRateSourcesResponse>,
|
||||
tonic::Status,
|
||||
> {
|
||||
self.inner
|
||||
.ready()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tonic::Status::unknown(
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/komp_ac.exchange_rates.ExchangeRateService/ListRateSources",
|
||||
);
|
||||
let mut req = request.into_request();
|
||||
req.extensions_mut()
|
||||
.insert(
|
||||
GrpcMethod::new(
|
||||
"komp_ac.exchange_rates.ExchangeRateService",
|
||||
"ListRateSources",
|
||||
),
|
||||
);
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
pub async fn preview_direct_conversion(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::PreviewDirectConversionRequest>,
|
||||
@@ -541,6 +582,15 @@ pub mod exchange_rate_service_server {
|
||||
/// Generated trait containing gRPC methods that should be implemented for use with ExchangeRateServiceServer.
|
||||
#[async_trait]
|
||||
pub trait ExchangeRateService: std::marker::Send + std::marker::Sync + 'static {
|
||||
/// Lists the direct-rate providers compiled into and registered by this
|
||||
/// server instance. Clients use these stable IDs when configuring profiles.
|
||||
async fn list_rate_sources(
|
||||
&self,
|
||||
request: tonic::Request<super::super::common::Empty>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::ListRateSourcesResponse>,
|
||||
tonic::Status,
|
||||
>;
|
||||
async fn preview_direct_conversion(
|
||||
&self,
|
||||
request: tonic::Request<super::PreviewDirectConversionRequest>,
|
||||
@@ -646,6 +696,55 @@ pub mod exchange_rate_service_server {
|
||||
}
|
||||
fn call(&mut self, req: http::Request<B>) -> Self::Future {
|
||||
match req.uri().path() {
|
||||
"/komp_ac.exchange_rates.ExchangeRateService/ListRateSources" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct ListRateSourcesSvc<T: ExchangeRateService>(pub Arc<T>);
|
||||
impl<
|
||||
T: ExchangeRateService,
|
||||
> tonic::server::UnaryService<super::super::common::Empty>
|
||||
for ListRateSourcesSvc<T> {
|
||||
type Response = super::ListRateSourcesResponse;
|
||||
type Future = BoxFuture<
|
||||
tonic::Response<Self::Response>,
|
||||
tonic::Status,
|
||||
>;
|
||||
fn call(
|
||||
&mut self,
|
||||
request: tonic::Request<super::super::common::Empty>,
|
||||
) -> Self::Future {
|
||||
let inner = Arc::clone(&self.0);
|
||||
let fut = async move {
|
||||
<T as ExchangeRateService>::list_rate_sources(
|
||||
&inner,
|
||||
request,
|
||||
)
|
||||
.await
|
||||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
}
|
||||
let accept_compression_encodings = self.accept_compression_encodings;
|
||||
let send_compression_encodings = self.send_compression_encodings;
|
||||
let max_decoding_message_size = self.max_decoding_message_size;
|
||||
let max_encoding_message_size = self.max_encoding_message_size;
|
||||
let inner = self.inner.clone();
|
||||
let fut = async move {
|
||||
let method = ListRateSourcesSvc(inner);
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let mut grpc = tonic::server::Grpc::new(codec)
|
||||
.apply_compression_config(
|
||||
accept_compression_encodings,
|
||||
send_compression_encodings,
|
||||
)
|
||||
.apply_max_message_size_config(
|
||||
max_decoding_message_size,
|
||||
max_encoding_message_size,
|
||||
);
|
||||
let res = grpc.unary(method, req).await;
|
||||
Ok(res)
|
||||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
"/komp_ac.exchange_rates.ExchangeRateService/PreviewDirectConversion" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct PreviewDirectConversionSvc<T: ExchangeRateService>(
|
||||
|
||||
@@ -458,6 +458,11 @@ pub struct TableDetail {
|
||||
/// ProfileTreeResponse.Table.profile_name.
|
||||
#[prost(string, tag = "11")]
|
||||
pub profile_name: ::prost::alloc::string::String,
|
||||
/// True when the physical table contains at least one row, including a
|
||||
/// soft-deleted row. Populated tables are append-only: PutTableDefinition is
|
||||
/// no longer available, while AddTableColumns remains available.
|
||||
#[prost(bool, tag = "12")]
|
||||
pub has_data: bool,
|
||||
}
|
||||
/// Server-owned behavior for one logical column returned in table details.
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
|
||||
Reference in New Issue
Block a user