Skip to content

Commit

Permalink
add front page request
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDavenport committed Apr 18, 2024
1 parent 20f383d commit e68b82d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 5 additions & 1 deletion gamercade_interface/proto/platform.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ import "game.proto";
package platform;

service PlatformService {
rpc FrontPage(common.Empty) returns (FrontPageResponse);
rpc FrontPage(FrontPageRequest) returns (FrontPageResponse);
rpc GameSearch(GameSearchRequest) returns (game.MultipleGamesInfoResponse);
}

message FrontPageRequest {

}

message GameSearchRequest {
optional string name = 1;
repeated int32 tags = 2;
Expand Down
11 changes: 7 additions & 4 deletions gamercade_interface/src/output/platform.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FrontPageRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GameSearchRequest {
#[prost(string, optional, tag = "1")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
Expand Down Expand Up @@ -106,7 +109,7 @@ pub mod platform_service_client {
}
pub async fn front_page(
&mut self,
request: impl tonic::IntoRequest<super::super::common::Empty>,
request: impl tonic::IntoRequest<super::FrontPageRequest>,
) -> std::result::Result<
tonic::Response<super::FrontPageResponse>,
tonic::Status,
Expand Down Expand Up @@ -165,7 +168,7 @@ pub mod platform_service_server {
pub trait PlatformService: Send + Sync + 'static {
async fn front_page(
&self,
request: tonic::Request<super::super::common::Empty>,
request: tonic::Request<super::FrontPageRequest>,
) -> std::result::Result<
tonic::Response<super::FrontPageResponse>,
tonic::Status,
Expand Down Expand Up @@ -262,7 +265,7 @@ pub mod platform_service_server {
struct FrontPageSvc<T: PlatformService>(pub Arc<T>);
impl<
T: PlatformService,
> tonic::server::UnaryService<super::super::common::Empty>
> tonic::server::UnaryService<super::FrontPageRequest>
for FrontPageSvc<T> {
type Response = super::FrontPageResponse;
type Future = BoxFuture<
Expand All @@ -271,7 +274,7 @@ pub mod platform_service_server {
>;
fn call(
&mut self,
request: tonic::Request<super::super::common::Empty>,
request: tonic::Request<super::FrontPageRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
Expand Down

0 comments on commit e68b82d

Please sign in to comment.