rename part 1: move files
This commit is contained in:
parent
6e21447d4b
commit
e855ace229
validation/src
@ -2,8 +2,8 @@ use futures::StreamExt;
|
||||
|
||||
mod nats_types;
|
||||
mod validator;
|
||||
mod publish_new;
|
||||
mod publish_fix;
|
||||
mod upload_new;
|
||||
mod upload_fix;
|
||||
mod message_handler;
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
@ -5,8 +5,8 @@ pub enum HandleMessageError{
|
||||
DoubleAck(async_nats::Error),
|
||||
Json(serde_json::Error),
|
||||
UnknownSubject(String),
|
||||
PublishNew(crate::publish_new::PublishError),
|
||||
PublishFix(crate::publish_fix::PublishError),
|
||||
PublishNew(crate::upload_new::PublishError),
|
||||
PublishFix(crate::upload_fix::PublishError),
|
||||
Validation(crate::validator::ValidateError),
|
||||
}
|
||||
impl std::fmt::Display for HandleMessageError{
|
||||
@ -23,8 +23,8 @@ fn from_slice<'a,T:serde::de::Deserialize<'a>>(slice:&'a [u8])->Result<T,HandleM
|
||||
}
|
||||
|
||||
pub struct MessageHandler{
|
||||
publish_new:crate::publish_new::Publisher,
|
||||
publish_fix:crate::publish_fix::Publisher,
|
||||
publish_new:crate::upload_new::Publisher,
|
||||
publish_fix:crate::upload_fix::Publisher,
|
||||
validator:crate::validator::Validator,
|
||||
}
|
||||
|
||||
@ -35,8 +35,8 @@ impl MessageHandler{
|
||||
api:submissions_api::internal::Context,
|
||||
)->Self{
|
||||
Self{
|
||||
publish_new:crate::publish_new::Publisher::new(cookie_context.clone(),group_id,api.clone()),
|
||||
publish_fix:crate::publish_fix::Publisher::new(cookie_context.clone(),group_id,api.clone()),
|
||||
publish_new:crate::upload_new::Publisher::new(cookie_context.clone(),group_id,api.clone()),
|
||||
publish_fix:crate::upload_fix::Publisher::new(cookie_context.clone(),group_id,api.clone()),
|
||||
validator:crate::validator::Validator::new(cookie_context,api),
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user