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)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename_all = "PascalCase")]
|
||||
pub struct SessionResponse {
|
||||
#[prost(string, tag="1")]
|
||||
pub session_id: ::prost::alloc::string::String,
|
||||
#[prost(uint64, tag="2")]
|
||||
pub struct SessionUserResponse {
|
||||
#[prost(uint64, tag="1")]
|
||||
#[serde(rename = "UserID")]
|
||||
pub user_id: u64,
|
||||
#[prost(string, tag="3")]
|
||||
#[prost(string, tag="2")]
|
||||
pub username: ::prost::alloc::string::String,
|
||||
#[prost(uint64, tag="4")]
|
||||
pub created: u64,
|
||||
#[prost(uint64, tag="5")]
|
||||
pub expires: u64,
|
||||
#[prost(string, tag="3")]
|
||||
pub avatar_url: ::prost::alloc::string::String,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[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
|
||||
}
|
||||
pub async fn get_session(
|
||||
pub async fn get_session_user(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::IdMessage>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::SessionResponse>,
|
||||
tonic::Response<super::SessionUserResponse>,
|
||||
tonic::Status,
|
||||
> {
|
||||
self.inner
|
||||
@ -102,11 +102,11 @@ pub mod auth_service_client {
|
||||
})?;
|
||||
let codec = tonic::codec::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/auth.AuthService/GetSession",
|
||||
"/auth.AuthService/GetSessionUser",
|
||||
);
|
||||
let mut req = request.into_request();
|
||||
req.extensions_mut()
|
||||
.insert(GrpcMethod::new("auth.AuthService", "GetSession"));
|
||||
.insert(GrpcMethod::new("auth.AuthService", "GetSessionUser"));
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
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.
|
||||
#[async_trait]
|
||||
pub trait AuthService: Send + Sync + 'static {
|
||||
async fn get_session(
|
||||
async fn get_session_user(
|
||||
&self,
|
||||
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(
|
||||
&self,
|
||||
request: tonic::Request<super::IdMessage>,
|
||||
@ -260,12 +263,12 @@ pub mod auth_service_server {
|
||||
fn call(&mut self, req: http::Request<B>) -> Self::Future {
|
||||
let inner = self.inner.clone();
|
||||
match req.uri().path() {
|
||||
"/auth.AuthService/GetSession" => {
|
||||
"/auth.AuthService/GetSessionUser" => {
|
||||
#[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>
|
||||
for GetSessionSvc<T> {
|
||||
type Response = super::SessionResponse;
|
||||
for GetSessionUserSvc<T> {
|
||||
type Response = super::SessionUserResponse;
|
||||
type Future = BoxFuture<
|
||||
tonic::Response<Self::Response>,
|
||||
tonic::Status,
|
||||
@ -276,7 +279,7 @@ pub mod auth_service_server {
|
||||
) -> Self::Future {
|
||||
let inner = Arc::clone(&self.0);
|
||||
let fut = async move {
|
||||
<T as AuthService>::get_session(&inner, request).await
|
||||
<T as AuthService>::get_session_user(&inner, request).await
|
||||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
@ -288,7 +291,7 @@ pub mod auth_service_server {
|
||||
let inner = self.inner.clone();
|
||||
let fut = async move {
|
||||
let inner = inner.0;
|
||||
let method = GetSessionSvc(inner);
|
||||
let method = GetSessionUserSvc(inner);
|
||||
let codec = tonic::codec::ProstCodec::default();
|
||||
let mut grpc = tonic::server::Grpc::new(codec)
|
||||
.apply_compression_config(
|
||||
|
Loading…
Reference in New Issue
Block a user