Autogenerated update for cc0845f68e...fab429fc74
This commit is contained in:
parent
725adb294f
commit
97738cf1f7
14
auth/auth.rs
14
auth/auth.rs
@ -10,18 +10,14 @@ pub struct IdMessage {
|
|||||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
#[derive(Clone, PartialEq, ::prost::Message, serde::Serialize, serde::Deserialize)]
|
#[derive(Clone, PartialEq, ::prost::Message, serde::Serialize, serde::Deserialize)]
|
||||||
#[serde(rename_all = "PascalCase")]
|
#[serde(rename_all = "PascalCase")]
|
||||||
pub struct SessionResponse {
|
pub struct SessionUserResponse {
|
||||||
#[prost(string, tag="1")]
|
#[prost(uint64, tag="1")]
|
||||||
pub session_id: ::prost::alloc::string::String,
|
|
||||||
#[prost(uint64, tag="2")]
|
|
||||||
#[serde(rename = "UserID")]
|
#[serde(rename = "UserID")]
|
||||||
pub user_id: u64,
|
pub user_id: u64,
|
||||||
#[prost(string, tag="3")]
|
#[prost(string, tag="2")]
|
||||||
pub username: ::prost::alloc::string::String,
|
pub username: ::prost::alloc::string::String,
|
||||||
#[prost(uint64, tag="4")]
|
#[prost(string, tag="3")]
|
||||||
pub created: u64,
|
pub avatar_url: ::prost::alloc::string::String,
|
||||||
#[prost(uint64, tag="5")]
|
|
||||||
pub expires: u64,
|
|
||||||
}
|
}
|
||||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
#[derive(Clone, PartialEq, ::prost::Message, serde::Serialize, serde::Deserialize)]
|
#[derive(Clone, PartialEq, ::prost::Message, serde::Serialize, serde::Deserialize)]
|
||||||
|
@ -84,11 +84,11 @@ pub mod auth_service_client {
|
|||||||
self.inner = self.inner.max_encoding_message_size(limit);
|
self.inner = self.inner.max_encoding_message_size(limit);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub async fn get_session(
|
pub async fn get_session_user(
|
||||||
&mut self,
|
&mut self,
|
||||||
request: impl tonic::IntoRequest<super::IdMessage>,
|
request: impl tonic::IntoRequest<super::IdMessage>,
|
||||||
) -> std::result::Result<
|
) -> std::result::Result<
|
||||||
tonic::Response<super::SessionResponse>,
|
tonic::Response<super::SessionUserResponse>,
|
||||||
tonic::Status,
|
tonic::Status,
|
||||||
> {
|
> {
|
||||||
self.inner
|
self.inner
|
||||||
@ -102,11 +102,11 @@ pub mod auth_service_client {
|
|||||||
})?;
|
})?;
|
||||||
let codec = tonic::codec::ProstCodec::default();
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
let path = http::uri::PathAndQuery::from_static(
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
"/auth.AuthService/GetSession",
|
"/auth.AuthService/GetSessionUser",
|
||||||
);
|
);
|
||||||
let mut req = request.into_request();
|
let mut req = request.into_request();
|
||||||
req.extensions_mut()
|
req.extensions_mut()
|
||||||
.insert(GrpcMethod::new("auth.AuthService", "GetSession"));
|
.insert(GrpcMethod::new("auth.AuthService", "GetSessionUser"));
|
||||||
self.inner.unary(req, path, codec).await
|
self.inner.unary(req, path, codec).await
|
||||||
}
|
}
|
||||||
pub async fn get_group_role(
|
pub async fn get_group_role(
|
||||||
@ -165,10 +165,13 @@ pub mod auth_service_server {
|
|||||||
/// Generated trait containing gRPC methods that should be implemented for use with AuthServiceServer.
|
/// Generated trait containing gRPC methods that should be implemented for use with AuthServiceServer.
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
pub trait AuthService: Send + Sync + 'static {
|
pub trait AuthService: Send + Sync + 'static {
|
||||||
async fn get_session(
|
async fn get_session_user(
|
||||||
&self,
|
&self,
|
||||||
request: tonic::Request<super::IdMessage>,
|
request: tonic::Request<super::IdMessage>,
|
||||||
) -> std::result::Result<tonic::Response<super::SessionResponse>, tonic::Status>;
|
) -> std::result::Result<
|
||||||
|
tonic::Response<super::SessionUserResponse>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
async fn get_group_role(
|
async fn get_group_role(
|
||||||
&self,
|
&self,
|
||||||
request: tonic::Request<super::IdMessage>,
|
request: tonic::Request<super::IdMessage>,
|
||||||
@ -260,12 +263,12 @@ pub mod auth_service_server {
|
|||||||
fn call(&mut self, req: http::Request<B>) -> Self::Future {
|
fn call(&mut self, req: http::Request<B>) -> Self::Future {
|
||||||
let inner = self.inner.clone();
|
let inner = self.inner.clone();
|
||||||
match req.uri().path() {
|
match req.uri().path() {
|
||||||
"/auth.AuthService/GetSession" => {
|
"/auth.AuthService/GetSessionUser" => {
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
struct GetSessionSvc<T: AuthService>(pub Arc<T>);
|
struct GetSessionUserSvc<T: AuthService>(pub Arc<T>);
|
||||||
impl<T: AuthService> tonic::server::UnaryService<super::IdMessage>
|
impl<T: AuthService> tonic::server::UnaryService<super::IdMessage>
|
||||||
for GetSessionSvc<T> {
|
for GetSessionUserSvc<T> {
|
||||||
type Response = super::SessionResponse;
|
type Response = super::SessionUserResponse;
|
||||||
type Future = BoxFuture<
|
type Future = BoxFuture<
|
||||||
tonic::Response<Self::Response>,
|
tonic::Response<Self::Response>,
|
||||||
tonic::Status,
|
tonic::Status,
|
||||||
@ -276,7 +279,7 @@ pub mod auth_service_server {
|
|||||||
) -> Self::Future {
|
) -> Self::Future {
|
||||||
let inner = Arc::clone(&self.0);
|
let inner = Arc::clone(&self.0);
|
||||||
let fut = async move {
|
let fut = async move {
|
||||||
<T as AuthService>::get_session(&inner, request).await
|
<T as AuthService>::get_session_user(&inner, request).await
|
||||||
};
|
};
|
||||||
Box::pin(fut)
|
Box::pin(fut)
|
||||||
}
|
}
|
||||||
@ -288,7 +291,7 @@ pub mod auth_service_server {
|
|||||||
let inner = self.inner.clone();
|
let inner = self.inner.clone();
|
||||||
let fut = async move {
|
let fut = async move {
|
||||||
let inner = inner.0;
|
let inner = inner.0;
|
||||||
let method = GetSessionSvc(inner);
|
let method = GetSessionUserSvc(inner);
|
||||||
let codec = tonic::codec::ProstCodec::default();
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
let mut grpc = tonic::server::Grpc::new(codec)
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
.apply_compression_config(
|
.apply_compression_config(
|
||||||
|
Loading…
Reference in New Issue
Block a user