xmtp_api_backend/endpoints/backend/
get_configuration.rs1use prost::{Message, bytes::Bytes};
2use std::borrow::Cow;
3use xmtp_proto::{
4 api::{BodyError, Endpoint},
5 backend_v1,
6};
7
8#[derive(Clone, Debug, Default)]
12pub struct GetConfiguration(pub backend_v1::GetConfigurationRequest);
13
14pub const GET_CONFIGURATION_PATH: &str = "/xmtp.backend.v1.ConfigurationService/GetConfiguration";
16
17impl Endpoint for GetConfiguration {
18 type Output = backend_v1::GetConfigurationResponse;
19 fn grpc_endpoint(&self) -> Cow<'static, str> {
20 GET_CONFIGURATION_PATH.into()
21 }
22 fn body(&self) -> Result<Bytes, BodyError> {
23 Ok(self.0.encode_to_vec().into())
24 }
25}