pub struct InternalServiceClient<T> { /* private fields */ }
Expand description
InternalService is the service providing API endpoints for internal usage.
Implementations§
source§impl<T> InternalServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> InternalServiceClient<T>where T: GrpcService<BoxBody>, T::Error: Into<StdError>, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>( inner: T, interceptor: F ) -> InternalServiceClient<InterceptedService<T, F>>where F: Interceptor, T::ResponseBody: Default, T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>, <T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn login(
&mut self,
request: impl IntoRequest<LoginRequest>
) -> Result<Response<LoginResponse>, Status>
pub async fn login( &mut self, request: impl IntoRequest<LoginRequest> ) -> Result<Response<LoginResponse>, Status>
Log in a user
sourcepub async fn profile(
&mut self,
request: impl IntoRequest<()>
) -> Result<Response<ProfileResponse>, Status>
pub async fn profile( &mut self, request: impl IntoRequest<()> ) -> Result<Response<ProfileResponse>, Status>
Get the current user’s profile
sourcepub async fn global_search(
&mut self,
request: impl IntoRequest<GlobalSearchRequest>
) -> Result<Response<GlobalSearchResponse>, Status>
pub async fn global_search( &mut self, request: impl IntoRequest<GlobalSearchRequest> ) -> Result<Response<GlobalSearchResponse>, Status>
Perform a global search.
sourcepub async fn create_api_key(
&mut self,
request: impl IntoRequest<CreateApiKeyRequest>
) -> Result<Response<CreateApiKeyResponse>, Status>
pub async fn create_api_key( &mut self, request: impl IntoRequest<CreateApiKeyRequest> ) -> Result<Response<CreateApiKeyResponse>, Status>
CreateApiKey creates the given API key.
sourcepub async fn delete_api_key(
&mut self,
request: impl IntoRequest<DeleteApiKeyRequest>
) -> Result<Response<()>, Status>
pub async fn delete_api_key( &mut self, request: impl IntoRequest<DeleteApiKeyRequest> ) -> Result<Response<()>, Status>
DeleteApiKey deletes the API key.
sourcepub async fn list_api_keys(
&mut self,
request: impl IntoRequest<ListApiKeysRequest>
) -> Result<Response<ListApiKeysResponse>, Status>
pub async fn list_api_keys( &mut self, request: impl IntoRequest<ListApiKeysRequest> ) -> Result<Response<ListApiKeysResponse>, Status>
ListApiKeys lists the available API keys.
sourcepub async fn settings(
&mut self,
request: impl IntoRequest<()>
) -> Result<Response<SettingsResponse>, Status>
pub async fn settings( &mut self, request: impl IntoRequest<()> ) -> Result<Response<SettingsResponse>, Status>
Get the global settings.
sourcepub async fn open_id_connect_login(
&mut self,
request: impl IntoRequest<OpenIdConnectLoginRequest>
) -> Result<Response<OpenIdConnectLoginResponse>, Status>
pub async fn open_id_connect_login( &mut self, request: impl IntoRequest<OpenIdConnectLoginRequest> ) -> Result<Response<OpenIdConnectLoginResponse>, Status>
OpenId Connect login.
sourcepub async fn get_devices_summary(
&mut self,
request: impl IntoRequest<GetDevicesSummaryRequest>
) -> Result<Response<GetDevicesSummaryResponse>, Status>
pub async fn get_devices_summary( &mut self, request: impl IntoRequest<GetDevicesSummaryRequest> ) -> Result<Response<GetDevicesSummaryResponse>, Status>
GetDevicesSummary returns an aggregated summary of the devices.
sourcepub async fn get_gateways_summary(
&mut self,
request: impl IntoRequest<GetGatewaysSummaryRequest>
) -> Result<Response<GetGatewaysSummaryResponse>, Status>
pub async fn get_gateways_summary( &mut self, request: impl IntoRequest<GetGatewaysSummaryRequest> ) -> Result<Response<GetGatewaysSummaryResponse>, Status>
GetGatewaysSummary returns an aggregated summary of the gateways.
sourcepub async fn stream_gateway_frames(
&mut self,
request: impl IntoRequest<StreamGatewayFramesRequest>
) -> Result<Response<Streaming<LogItem>>, Status>
pub async fn stream_gateway_frames( &mut self, request: impl IntoRequest<StreamGatewayFramesRequest> ) -> Result<Response<Streaming<LogItem>>, Status>
Stream frame for the given Gateway ID.
sourcepub async fn stream_device_frames(
&mut self,
request: impl IntoRequest<StreamDeviceFramesRequest>
) -> Result<Response<Streaming<LogItem>>, Status>
pub async fn stream_device_frames( &mut self, request: impl IntoRequest<StreamDeviceFramesRequest> ) -> Result<Response<Streaming<LogItem>>, Status>
Stream frames for the given Device EUI.
sourcepub async fn stream_device_events(
&mut self,
request: impl IntoRequest<StreamDeviceEventsRequest>
) -> Result<Response<Streaming<LogItem>>, Status>
pub async fn stream_device_events( &mut self, request: impl IntoRequest<StreamDeviceEventsRequest> ) -> Result<Response<Streaming<LogItem>>, Status>
Stream events for the given Device EUI.
sourcepub async fn list_regions(
&mut self,
request: impl IntoRequest<()>
) -> Result<Response<ListRegionsResponse>, Status>
pub async fn list_regions( &mut self, request: impl IntoRequest<()> ) -> Result<Response<ListRegionsResponse>, Status>
ListRegions lists the available (configured) regions.
sourcepub async fn get_region(
&mut self,
request: impl IntoRequest<GetRegionRequest>
) -> Result<Response<GetRegionResponse>, Status>
pub async fn get_region( &mut self, request: impl IntoRequest<GetRegionRequest> ) -> Result<Response<GetRegionResponse>, Status>
GetRegion returns the region details for the given region.
Trait Implementations§
source§impl<T: Clone> Clone for InternalServiceClient<T>
impl<T: Clone> Clone for InternalServiceClient<T>
source§fn clone(&self) -> InternalServiceClient<T>
fn clone(&self) -> InternalServiceClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> RefUnwindSafe for InternalServiceClient<T>where T: RefUnwindSafe,
impl<T> Send for InternalServiceClient<T>where T: Send,
impl<T> Sync for InternalServiceClient<T>where T: Sync,
impl<T> Unpin for InternalServiceClient<T>where T: Unpin,
impl<T> UnwindSafe for InternalServiceClient<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request