update dropshot and typify (#383)
This commit is contained in:
parent
118f99bf13
commit
3f47ff856c
|
@ -39,19 +39,20 @@ checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4"
|
|||
|
||||
[[package]]
|
||||
name = "async-stream"
|
||||
version = "0.3.3"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e"
|
||||
checksum = "ad445822218ce64be7a341abfb0b1ea43b5c23aa83902542a4542e78309d8e5e"
|
||||
dependencies = [
|
||||
"async-stream-impl",
|
||||
"futures-core",
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-stream-impl"
|
||||
version = "0.3.3"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27"
|
||||
checksum = "e4655ae1a7b0cdf149156f780c5bf3f1352bc53cbd9e0a361a7ef7b22947e965"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -60,13 +61,13 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "async-trait"
|
||||
version = "0.1.57"
|
||||
version = "0.1.67"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f"
|
||||
checksum = "86ea188f25f0255d8f92797797c97ebf5631fa88178beb1a46fdf5622c9a00e4"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
"syn 2.0.7",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -86,12 +87,6 @@ version = "1.0.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.21.0"
|
||||
|
@ -141,6 +136,15 @@ version = "1.4.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
|
||||
|
||||
[[package]]
|
||||
name = "camino"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cargo-lock"
|
||||
version = "8.0.3"
|
||||
|
@ -149,7 +153,7 @@ checksum = "031718ddb8f78aa5def78a09e90defe30151d1f6c672f937af4dd916429ed996"
|
|||
dependencies = [
|
||||
"semver 1.0.16",
|
||||
"serde",
|
||||
"toml",
|
||||
"toml 0.5.9",
|
||||
"url",
|
||||
]
|
||||
|
||||
|
@ -291,9 +295,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.10.3"
|
||||
version = "0.10.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506"
|
||||
checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f"
|
||||
dependencies = [
|
||||
"block-buffer",
|
||||
"crypto-common",
|
||||
|
@ -322,15 +326,17 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "dropshot"
|
||||
version = "0.7.1-dev"
|
||||
source = "git+https://github.com/oxidecomputer/dropshot#0207056d2ac687c7db5c431f543dbd475ad16e84"
|
||||
version = "0.9.1-dev"
|
||||
source = "git+https://github.com/oxidecomputer/dropshot#6ecc57a8854fafe6894459788ac331809df740f1"
|
||||
dependencies = [
|
||||
"async-stream",
|
||||
"async-trait",
|
||||
"base64 0.13.1",
|
||||
"base64",
|
||||
"bytes",
|
||||
"camino",
|
||||
"chrono",
|
||||
"dropshot_endpoint",
|
||||
"form_urlencoded",
|
||||
"futures",
|
||||
"hostname",
|
||||
"http",
|
||||
|
@ -345,6 +351,7 @@ dependencies = [
|
|||
"schemars",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_path_to_error",
|
||||
"serde_urlencoded",
|
||||
"sha1",
|
||||
"slog",
|
||||
|
@ -354,21 +361,21 @@ dependencies = [
|
|||
"slog-term",
|
||||
"tokio",
|
||||
"tokio-rustls",
|
||||
"toml",
|
||||
"toml 0.7.3",
|
||||
"uuid",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dropshot_endpoint"
|
||||
version = "0.7.1-dev"
|
||||
source = "git+https://github.com/oxidecomputer/dropshot#0207056d2ac687c7db5c431f543dbd475ad16e84"
|
||||
version = "0.9.1-dev"
|
||||
source = "git+https://github.com/oxidecomputer/dropshot#6ecc57a8854fafe6894459788ac331809df740f1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"serde",
|
||||
"serde_tokenstream 0.1.7",
|
||||
"syn 1.0.109",
|
||||
"serde_tokenstream",
|
||||
"syn 2.0.7",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -417,7 +424,7 @@ dependencies = [
|
|||
name = "example-build"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"base64 0.21.0",
|
||||
"base64",
|
||||
"chrono",
|
||||
"progenitor",
|
||||
"progenitor-client",
|
||||
|
@ -483,11 +490,10 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
|
|||
|
||||
[[package]]
|
||||
name = "form_urlencoded"
|
||||
version = "1.0.1"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
|
||||
checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
|
||||
dependencies = [
|
||||
"matches",
|
||||
"percent-encoding",
|
||||
]
|
||||
|
||||
|
@ -1038,9 +1044,9 @@ checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e"
|
|||
|
||||
[[package]]
|
||||
name = "openapiv3"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b6b4689110fd71f196934fbdf1ad0f0a4b49ea41fbc6f19008c00dba735b544c"
|
||||
checksum = "7b1a9f106eb0a780abd17ba9fca8e0843e3461630bcbe2af0ad4d5d3ba4e9aa4"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
|
@ -1111,9 +1117,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "paste"
|
||||
version = "1.0.9"
|
||||
version = "1.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1"
|
||||
checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79"
|
||||
|
||||
[[package]]
|
||||
name = "percent-encoding"
|
||||
|
@ -1192,7 +1198,7 @@ name = "progenitor"
|
|||
version = "0.2.1-dev"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64 0.21.0",
|
||||
"base64",
|
||||
"built",
|
||||
"chrono",
|
||||
"clap",
|
||||
|
@ -1263,7 +1269,7 @@ dependencies = [
|
|||
"schemars",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_tokenstream 0.2.0",
|
||||
"serde_tokenstream",
|
||||
"serde_yaml",
|
||||
"syn 2.0.8",
|
||||
]
|
||||
|
@ -1374,7 +1380,7 @@ version = "0.11.15"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ba30cc2c0cd02af1222ed216ba659cdb2f879dfe3181852fe7c50b1d0005949"
|
||||
dependencies = [
|
||||
"base64 0.21.0",
|
||||
"base64",
|
||||
"bytes",
|
||||
"encoding_rs",
|
||||
"futures-core",
|
||||
|
@ -1431,7 +1437,7 @@ dependencies = [
|
|||
"serde",
|
||||
"tempfile",
|
||||
"thiserror",
|
||||
"toml",
|
||||
"toml 0.5.9",
|
||||
"toolchain_find",
|
||||
]
|
||||
|
||||
|
@ -1451,9 +1457,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rustls"
|
||||
version = "0.20.6"
|
||||
version = "0.20.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033"
|
||||
checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f"
|
||||
dependencies = [
|
||||
"log",
|
||||
"ring",
|
||||
|
@ -1463,11 +1469,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rustls-pemfile"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55"
|
||||
checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b"
|
||||
dependencies = [
|
||||
"base64 0.13.1",
|
||||
"base64",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1636,14 +1642,21 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_tokenstream"
|
||||
version = "0.1.7"
|
||||
name = "serde_path_to_error"
|
||||
version = "0.1.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "797ba1d80299b264f3aac68ab5d12e5825a561749db4df7cd7c8083900c5d4e9"
|
||||
checksum = "f7f05c1d5476066defcdfacce1f52fc3cae3af1d3089727100c02ae92e5abbe0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_spanned"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"serde",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1685,9 +1698,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sha1"
|
||||
version = "0.10.4"
|
||||
version = "0.10.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "006769ba83e921b3085caa8334186b00cf92b4cb1a6cf4632fbccc8eff5c7549"
|
||||
checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
|
@ -2021,6 +2034,40 @@ dependencies = [
|
|||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"toml_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_datetime"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.19.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toolchain_find"
|
||||
version = "0.2.0"
|
||||
|
@ -2074,8 +2121,8 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
|
|||
|
||||
[[package]]
|
||||
name = "typify"
|
||||
version = "0.0.11-dev"
|
||||
source = "git+https://github.com/oxidecomputer/typify#b35e5c06e7e67bfc350840d00bf86a19bff662a7"
|
||||
version = "0.0.12-dev"
|
||||
source = "git+https://github.com/oxidecomputer/typify#44f52879905a135d37ed06aaf87dbd9df5d72b2f"
|
||||
dependencies = [
|
||||
"typify-impl",
|
||||
"typify-macro",
|
||||
|
@ -2083,8 +2130,8 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "typify-impl"
|
||||
version = "0.0.11-dev"
|
||||
source = "git+https://github.com/oxidecomputer/typify#b35e5c06e7e67bfc350840d00bf86a19bff662a7"
|
||||
version = "0.0.12-dev"
|
||||
source = "git+https://github.com/oxidecomputer/typify#44f52879905a135d37ed06aaf87dbd9df5d72b2f"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"log",
|
||||
|
@ -2093,23 +2140,23 @@ dependencies = [
|
|||
"regress",
|
||||
"schemars",
|
||||
"serde_json",
|
||||
"syn 1.0.109",
|
||||
"syn 2.0.7",
|
||||
"thiserror",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "typify-macro"
|
||||
version = "0.0.11-dev"
|
||||
source = "git+https://github.com/oxidecomputer/typify#b35e5c06e7e67bfc350840d00bf86a19bff662a7"
|
||||
version = "0.0.12-dev"
|
||||
source = "git+https://github.com/oxidecomputer/typify#44f52879905a135d37ed06aaf87dbd9df5d72b2f"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"schemars",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_tokenstream 0.1.7",
|
||||
"syn 1.0.109",
|
||||
"serde_tokenstream",
|
||||
"syn 2.0.7",
|
||||
"typify-impl",
|
||||
]
|
||||
|
||||
|
@ -2504,6 +2551,15 @@ version = "0.42.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "deac0939bd6e4f24ab5919fbf751c97a8cfc8543bb083a305ed5c0c10bb241d1"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winreg"
|
||||
version = "0.10.1"
|
||||
|
|
|
@ -450,6 +450,18 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::Task> for Task {
|
||||
fn from(value: super::Task) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
name: Ok(value.name),
|
||||
output_rules: Ok(value.output_rules),
|
||||
script: Ok(value.script),
|
||||
state: Ok(value.state),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TaskEvent {
|
||||
payload: Result<String, String>,
|
||||
seq: Result<u32, String>,
|
||||
|
@ -523,6 +535,17 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::TaskEvent> for TaskEvent {
|
||||
fn from(value: super::TaskEvent) -> Self {
|
||||
Self {
|
||||
payload: Ok(value.payload),
|
||||
seq: Ok(value.seq),
|
||||
stream: Ok(value.stream),
|
||||
time: Ok(value.time),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TaskOutput {
|
||||
id: Result<String, String>,
|
||||
path: Result<String, String>,
|
||||
|
@ -583,6 +606,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::TaskOutput> for TaskOutput {
|
||||
fn from(value: super::TaskOutput) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
path: Ok(value.path),
|
||||
size: Ok(value.size),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TaskSubmit {
|
||||
name: Result<String, String>,
|
||||
output_rules: Result<Vec<String>, String>,
|
||||
|
@ -643,6 +676,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::TaskSubmit> for TaskSubmit {
|
||||
fn from(value: super::TaskSubmit) -> Self {
|
||||
Self {
|
||||
name: Ok(value.name),
|
||||
output_rules: Ok(value.output_rules),
|
||||
script: Ok(value.script),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TaskSubmitResult {
|
||||
id: Result<String, String>,
|
||||
}
|
||||
|
@ -675,6 +718,12 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::TaskSubmitResult> for TaskSubmitResult {
|
||||
fn from(value: super::TaskSubmitResult) -> Self {
|
||||
Self { id: Ok(value.id) }
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UploadedChunk {
|
||||
id: Result<String, String>,
|
||||
}
|
||||
|
@ -707,6 +756,12 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::UploadedChunk> for UploadedChunk {
|
||||
fn from(value: super::UploadedChunk) -> Self {
|
||||
Self { id: Ok(value.id) }
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UserCreate {
|
||||
name: Result<String, String>,
|
||||
}
|
||||
|
@ -739,6 +794,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::UserCreate> for UserCreate {
|
||||
fn from(value: super::UserCreate) -> Self {
|
||||
Self {
|
||||
name: Ok(value.name),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UserCreateResult {
|
||||
id: Result<String, String>,
|
||||
name: Result<String, String>,
|
||||
|
@ -799,6 +862,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::UserCreateResult> for UserCreateResult {
|
||||
fn from(value: super::UserCreateResult) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
name: Ok(value.name),
|
||||
token: Ok(value.token),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WhoamiResult {
|
||||
id: Result<String, String>,
|
||||
name: Result<String, String>,
|
||||
|
@ -846,6 +919,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WhoamiResult> for WhoamiResult {
|
||||
fn from(value: super::WhoamiResult) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
name: Ok(value.name),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Worker {
|
||||
deleted: Result<bool, String>,
|
||||
id: Result<String, String>,
|
||||
|
@ -945,6 +1027,19 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::Worker> for Worker {
|
||||
fn from(value: super::Worker) -> Self {
|
||||
Self {
|
||||
deleted: Ok(value.deleted),
|
||||
id: Ok(value.id),
|
||||
instance_id: Ok(value.instance_id),
|
||||
lastping: Ok(value.lastping),
|
||||
recycle: Ok(value.recycle),
|
||||
tasks: Ok(value.tasks),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerAddOutput {
|
||||
chunks: Result<Vec<String>, String>,
|
||||
path: Result<String, String>,
|
||||
|
@ -1005,6 +1100,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerAddOutput> for WorkerAddOutput {
|
||||
fn from(value: super::WorkerAddOutput) -> Self {
|
||||
Self {
|
||||
chunks: Ok(value.chunks),
|
||||
path: Ok(value.path),
|
||||
size: Ok(value.size),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerAppendTask {
|
||||
payload: Result<String, String>,
|
||||
stream: Result<String, String>,
|
||||
|
@ -1065,6 +1170,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerAppendTask> for WorkerAppendTask {
|
||||
fn from(value: super::WorkerAppendTask) -> Self {
|
||||
Self {
|
||||
payload: Ok(value.payload),
|
||||
stream: Ok(value.stream),
|
||||
time: Ok(value.time),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerBootstrap {
|
||||
bootstrap: Result<String, String>,
|
||||
token: Result<String, String>,
|
||||
|
@ -1112,6 +1227,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerBootstrap> for WorkerBootstrap {
|
||||
fn from(value: super::WorkerBootstrap) -> Self {
|
||||
Self {
|
||||
bootstrap: Ok(value.bootstrap),
|
||||
token: Ok(value.token),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerBootstrapResult {
|
||||
id: Result<String, String>,
|
||||
}
|
||||
|
@ -1144,6 +1268,12 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerBootstrapResult> for WorkerBootstrapResult {
|
||||
fn from(value: super::WorkerBootstrapResult) -> Self {
|
||||
Self { id: Ok(value.id) }
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerCompleteTask {
|
||||
failed: Result<bool, String>,
|
||||
}
|
||||
|
@ -1178,6 +1308,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerCompleteTask> for WorkerCompleteTask {
|
||||
fn from(value: super::WorkerCompleteTask) -> Self {
|
||||
Self {
|
||||
failed: Ok(value.failed),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerPingResult {
|
||||
poweroff: Result<bool, String>,
|
||||
task: Result<Option<super::WorkerPingTask>, String>,
|
||||
|
@ -1225,6 +1363,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerPingResult> for WorkerPingResult {
|
||||
fn from(value: super::WorkerPingResult) -> Self {
|
||||
Self {
|
||||
poweroff: Ok(value.poweroff),
|
||||
task: Ok(value.task),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerPingTask {
|
||||
id: Result<String, String>,
|
||||
output_rules: Result<Vec<String>, String>,
|
||||
|
@ -1285,6 +1432,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerPingTask> for WorkerPingTask {
|
||||
fn from(value: super::WorkerPingTask) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
output_rules: Ok(value.output_rules),
|
||||
script: Ok(value.script),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerTask {
|
||||
id: Result<String, String>,
|
||||
name: Result<String, String>,
|
||||
|
@ -1345,6 +1502,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerTask> for WorkerTask {
|
||||
fn from(value: super::WorkerTask) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
name: Ok(value.name),
|
||||
owner: Ok(value.owner),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkersResult {
|
||||
workers: Result<Vec<super::Worker>, String>,
|
||||
}
|
||||
|
@ -1378,6 +1545,14 @@ pub mod types {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkersResult> for WorkersResult {
|
||||
fn from(value: super::WorkersResult) -> Self {
|
||||
Self {
|
||||
workers: Ok(value.workers),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -450,6 +450,18 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::Task> for Task {
|
||||
fn from(value: super::Task) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
name: Ok(value.name),
|
||||
output_rules: Ok(value.output_rules),
|
||||
script: Ok(value.script),
|
||||
state: Ok(value.state),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TaskEvent {
|
||||
payload: Result<String, String>,
|
||||
seq: Result<u32, String>,
|
||||
|
@ -523,6 +535,17 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::TaskEvent> for TaskEvent {
|
||||
fn from(value: super::TaskEvent) -> Self {
|
||||
Self {
|
||||
payload: Ok(value.payload),
|
||||
seq: Ok(value.seq),
|
||||
stream: Ok(value.stream),
|
||||
time: Ok(value.time),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TaskOutput {
|
||||
id: Result<String, String>,
|
||||
path: Result<String, String>,
|
||||
|
@ -583,6 +606,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::TaskOutput> for TaskOutput {
|
||||
fn from(value: super::TaskOutput) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
path: Ok(value.path),
|
||||
size: Ok(value.size),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TaskSubmit {
|
||||
name: Result<String, String>,
|
||||
output_rules: Result<Vec<String>, String>,
|
||||
|
@ -643,6 +676,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::TaskSubmit> for TaskSubmit {
|
||||
fn from(value: super::TaskSubmit) -> Self {
|
||||
Self {
|
||||
name: Ok(value.name),
|
||||
output_rules: Ok(value.output_rules),
|
||||
script: Ok(value.script),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TaskSubmitResult {
|
||||
id: Result<String, String>,
|
||||
}
|
||||
|
@ -675,6 +718,12 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::TaskSubmitResult> for TaskSubmitResult {
|
||||
fn from(value: super::TaskSubmitResult) -> Self {
|
||||
Self { id: Ok(value.id) }
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UploadedChunk {
|
||||
id: Result<String, String>,
|
||||
}
|
||||
|
@ -707,6 +756,12 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::UploadedChunk> for UploadedChunk {
|
||||
fn from(value: super::UploadedChunk) -> Self {
|
||||
Self { id: Ok(value.id) }
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UserCreate {
|
||||
name: Result<String, String>,
|
||||
}
|
||||
|
@ -739,6 +794,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::UserCreate> for UserCreate {
|
||||
fn from(value: super::UserCreate) -> Self {
|
||||
Self {
|
||||
name: Ok(value.name),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UserCreateResult {
|
||||
id: Result<String, String>,
|
||||
name: Result<String, String>,
|
||||
|
@ -799,6 +862,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::UserCreateResult> for UserCreateResult {
|
||||
fn from(value: super::UserCreateResult) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
name: Ok(value.name),
|
||||
token: Ok(value.token),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WhoamiResult {
|
||||
id: Result<String, String>,
|
||||
name: Result<String, String>,
|
||||
|
@ -846,6 +919,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WhoamiResult> for WhoamiResult {
|
||||
fn from(value: super::WhoamiResult) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
name: Ok(value.name),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Worker {
|
||||
deleted: Result<bool, String>,
|
||||
id: Result<String, String>,
|
||||
|
@ -945,6 +1027,19 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::Worker> for Worker {
|
||||
fn from(value: super::Worker) -> Self {
|
||||
Self {
|
||||
deleted: Ok(value.deleted),
|
||||
id: Ok(value.id),
|
||||
instance_id: Ok(value.instance_id),
|
||||
lastping: Ok(value.lastping),
|
||||
recycle: Ok(value.recycle),
|
||||
tasks: Ok(value.tasks),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerAddOutput {
|
||||
chunks: Result<Vec<String>, String>,
|
||||
path: Result<String, String>,
|
||||
|
@ -1005,6 +1100,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerAddOutput> for WorkerAddOutput {
|
||||
fn from(value: super::WorkerAddOutput) -> Self {
|
||||
Self {
|
||||
chunks: Ok(value.chunks),
|
||||
path: Ok(value.path),
|
||||
size: Ok(value.size),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerAppendTask {
|
||||
payload: Result<String, String>,
|
||||
stream: Result<String, String>,
|
||||
|
@ -1065,6 +1170,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerAppendTask> for WorkerAppendTask {
|
||||
fn from(value: super::WorkerAppendTask) -> Self {
|
||||
Self {
|
||||
payload: Ok(value.payload),
|
||||
stream: Ok(value.stream),
|
||||
time: Ok(value.time),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerBootstrap {
|
||||
bootstrap: Result<String, String>,
|
||||
token: Result<String, String>,
|
||||
|
@ -1112,6 +1227,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerBootstrap> for WorkerBootstrap {
|
||||
fn from(value: super::WorkerBootstrap) -> Self {
|
||||
Self {
|
||||
bootstrap: Ok(value.bootstrap),
|
||||
token: Ok(value.token),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerBootstrapResult {
|
||||
id: Result<String, String>,
|
||||
}
|
||||
|
@ -1144,6 +1268,12 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerBootstrapResult> for WorkerBootstrapResult {
|
||||
fn from(value: super::WorkerBootstrapResult) -> Self {
|
||||
Self { id: Ok(value.id) }
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerCompleteTask {
|
||||
failed: Result<bool, String>,
|
||||
}
|
||||
|
@ -1178,6 +1308,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerCompleteTask> for WorkerCompleteTask {
|
||||
fn from(value: super::WorkerCompleteTask) -> Self {
|
||||
Self {
|
||||
failed: Ok(value.failed),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerPingResult {
|
||||
poweroff: Result<bool, String>,
|
||||
task: Result<Option<super::WorkerPingTask>, String>,
|
||||
|
@ -1225,6 +1363,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerPingResult> for WorkerPingResult {
|
||||
fn from(value: super::WorkerPingResult) -> Self {
|
||||
Self {
|
||||
poweroff: Ok(value.poweroff),
|
||||
task: Ok(value.task),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerPingTask {
|
||||
id: Result<String, String>,
|
||||
output_rules: Result<Vec<String>, String>,
|
||||
|
@ -1285,6 +1432,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerPingTask> for WorkerPingTask {
|
||||
fn from(value: super::WorkerPingTask) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
output_rules: Ok(value.output_rules),
|
||||
script: Ok(value.script),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkerTask {
|
||||
id: Result<String, String>,
|
||||
name: Result<String, String>,
|
||||
|
@ -1345,6 +1502,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkerTask> for WorkerTask {
|
||||
fn from(value: super::WorkerTask) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
name: Ok(value.name),
|
||||
owner: Ok(value.owner),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkersResult {
|
||||
workers: Result<Vec<super::Worker>, String>,
|
||||
}
|
||||
|
@ -1378,6 +1545,14 @@ pub mod types {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl From<super::WorkersResult> for WorkersResult {
|
||||
fn from(value: super::WorkersResult) -> Self {
|
||||
Self {
|
||||
workers: Ok(value.workers),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -244,6 +244,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::EnrolBody> for EnrolBody {
|
||||
fn from(value: super::EnrolBody) -> Self {
|
||||
Self {
|
||||
host: Ok(value.host),
|
||||
key: Ok(value.key),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct GlobalJobsResult {
|
||||
summary: Result<Vec<super::ReportSummary>, String>,
|
||||
}
|
||||
|
@ -278,6 +287,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::GlobalJobsResult> for GlobalJobsResult {
|
||||
fn from(value: super::GlobalJobsResult) -> Self {
|
||||
Self {
|
||||
summary: Ok(value.summary),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct OutputRecord {
|
||||
msg: Result<String, String>,
|
||||
stream: Result<String, String>,
|
||||
|
@ -338,6 +355,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::OutputRecord> for OutputRecord {
|
||||
fn from(value: super::OutputRecord) -> Self {
|
||||
Self {
|
||||
msg: Ok(value.msg),
|
||||
stream: Ok(value.stream),
|
||||
time: Ok(value.time),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PingResult {
|
||||
host: Result<String, String>,
|
||||
ok: Result<bool, String>,
|
||||
|
@ -385,6 +412,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::PingResult> for PingResult {
|
||||
fn from(value: super::PingResult) -> Self {
|
||||
Self {
|
||||
host: Ok(value.host),
|
||||
ok: Ok(value.ok),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ReportFinishBody {
|
||||
duration_millis: Result<i32, String>,
|
||||
end_time: Result<chrono::DateTime<chrono::offset::Utc>, String>,
|
||||
|
@ -458,6 +494,17 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::ReportFinishBody> for ReportFinishBody {
|
||||
fn from(value: super::ReportFinishBody) -> Self {
|
||||
Self {
|
||||
duration_millis: Ok(value.duration_millis),
|
||||
end_time: Ok(value.end_time),
|
||||
exit_status: Ok(value.exit_status),
|
||||
id: Ok(value.id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ReportId {
|
||||
host: Result<String, String>,
|
||||
job: Result<String, String>,
|
||||
|
@ -544,6 +591,18 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::ReportId> for ReportId {
|
||||
fn from(value: super::ReportId) -> Self {
|
||||
Self {
|
||||
host: Ok(value.host),
|
||||
job: Ok(value.job),
|
||||
pid: Ok(value.pid),
|
||||
time: Ok(value.time),
|
||||
uuid: Ok(value.uuid),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ReportOutputBody {
|
||||
id: Result<super::ReportId, String>,
|
||||
record: Result<super::OutputRecord, String>,
|
||||
|
@ -591,6 +650,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::ReportOutputBody> for ReportOutputBody {
|
||||
fn from(value: super::ReportOutputBody) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
record: Ok(value.record),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ReportResult {
|
||||
existed_already: Result<bool, String>,
|
||||
}
|
||||
|
@ -625,6 +693,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::ReportResult> for ReportResult {
|
||||
fn from(value: super::ReportResult) -> Self {
|
||||
Self {
|
||||
existed_already: Ok(value.existed_already),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ReportStartBody {
|
||||
id: Result<super::ReportId, String>,
|
||||
script: Result<String, String>,
|
||||
|
@ -685,6 +761,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::ReportStartBody> for ReportStartBody {
|
||||
fn from(value: super::ReportStartBody) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
script: Ok(value.script),
|
||||
start_time: Ok(value.start_time),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ReportSummary {
|
||||
age_seconds: Result<i32, String>,
|
||||
duration_seconds: Result<i32, String>,
|
||||
|
@ -786,6 +872,19 @@ pub mod types {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl From<super::ReportSummary> for ReportSummary {
|
||||
fn from(value: super::ReportSummary) -> Self {
|
||||
Self {
|
||||
age_seconds: Ok(value.age_seconds),
|
||||
duration_seconds: Ok(value.duration_seconds),
|
||||
host: Ok(value.host),
|
||||
job: Ok(value.job),
|
||||
status: Ok(value.status),
|
||||
when: Ok(value.when),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -244,6 +244,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::EnrolBody> for EnrolBody {
|
||||
fn from(value: super::EnrolBody) -> Self {
|
||||
Self {
|
||||
host: Ok(value.host),
|
||||
key: Ok(value.key),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct GlobalJobsResult {
|
||||
summary: Result<Vec<super::ReportSummary>, String>,
|
||||
}
|
||||
|
@ -278,6 +287,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::GlobalJobsResult> for GlobalJobsResult {
|
||||
fn from(value: super::GlobalJobsResult) -> Self {
|
||||
Self {
|
||||
summary: Ok(value.summary),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct OutputRecord {
|
||||
msg: Result<String, String>,
|
||||
stream: Result<String, String>,
|
||||
|
@ -338,6 +355,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::OutputRecord> for OutputRecord {
|
||||
fn from(value: super::OutputRecord) -> Self {
|
||||
Self {
|
||||
msg: Ok(value.msg),
|
||||
stream: Ok(value.stream),
|
||||
time: Ok(value.time),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PingResult {
|
||||
host: Result<String, String>,
|
||||
ok: Result<bool, String>,
|
||||
|
@ -385,6 +412,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::PingResult> for PingResult {
|
||||
fn from(value: super::PingResult) -> Self {
|
||||
Self {
|
||||
host: Ok(value.host),
|
||||
ok: Ok(value.ok),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ReportFinishBody {
|
||||
duration_millis: Result<usize, String>,
|
||||
end_time: Result<chrono::DateTime<chrono::offset::Utc>, String>,
|
||||
|
@ -458,6 +494,17 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::ReportFinishBody> for ReportFinishBody {
|
||||
fn from(value: super::ReportFinishBody) -> Self {
|
||||
Self {
|
||||
duration_millis: Ok(value.duration_millis),
|
||||
end_time: Ok(value.end_time),
|
||||
exit_status: Ok(value.exit_status),
|
||||
id: Ok(value.id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ReportId {
|
||||
host: Result<String, String>,
|
||||
job: Result<String, String>,
|
||||
|
@ -544,6 +591,18 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::ReportId> for ReportId {
|
||||
fn from(value: super::ReportId) -> Self {
|
||||
Self {
|
||||
host: Ok(value.host),
|
||||
job: Ok(value.job),
|
||||
pid: Ok(value.pid),
|
||||
time: Ok(value.time),
|
||||
uuid: Ok(value.uuid),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ReportOutputBody {
|
||||
id: Result<super::ReportId, String>,
|
||||
record: Result<super::OutputRecord, String>,
|
||||
|
@ -591,6 +650,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::ReportOutputBody> for ReportOutputBody {
|
||||
fn from(value: super::ReportOutputBody) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
record: Ok(value.record),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ReportResult {
|
||||
existed_already: Result<bool, String>,
|
||||
}
|
||||
|
@ -625,6 +693,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::ReportResult> for ReportResult {
|
||||
fn from(value: super::ReportResult) -> Self {
|
||||
Self {
|
||||
existed_already: Ok(value.existed_already),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ReportStartBody {
|
||||
id: Result<super::ReportId, String>,
|
||||
script: Result<String, String>,
|
||||
|
@ -685,6 +761,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::ReportStartBody> for ReportStartBody {
|
||||
fn from(value: super::ReportStartBody) -> Self {
|
||||
Self {
|
||||
id: Ok(value.id),
|
||||
script: Ok(value.script),
|
||||
start_time: Ok(value.start_time),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ReportSummary {
|
||||
age_seconds: Result<usize, String>,
|
||||
duration_seconds: Result<usize, String>,
|
||||
|
@ -786,6 +872,19 @@ pub mod types {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl From<super::ReportSummary> for ReportSummary {
|
||||
fn from(value: super::ReportSummary) -> Self {
|
||||
Self {
|
||||
age_seconds: Ok(value.age_seconds),
|
||||
duration_seconds: Ok(value.duration_seconds),
|
||||
host: Ok(value.host),
|
||||
job: Ok(value.job),
|
||||
status: Ok(value.status),
|
||||
when: Ok(value.when),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -857,6 +857,23 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::CrucibleOpts> for CrucibleOpts {
|
||||
fn from(value: super::CrucibleOpts) -> Self {
|
||||
Self {
|
||||
cert_pem: Ok(value.cert_pem),
|
||||
control: Ok(value.control),
|
||||
flush_timeout: Ok(value.flush_timeout),
|
||||
id: Ok(value.id),
|
||||
key: Ok(value.key),
|
||||
key_pem: Ok(value.key_pem),
|
||||
lossy: Ok(value.lossy),
|
||||
read_only: Ok(value.read_only),
|
||||
root_cert_pem: Ok(value.root_cert_pem),
|
||||
target: Ok(value.target),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct DiskAttachment {
|
||||
disk_id: Result<uuid::Uuid, String>,
|
||||
generation_id: Result<u64, String>,
|
||||
|
@ -917,6 +934,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::DiskAttachment> for DiskAttachment {
|
||||
fn from(value: super::DiskAttachment) -> Self {
|
||||
Self {
|
||||
disk_id: Ok(value.disk_id),
|
||||
generation_id: Ok(value.generation_id),
|
||||
state: Ok(value.state),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct DiskRequest {
|
||||
device: Result<String, String>,
|
||||
gen: Result<u64, String>,
|
||||
|
@ -1021,6 +1048,19 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::DiskRequest> for DiskRequest {
|
||||
fn from(value: super::DiskRequest) -> Self {
|
||||
Self {
|
||||
device: Ok(value.device),
|
||||
gen: Ok(value.gen),
|
||||
name: Ok(value.name),
|
||||
read_only: Ok(value.read_only),
|
||||
slot: Ok(value.slot),
|
||||
volume_construction_request: Ok(value.volume_construction_request),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Error {
|
||||
error_code: Result<Option<String>, String>,
|
||||
message: Result<String, String>,
|
||||
|
@ -1081,6 +1121,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::Error> for Error {
|
||||
fn from(value: super::Error) -> Self {
|
||||
Self {
|
||||
error_code: Ok(value.error_code),
|
||||
message: Ok(value.message),
|
||||
request_id: Ok(value.request_id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Instance {
|
||||
disks: Result<Vec<super::DiskAttachment>, String>,
|
||||
nics: Result<Vec<super::NetworkInterface>, String>,
|
||||
|
@ -1154,6 +1204,17 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::Instance> for Instance {
|
||||
fn from(value: super::Instance) -> Self {
|
||||
Self {
|
||||
disks: Ok(value.disks),
|
||||
nics: Ok(value.nics),
|
||||
properties: Ok(value.properties),
|
||||
state: Ok(value.state),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceEnsureRequest {
|
||||
cloud_init_bytes: Result<Option<String>, String>,
|
||||
disks: Result<Vec<super::DiskRequest>, String>,
|
||||
|
@ -1243,6 +1304,18 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceEnsureRequest> for InstanceEnsureRequest {
|
||||
fn from(value: super::InstanceEnsureRequest) -> Self {
|
||||
Self {
|
||||
cloud_init_bytes: Ok(value.cloud_init_bytes),
|
||||
disks: Ok(value.disks),
|
||||
migrate: Ok(value.migrate),
|
||||
nics: Ok(value.nics),
|
||||
properties: Ok(value.properties),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceEnsureResponse {
|
||||
migrate: Result<Option<super::InstanceMigrateInitiateResponse>, String>,
|
||||
}
|
||||
|
@ -1277,6 +1350,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceEnsureResponse> for InstanceEnsureResponse {
|
||||
fn from(value: super::InstanceEnsureResponse) -> Self {
|
||||
Self {
|
||||
migrate: Ok(value.migrate),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceGetResponse {
|
||||
instance: Result<super::Instance, String>,
|
||||
}
|
||||
|
@ -1311,6 +1392,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceGetResponse> for InstanceGetResponse {
|
||||
fn from(value: super::InstanceGetResponse) -> Self {
|
||||
Self {
|
||||
instance: Ok(value.instance),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceMigrateInitiateRequest {
|
||||
migration_id: Result<uuid::Uuid, String>,
|
||||
src_addr: Result<String, String>,
|
||||
|
@ -1373,6 +1462,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceMigrateInitiateRequest> for InstanceMigrateInitiateRequest {
|
||||
fn from(value: super::InstanceMigrateInitiateRequest) -> Self {
|
||||
Self {
|
||||
migration_id: Ok(value.migration_id),
|
||||
src_addr: Ok(value.src_addr),
|
||||
src_uuid: Ok(value.src_uuid),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceMigrateInitiateResponse {
|
||||
migration_id: Result<uuid::Uuid, String>,
|
||||
}
|
||||
|
@ -1409,6 +1508,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceMigrateInitiateResponse> for InstanceMigrateInitiateResponse {
|
||||
fn from(value: super::InstanceMigrateInitiateResponse) -> Self {
|
||||
Self {
|
||||
migration_id: Ok(value.migration_id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceMigrateStatusRequest {
|
||||
migration_id: Result<uuid::Uuid, String>,
|
||||
}
|
||||
|
@ -1443,6 +1550,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceMigrateStatusRequest> for InstanceMigrateStatusRequest {
|
||||
fn from(value: super::InstanceMigrateStatusRequest) -> Self {
|
||||
Self {
|
||||
migration_id: Ok(value.migration_id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceMigrateStatusResponse {
|
||||
state: Result<super::MigrationState, String>,
|
||||
}
|
||||
|
@ -1477,6 +1592,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceMigrateStatusResponse> for InstanceMigrateStatusResponse {
|
||||
fn from(value: super::InstanceMigrateStatusResponse) -> Self {
|
||||
Self {
|
||||
state: Ok(value.state),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceProperties {
|
||||
bootrom_id: Result<uuid::Uuid, String>,
|
||||
description: Result<String, String>,
|
||||
|
@ -1589,6 +1712,20 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceProperties> for InstanceProperties {
|
||||
fn from(value: super::InstanceProperties) -> Self {
|
||||
Self {
|
||||
bootrom_id: Ok(value.bootrom_id),
|
||||
description: Ok(value.description),
|
||||
id: Ok(value.id),
|
||||
image_id: Ok(value.image_id),
|
||||
memory: Ok(value.memory),
|
||||
name: Ok(value.name),
|
||||
vcpus: Ok(value.vcpus),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceStateMonitorRequest {
|
||||
gen: Result<u64, String>,
|
||||
}
|
||||
|
@ -1621,6 +1758,12 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceStateMonitorRequest> for InstanceStateMonitorRequest {
|
||||
fn from(value: super::InstanceStateMonitorRequest) -> Self {
|
||||
Self { gen: Ok(value.gen) }
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceStateMonitorResponse {
|
||||
gen: Result<u64, String>,
|
||||
state: Result<super::InstanceState, String>,
|
||||
|
@ -1668,6 +1811,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceStateMonitorResponse> for InstanceStateMonitorResponse {
|
||||
fn from(value: super::InstanceStateMonitorResponse) -> Self {
|
||||
Self {
|
||||
gen: Ok(value.gen),
|
||||
state: Ok(value.state),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct NetworkInterface {
|
||||
attachment: Result<super::NetworkInterfaceAttachmentState, String>,
|
||||
name: Result<String, String>,
|
||||
|
@ -1715,6 +1867,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::NetworkInterface> for NetworkInterface {
|
||||
fn from(value: super::NetworkInterface) -> Self {
|
||||
Self {
|
||||
attachment: Ok(value.attachment),
|
||||
name: Ok(value.name),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct NetworkInterfaceRequest {
|
||||
name: Result<String, String>,
|
||||
slot: Result<super::Slot, String>,
|
||||
|
@ -1761,6 +1922,15 @@ pub mod types {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl From<super::NetworkInterfaceRequest> for NetworkInterfaceRequest {
|
||||
fn from(value: super::NetworkInterfaceRequest) -> Self {
|
||||
Self {
|
||||
name: Ok(value.name),
|
||||
slot: Ok(value.slot),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -863,6 +863,23 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::CrucibleOpts> for CrucibleOpts {
|
||||
fn from(value: super::CrucibleOpts) -> Self {
|
||||
Self {
|
||||
cert_pem: Ok(value.cert_pem),
|
||||
control: Ok(value.control),
|
||||
flush_timeout: Ok(value.flush_timeout),
|
||||
id: Ok(value.id),
|
||||
key: Ok(value.key),
|
||||
key_pem: Ok(value.key_pem),
|
||||
lossy: Ok(value.lossy),
|
||||
read_only: Ok(value.read_only),
|
||||
root_cert_pem: Ok(value.root_cert_pem),
|
||||
target: Ok(value.target),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct DiskAttachment {
|
||||
disk_id: Result<uuid::Uuid, String>,
|
||||
generation_id: Result<u64, String>,
|
||||
|
@ -923,6 +940,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::DiskAttachment> for DiskAttachment {
|
||||
fn from(value: super::DiskAttachment) -> Self {
|
||||
Self {
|
||||
disk_id: Ok(value.disk_id),
|
||||
generation_id: Ok(value.generation_id),
|
||||
state: Ok(value.state),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct DiskRequest {
|
||||
device: Result<String, String>,
|
||||
gen: Result<u64, String>,
|
||||
|
@ -1027,6 +1054,19 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::DiskRequest> for DiskRequest {
|
||||
fn from(value: super::DiskRequest) -> Self {
|
||||
Self {
|
||||
device: Ok(value.device),
|
||||
gen: Ok(value.gen),
|
||||
name: Ok(value.name),
|
||||
read_only: Ok(value.read_only),
|
||||
slot: Ok(value.slot),
|
||||
volume_construction_request: Ok(value.volume_construction_request),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Error {
|
||||
error_code: Result<Option<String>, String>,
|
||||
message: Result<String, String>,
|
||||
|
@ -1087,6 +1127,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::Error> for Error {
|
||||
fn from(value: super::Error) -> Self {
|
||||
Self {
|
||||
error_code: Ok(value.error_code),
|
||||
message: Ok(value.message),
|
||||
request_id: Ok(value.request_id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Instance {
|
||||
disks: Result<Vec<super::DiskAttachment>, String>,
|
||||
nics: Result<Vec<super::NetworkInterface>, String>,
|
||||
|
@ -1160,6 +1210,17 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::Instance> for Instance {
|
||||
fn from(value: super::Instance) -> Self {
|
||||
Self {
|
||||
disks: Ok(value.disks),
|
||||
nics: Ok(value.nics),
|
||||
properties: Ok(value.properties),
|
||||
state: Ok(value.state),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceEnsureRequest {
|
||||
cloud_init_bytes: Result<Option<String>, String>,
|
||||
disks: Result<Vec<super::DiskRequest>, String>,
|
||||
|
@ -1249,6 +1310,18 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceEnsureRequest> for InstanceEnsureRequest {
|
||||
fn from(value: super::InstanceEnsureRequest) -> Self {
|
||||
Self {
|
||||
cloud_init_bytes: Ok(value.cloud_init_bytes),
|
||||
disks: Ok(value.disks),
|
||||
migrate: Ok(value.migrate),
|
||||
nics: Ok(value.nics),
|
||||
properties: Ok(value.properties),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceEnsureResponse {
|
||||
migrate: Result<Option<super::InstanceMigrateInitiateResponse>, String>,
|
||||
}
|
||||
|
@ -1283,6 +1356,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceEnsureResponse> for InstanceEnsureResponse {
|
||||
fn from(value: super::InstanceEnsureResponse) -> Self {
|
||||
Self {
|
||||
migrate: Ok(value.migrate),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceGetResponse {
|
||||
instance: Result<super::Instance, String>,
|
||||
}
|
||||
|
@ -1317,6 +1398,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceGetResponse> for InstanceGetResponse {
|
||||
fn from(value: super::InstanceGetResponse) -> Self {
|
||||
Self {
|
||||
instance: Ok(value.instance),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceMigrateInitiateRequest {
|
||||
migration_id: Result<uuid::Uuid, String>,
|
||||
src_addr: Result<String, String>,
|
||||
|
@ -1379,6 +1468,16 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceMigrateInitiateRequest> for InstanceMigrateInitiateRequest {
|
||||
fn from(value: super::InstanceMigrateInitiateRequest) -> Self {
|
||||
Self {
|
||||
migration_id: Ok(value.migration_id),
|
||||
src_addr: Ok(value.src_addr),
|
||||
src_uuid: Ok(value.src_uuid),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceMigrateInitiateResponse {
|
||||
migration_id: Result<uuid::Uuid, String>,
|
||||
}
|
||||
|
@ -1415,6 +1514,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceMigrateInitiateResponse> for InstanceMigrateInitiateResponse {
|
||||
fn from(value: super::InstanceMigrateInitiateResponse) -> Self {
|
||||
Self {
|
||||
migration_id: Ok(value.migration_id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceMigrateStatusRequest {
|
||||
migration_id: Result<uuid::Uuid, String>,
|
||||
}
|
||||
|
@ -1449,6 +1556,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceMigrateStatusRequest> for InstanceMigrateStatusRequest {
|
||||
fn from(value: super::InstanceMigrateStatusRequest) -> Self {
|
||||
Self {
|
||||
migration_id: Ok(value.migration_id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceMigrateStatusResponse {
|
||||
state: Result<super::MigrationState, String>,
|
||||
}
|
||||
|
@ -1483,6 +1598,14 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceMigrateStatusResponse> for InstanceMigrateStatusResponse {
|
||||
fn from(value: super::InstanceMigrateStatusResponse) -> Self {
|
||||
Self {
|
||||
state: Ok(value.state),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceProperties {
|
||||
bootrom_id: Result<uuid::Uuid, String>,
|
||||
description: Result<String, String>,
|
||||
|
@ -1595,6 +1718,20 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceProperties> for InstanceProperties {
|
||||
fn from(value: super::InstanceProperties) -> Self {
|
||||
Self {
|
||||
bootrom_id: Ok(value.bootrom_id),
|
||||
description: Ok(value.description),
|
||||
id: Ok(value.id),
|
||||
image_id: Ok(value.image_id),
|
||||
memory: Ok(value.memory),
|
||||
name: Ok(value.name),
|
||||
vcpus: Ok(value.vcpus),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceStateMonitorRequest {
|
||||
gen: Result<u64, String>,
|
||||
}
|
||||
|
@ -1627,6 +1764,12 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceStateMonitorRequest> for InstanceStateMonitorRequest {
|
||||
fn from(value: super::InstanceStateMonitorRequest) -> Self {
|
||||
Self { gen: Ok(value.gen) }
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InstanceStateMonitorResponse {
|
||||
gen: Result<u64, String>,
|
||||
state: Result<super::InstanceState, String>,
|
||||
|
@ -1674,6 +1817,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::InstanceStateMonitorResponse> for InstanceStateMonitorResponse {
|
||||
fn from(value: super::InstanceStateMonitorResponse) -> Self {
|
||||
Self {
|
||||
gen: Ok(value.gen),
|
||||
state: Ok(value.state),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct NetworkInterface {
|
||||
attachment: Result<super::NetworkInterfaceAttachmentState, String>,
|
||||
name: Result<String, String>,
|
||||
|
@ -1721,6 +1873,15 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::NetworkInterface> for NetworkInterface {
|
||||
fn from(value: super::NetworkInterface) -> Self {
|
||||
Self {
|
||||
attachment: Ok(value.attachment),
|
||||
name: Ok(value.name),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct NetworkInterfaceRequest {
|
||||
name: Result<String, String>,
|
||||
slot: Result<super::Slot, String>,
|
||||
|
@ -1767,6 +1928,15 @@ pub mod types {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl From<super::NetworkInterfaceRequest> for NetworkInterfaceRequest {
|
||||
fn from(value: super::NetworkInterfaceRequest) -> Self {
|
||||
Self {
|
||||
name: Ok(value.name),
|
||||
slot: Ok(value.slot),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -125,6 +125,17 @@ pub mod types {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<super::BodyWithDefaults> for BodyWithDefaults {
|
||||
fn from(value: super::BodyWithDefaults) -> Self {
|
||||
Self {
|
||||
forty_two: Ok(value.forty_two),
|
||||
s: Ok(value.s),
|
||||
something: Ok(value.something),
|
||||
yes: Ok(value.yes),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Error {
|
||||
error_code: Result<Option<String>, String>,
|
||||
message: Result<String, String>,
|
||||
|
@ -184,6 +195,16 @@ pub mod types {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl From<super::Error> for Error {
|
||||
fn from(value: super::Error) -> Self {
|
||||
Self {
|
||||
error_code: Ok(value.error_code),
|
||||
message: Ok(value.message),
|
||||
request_id: Ok(value.request_id),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mod defaults {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright 2022 Oxide Computer Company
|
||||
// Copyright 2023 Oxide Computer Company
|
||||
|
||||
use std::{str::from_utf8, sync::Arc};
|
||||
use std::str::from_utf8;
|
||||
|
||||
use dropshot::{
|
||||
endpoint, ApiDescription, HttpError, HttpResponseUpdatedNoContent, Path,
|
||||
|
@ -40,7 +40,7 @@ struct CursedQuery {
|
|||
path = "/{ref}/{type}/{trait}",
|
||||
}]
|
||||
async fn renamed_parameters(
|
||||
_rqctx: Arc<RequestContext<()>>,
|
||||
_rqctx: RequestContext<()>,
|
||||
_path: Path<CursedPath>,
|
||||
_query: Query<CursedQuery>,
|
||||
) -> Result<HttpResponseUpdatedNoContent, HttpError> {
|
||||
|
@ -77,7 +77,7 @@ fn test_renamed_parameters() {
|
|||
path = "/",
|
||||
}]
|
||||
async fn freeform_response(
|
||||
_rqctx: Arc<RequestContext<()>>,
|
||||
_rqctx: RequestContext<()>,
|
||||
) -> Result<Response<Body>, HttpError> {
|
||||
unreachable!();
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ fn yes_yes() -> Option<bool> {
|
|||
path = "/",
|
||||
}]
|
||||
async fn default_params(
|
||||
_rqctx: Arc<RequestContext<()>>,
|
||||
_rqctx: RequestContext<()>,
|
||||
_body: TypedBody<BodyWithDefaults>,
|
||||
) -> Result<Response<Body>, HttpError> {
|
||||
unreachable!();
|
||||
|
|
Loading…
Reference in New Issue