json
This commit is contained in:
parent
895a3f1249
commit
92fe223d96
2
validation/Cargo.lock
generated
2
validation/Cargo.lock
generated
@ -1182,6 +1182,8 @@ dependencies = [
|
||||
"rbx_binary",
|
||||
"rbx_dom_weak",
|
||||
"rbx_xml",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sqlx",
|
||||
"tokio",
|
||||
]
|
||||
|
@ -10,5 +10,7 @@ rbx_asset = { version = "0.2.3", registry = "strafesnet" }
|
||||
rbx_binary = { version = "0.7.4", registry = "strafesnet"}
|
||||
rbx_dom_weak = { version = "2.9.0", registry = "strafesnet"}
|
||||
rbx_xml = { version = "0.13.3", registry = "strafesnet"}
|
||||
serde = { version = "1.0.215", features = ["derive"] }
|
||||
serde_json = "1.0.133"
|
||||
sqlx = "0.8.2"
|
||||
tokio = { version = "1.41.1", features = ["macros", "rt-multi-thread", "fs"] }
|
||||
|
@ -1,3 +1,4 @@
|
||||
mod nats_types;
|
||||
mod publisher;
|
||||
mod validator;
|
||||
|
||||
|
47
validation/src/nats_types.rs
Normal file
47
validation/src/nats_types.rs
Normal file
@ -0,0 +1,47 @@
|
||||
// These represent the information needed in the nats message
|
||||
// to perform the operation, not necessarily the over-the-wire format
|
||||
|
||||
// Requests are sent from maps-service to validator
|
||||
// Responses are sent from validator to maps-service
|
||||
|
||||
#[derive(serde::Deserialize)]
|
||||
pub struct ValidateRequest{
|
||||
// submission_id is passed back in the response message
|
||||
pub submission_id:u64,
|
||||
pub model_id:u64,
|
||||
pub model_version:u64,
|
||||
}
|
||||
|
||||
pub struct ValidateResponse{
|
||||
pub submission_id:u64,
|
||||
// model id will be changed if scripts were replaced
|
||||
pub model_id:u64,
|
||||
pub model_version:u64,
|
||||
}
|
||||
|
||||
// an invalidate is sent instead if validation fails
|
||||
pub struct InvalidateResponse{
|
||||
pub submission_id:u64,
|
||||
}
|
||||
|
||||
// Create a new map
|
||||
pub struct PublishNewRequest{
|
||||
pub submission_id:u64,
|
||||
pub model_id:u64,
|
||||
pub model_version:u64,
|
||||
pub creator:String,
|
||||
pub display_name:String,
|
||||
//games:HashSet<GameID>,
|
||||
}
|
||||
|
||||
pub struct PublishFixRequest{
|
||||
pub submission_id:u64,
|
||||
pub model_id:u64,
|
||||
pub model_version:u64,
|
||||
pub target_asset_id:u64,
|
||||
}
|
||||
|
||||
pub struct PublishResponse{
|
||||
pub submission_id:u64,
|
||||
pub success:bool,
|
||||
}
|
Loading…
Reference in New Issue
Block a user