-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathinterfaces.rs
More file actions
50 lines (44 loc) · 1.35 KB
/
interfaces.rs
File metadata and controls
50 lines (44 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use serde::{Deserialize, Serialize};
use crate::executor::ExecutorName;
use crate::instruments::InstrumentName;
use crate::run_environment::{RepositoryProvider, RunEnvironment, RunEnvironmentMetadata, RunPart};
use crate::system::SystemInfo;
pub const LATEST_UPLOAD_METADATA_VERSION: u32 = 10;
#[derive(Deserialize, Serialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct UploadMetadata {
pub repository_provider: RepositoryProvider,
pub version: Option<u32>,
pub tokenless: bool,
pub profile_md5: String,
pub profile_encoding: Option<String>,
pub runner: Runner,
pub run_environment: RunEnvironment,
pub run_part: Option<RunPart>,
pub commit_hash: String,
pub allow_empty: bool,
#[serde(flatten)]
pub run_environment_metadata: RunEnvironmentMetadata,
}
#[derive(Deserialize, Serialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct Runner {
pub name: String,
pub version: String,
pub instruments: Vec<InstrumentName>,
pub executor: ExecutorName,
#[serde(flatten)]
pub system_info: SystemInfo,
}
#[derive(Deserialize, Serialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct UploadData {
pub status: String,
pub upload_url: String,
pub run_id: String,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct UploadError {
pub error: String,
}