redesigned proto files
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// src/adresar/handlers/delete_adresar.rs
|
||||
use tonic::Status;
|
||||
use sqlx::PgPool;
|
||||
use crate::proto::multieko2::{DeleteAdresarRequest, DeleteAdresarResponse};
|
||||
use crate::proto::multieko2::adresar::{DeleteAdresarRequest, DeleteAdresarResponse};
|
||||
|
||||
pub async fn delete_adresar(
|
||||
db_pool: &PgPool,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
use tonic::Status;
|
||||
use sqlx::PgPool;
|
||||
use crate::adresar::models::Adresar;
|
||||
use crate::proto::multieko2::{GetAdresarRequest, AdresarResponse};
|
||||
use crate::proto::multieko2::adresar::{GetAdresarRequest, AdresarResponse};
|
||||
|
||||
pub async fn get_adresar(
|
||||
db_pool: &PgPool,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// src/adresar/handlers/get_adresar_by_position.rs
|
||||
use tonic::{Status};
|
||||
use sqlx::PgPool;
|
||||
use crate::proto::multieko2::{PositionRequest, AdresarResponse, GetAdresarRequest};
|
||||
use crate::proto::multieko2::adresar::{PositionRequest, AdresarResponse, GetAdresarRequest};
|
||||
use super::get_adresar;
|
||||
|
||||
pub async fn get_adresar_by_position(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// src/adresar/handlers/get_adresar_count.rs
|
||||
use tonic::Status;
|
||||
use sqlx::PgPool;
|
||||
use crate::proto::multieko2::{CountResponse, Empty};
|
||||
use crate::proto::multieko2::adresar::{CountResponse, Empty};
|
||||
|
||||
pub async fn get_adresar_count(
|
||||
db_pool: &PgPool,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// src/adresar/handlers/get_table_structure.rs
|
||||
use tonic::Status;
|
||||
use sqlx::PgPool;
|
||||
use crate::proto::multieko2::{TableStructureResponse, TableColumn, Empty};
|
||||
use crate::proto::multieko2::adresar::{TableStructureResponse, TableColumn, Empty};
|
||||
|
||||
pub async fn get_table_structure(
|
||||
db_pool: &PgPool,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
use tonic::Status;
|
||||
use sqlx::PgPool;
|
||||
use crate::adresar::models::Adresar;
|
||||
use crate::proto::multieko2::{PostAdresarRequest, AdresarResponse};
|
||||
use crate::proto::multieko2::adresar::{PostAdresarRequest, AdresarResponse};
|
||||
|
||||
pub async fn post_adresar(
|
||||
db_pool: &PgPool,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
use tonic::Status;
|
||||
use sqlx::PgPool;
|
||||
use crate::adresar::models::Adresar;
|
||||
use crate::proto::multieko2::{PutAdresarRequest, AdresarResponse};
|
||||
use crate::proto::multieko2::adresar::{PutAdresarRequest, AdresarResponse};
|
||||
|
||||
pub async fn put_adresar(
|
||||
db_pool: &PgPool,
|
||||
|
||||
Binary file not shown.
@@ -1,10 +1,14 @@
|
||||
// src/proto/mod.rs
|
||||
pub mod multieko2 {
|
||||
tonic::include_proto!("multieko2");
|
||||
|
||||
pub mod adresar {
|
||||
tonic::include_proto!("multieko2.adresar");
|
||||
}
|
||||
|
||||
pub mod uctovnictvo {
|
||||
tonic::include_proto!("multieko2.uctovnictvo");
|
||||
}
|
||||
|
||||
// Include the file descriptor set
|
||||
pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("descriptor.bin");
|
||||
}
|
||||
|
||||
@@ -6,11 +6,13 @@ use crate::adresar::handlers::{
|
||||
};
|
||||
use crate::uctovnictvo::handlers::post_uctovnictvo;
|
||||
use crate::proto::multieko2::{
|
||||
FILE_DESCRIPTOR_SET,
|
||||
};
|
||||
use crate::proto::multieko2::adresar::{
|
||||
adresar_server::{Adresar, AdresarServer},
|
||||
PostAdresarRequest, AdresarResponse, GetAdresarRequest, PutAdresarRequest,
|
||||
DeleteAdresarRequest, DeleteAdresarResponse, PositionRequest, CountResponse, Empty,
|
||||
TableStructureResponse,
|
||||
adresar_server::{Adresar, AdresarServer},
|
||||
FILE_DESCRIPTOR_SET,
|
||||
};
|
||||
use crate::proto::multieko2::uctovnictvo::{
|
||||
uctovnictvo_server::{Uctovnictvo, UctovnictvoServer},
|
||||
|
||||
Reference in New Issue
Block a user