mirror of
https://github.com/moghtech/komodo.git
synced 2026-09-11 08:01:13 +00:00
add Read, Write, Execute traits on requests
This commit is contained in:
Generated
+97
-69
@@ -67,9 +67,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "anstream"
|
||||
version = "0.5.0"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c"
|
||||
checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"anstyle-parse",
|
||||
@@ -105,9 +105,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-wincon"
|
||||
version = "2.1.0"
|
||||
version = "3.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd"
|
||||
checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"windows-sys 0.48.0",
|
||||
@@ -127,7 +127,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -246,9 +246,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "aws-sdk-ec2"
|
||||
version = "0.30.0"
|
||||
version = "0.33.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dcb3e58549904567dcbfadb1e450b5a0f46f35300dd78c87a31ca4761d1481f6"
|
||||
checksum = "f73fb5c6179aba310d6ac5bd82ccd2dbd08706f2874d7e15f142528488e0a0fe"
|
||||
dependencies = [
|
||||
"aws-credential-types",
|
||||
"aws-http",
|
||||
@@ -654,9 +654,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bollard"
|
||||
version = "0.14.0"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af254ed2da4936ef73309e9597180558821cb16ae9bba4cb24ce6b612d8d80ed"
|
||||
checksum = "f03db470b3c0213c47e978da93200259a1eb4dae2e5512cba9955e2b540a6fc6"
|
||||
dependencies = [
|
||||
"base64 0.21.2",
|
||||
"bollard-stubs",
|
||||
@@ -683,12 +683,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bollard-stubs"
|
||||
version = "1.42.0-rc.7"
|
||||
version = "1.43.0-rc.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "602bda35f33aeb571cef387dcd4042c643a8bf689d8aaac2cc47ea24cb7bc7e0"
|
||||
checksum = "b58071e8fd9ec1e930efd28e3a90c1251015872a2ce49f81f36421b86466932e"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_with 2.3.3",
|
||||
"serde_repr",
|
||||
"serde_with 3.3.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -783,9 +784,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.4.2"
|
||||
version = "4.4.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6"
|
||||
checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
@@ -793,9 +794,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.4.2"
|
||||
version = "4.4.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08"
|
||||
checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
@@ -812,7 +813,7 @@ dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1049,6 +1050,17 @@ dependencies = [
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_empty_traits"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12c90da6aa09bad94e4411461560183be70bb33bc30efb2ce941492f22ed6850"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_more"
|
||||
version = "0.99.17"
|
||||
@@ -1070,7 +1082,7 @@ checksum = "dab95799d3c74d5c2f627e783e6b630b89f79d82a7b080c76086493a4cf651ef"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1270,7 +1282,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1617,6 +1629,7 @@ checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown 0.14.0",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1763,12 +1776,6 @@ dependencies = [
|
||||
"linked-hash-map",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "make_option"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "45a5cd6509247dc036367fbadc8699fb49a12c848d716a6b0f6959960d60d6e3"
|
||||
|
||||
[[package]]
|
||||
name = "match_cfg"
|
||||
version = "0.1.0"
|
||||
@@ -1994,7 +2001,7 @@ version = "1.0.1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2036,9 +2043,8 @@ dependencies = [
|
||||
"async_timing_util",
|
||||
"bollard",
|
||||
"derive_builder",
|
||||
"derive_empty_traits",
|
||||
"derive_variants",
|
||||
"make_option",
|
||||
"monitor_macros",
|
||||
"mungos",
|
||||
"partial_derive2",
|
||||
"resolver_api",
|
||||
@@ -2051,9 +2057,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "mungos"
|
||||
version = "0.4.19"
|
||||
version = "0.4.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed3fd16ef4c4dc182aa3e058259747a4660736e87dd42d2edbd371a1a8a7b385"
|
||||
checksum = "bbdcbe6ef882ab2e116dd396e23b612ff388ef2a8f6c3bd457ff88bc9d82cddb"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -2074,7 +2080,7 @@ checksum = "5daaa3fe65a15feb455a31a68ca3e6fc62efa8d1dc38660d6e8abd94079f2757"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2180,7 +2186,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2253,7 +2259,7 @@ checksum = "ad412582e4972654640acf910d4c85e2ba14a547fbcec5b8ddb944d82adec1e1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2302,7 +2308,7 @@ checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2331,9 +2337,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.66"
|
||||
version = "1.0.68"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
|
||||
checksum = "5b1106fec09662ec6dd98ccac0f81cef56984d0b49f75c92d8cbad76e20c005c"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
@@ -2439,9 +2445,9 @@ checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78"
|
||||
|
||||
[[package]]
|
||||
name = "reqwest"
|
||||
version = "0.11.20"
|
||||
version = "0.11.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1"
|
||||
checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b"
|
||||
dependencies = [
|
||||
"base64 0.21.2",
|
||||
"bytes",
|
||||
@@ -2464,6 +2470,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
"system-configuration",
|
||||
"tokio",
|
||||
"tokio-native-tls",
|
||||
"tower-service",
|
||||
@@ -2505,7 +2512,7 @@ checksum = "6e1f7c7d2230fd8ab03239e20f32f99d85c8a1273bb159e1368cbda9fc2ff2ac"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2751,14 +2758,14 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.105"
|
||||
version = "1.0.107"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360"
|
||||
checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
|
||||
dependencies = [
|
||||
"indexmap 2.0.0",
|
||||
"itoa",
|
||||
@@ -2783,7 +2790,7 @@ checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2819,14 +2826,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_with"
|
||||
version = "2.3.3"
|
||||
version = "3.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe"
|
||||
checksum = "1ca3b16a3d82c4088f343b7480a93550b3eabe1a358569c2dfe38bbcead07237"
|
||||
dependencies = [
|
||||
"base64 0.13.1",
|
||||
"base64 0.21.2",
|
||||
"chrono",
|
||||
"hex",
|
||||
"indexmap 1.9.3",
|
||||
"indexmap 2.0.0",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"time 0.3.21",
|
||||
@@ -2880,9 +2888,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sha2"
|
||||
version = "0.10.7"
|
||||
version = "0.10.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
|
||||
checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
@@ -3045,7 +3053,7 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"rustversion",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3076,9 +3084,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.31"
|
||||
version = "2.0.38"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398"
|
||||
checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -3093,9 +3101,9 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
|
||||
|
||||
[[package]]
|
||||
name = "sysinfo"
|
||||
version = "0.29.9"
|
||||
version = "0.29.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8d0e9cc2273cc8d31377bdd638d72e3ac3e5607b18621062b169d02787f1bab"
|
||||
checksum = "0a18d114d420ada3a891e6bc8e96a2023402203296a47cdd65083377dad18ba5"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"core-foundation-sys",
|
||||
@@ -3106,6 +3114,27 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "system-configuration"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"core-foundation",
|
||||
"system-configuration-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "system-configuration-sys"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"
|
||||
dependencies = [
|
||||
"core-foundation-sys",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "take_mut"
|
||||
version = "0.2.2"
|
||||
@@ -3152,7 +3181,6 @@ dependencies = [
|
||||
"anyhow",
|
||||
"dotenv",
|
||||
"envy",
|
||||
"make_option",
|
||||
"monitor_client",
|
||||
"monitor_types",
|
||||
"mungos",
|
||||
@@ -3165,22 +3193,22 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.48"
|
||||
version = "1.0.49"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7"
|
||||
checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "1.0.48"
|
||||
version = "1.0.49"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35"
|
||||
checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3265,7 +3293,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3312,9 +3340,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tokio-tungstenite"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b2dbec703c26b00d74844519606ef15d09a7d6857860f84ad223dec002ddea2"
|
||||
checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"log",
|
||||
@@ -3324,9 +3352,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tokio-util"
|
||||
version = "0.7.8"
|
||||
version = "0.7.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d"
|
||||
checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"futures-core",
|
||||
@@ -3445,7 +3473,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3510,9 +3538,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
|
||||
|
||||
[[package]]
|
||||
name = "tungstenite"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e862a1c4128df0112ab625f55cd5c934bcb4312ba80b39ae4b4835a3fd58e649"
|
||||
checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"bytes",
|
||||
@@ -3715,7 +3743,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
@@ -3749,7 +3777,7 @@ checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.31",
|
||||
"syn 2.0.38",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
+15
-15
@@ -18,16 +18,16 @@ periphery_client = { path = "lib/periphery_client" }
|
||||
logger = { path = "lib/logger" }
|
||||
# mogh
|
||||
run_command = { version = "0.0.6", features = ["async_tokio"] }
|
||||
slack = { package = "slack_client_rs", version = "0.1.0" }
|
||||
slack = { version = "0.1.0", package = "slack_client_rs" }
|
||||
derive_empty_traits = "0.1.0"
|
||||
merge_config_files = "0.1.3"
|
||||
termination_signal = "0.1.3"
|
||||
async_timing_util = "0.1.14"
|
||||
partial_derive2 = "0.2.1"
|
||||
derive_variants = "0.1.1"
|
||||
make_option = "0.1.7"
|
||||
resolver_api = "0.1.6"
|
||||
parse_csl = "0.1.0"
|
||||
mungos = "0.4.19"
|
||||
mungos = "0.4.22"
|
||||
serror = "0.1.3"
|
||||
svi = "0.1.4"
|
||||
# external
|
||||
@@ -35,37 +35,37 @@ tokio = { version = "1.32.0", features = ["full"] }
|
||||
axum = { version = "0.6.20", features = ["ws", "json", "headers"] }
|
||||
tower = { version = "0.4.13", features = ["timeout"] }
|
||||
tower-http = { version = "0.4.4", features = ["fs", "cors"] }
|
||||
reqwest = { version = "0.11.20", features = ["json"] }
|
||||
clap = { version = "4.4.2", features = ["derive"] }
|
||||
reqwest = { version = "0.11.22", features = ["json"] }
|
||||
clap = { version = "4.4.6", features = ["derive"] }
|
||||
uuid = { version = "1.4.1", features = ["v4", "fast-rng", "serde"] }
|
||||
serde = { version = "1.0.188", features = ["derive"] }
|
||||
serde_json = "1.0.105"
|
||||
tokio-tungstenite = "0.20.0"
|
||||
tokio-util = "0.7.8"
|
||||
serde_json = "1.0.107"
|
||||
tokio-tungstenite = "0.20.1"
|
||||
tokio-util = "0.7.9"
|
||||
futures = "0.3.28"
|
||||
futures-util = "0.3.28"
|
||||
dotenv = "0.15.0"
|
||||
envy = "0.4.2"
|
||||
anyhow = "1.0.75"
|
||||
thiserror = "1.0.48"
|
||||
thiserror = "1.0.49"
|
||||
log = "0.4.20"
|
||||
simple_logger = "4.2.0"
|
||||
bollard = "0.14.0"
|
||||
bollard = "0.15.0"
|
||||
derive_builder = "0.12.0"
|
||||
typeshare = "1.0.1"
|
||||
strum = "0.25.0"
|
||||
strum_macros = "0.25.2"
|
||||
sysinfo = "0.29.9"
|
||||
sysinfo = "0.29.10"
|
||||
async-trait = "0.1.73"
|
||||
urlencoding = "2.1.3"
|
||||
rand = "0.8.5"
|
||||
jwt = "0.16.0"
|
||||
hmac = "0.12.1"
|
||||
sha2 = "0.10.7"
|
||||
sha2 = "0.10.8"
|
||||
bcrypt = "0.15.0"
|
||||
hex = "0.4.3"
|
||||
aws-config = "0.56.1"
|
||||
aws-sdk-ec2 = "0.30.0"
|
||||
proc-macro2 = "1.0.66"
|
||||
aws-sdk-ec2 = "0.33.0"
|
||||
proc-macro2 = "1.0.68"
|
||||
quote = "1.0.33"
|
||||
syn = "2.0.31"
|
||||
syn = "2.0.38"
|
||||
|
||||
@@ -60,7 +60,6 @@ enum ReadRequest {
|
||||
GetServerActionState(GetServerActionState),
|
||||
GetHistoricalServerStats(GetHistoricalServerStats),
|
||||
GetServerAvailableAccounts(GetServerAvailableAccounts),
|
||||
GetAvailableNetworks(GetAvailableNetworks),
|
||||
|
||||
// ==== DEPLOYMENT ====
|
||||
GetDeploymentsSummary(GetDeploymentsSummary),
|
||||
|
||||
@@ -517,27 +517,3 @@ impl Resolve<GetServerAvailableAccounts, RequestUser> for State {
|
||||
Ok(res)
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl Resolve<GetAvailableNetworks, RequestUser> for State {
|
||||
async fn resolve(
|
||||
&self,
|
||||
GetAvailableNetworks { server_id }: GetAvailableNetworks,
|
||||
user: RequestUser,
|
||||
) -> anyhow::Result<GetAvailableNetworksResponse> {
|
||||
let server: Server = self
|
||||
.get_resource_check_permissions(
|
||||
&server_id,
|
||||
&user,
|
||||
PermissionLevel::Read,
|
||||
)
|
||||
.await?;
|
||||
let networks = self
|
||||
.periphery_client(&server)?
|
||||
.request(requests::GetNetworkList {})
|
||||
.await
|
||||
.context("failed to get accounts from periphery")?;
|
||||
let res = GetAvailableNetworksResponse { networks };
|
||||
Ok(res)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ anyhow.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
partial_derive2.workspace = true
|
||||
make_option.workspace = true
|
||||
mungos.workspace = true
|
||||
dotenv.workspace = true
|
||||
envy.workspace = true
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
use anyhow::{anyhow, Context};
|
||||
use monitor_types::requests::{
|
||||
auth::MonitorAuthRequest, execute::MonitorExecuteRequest,
|
||||
read::MonitorReadRequest, write::MonitorWriteRequest,
|
||||
};
|
||||
use reqwest::StatusCode;
|
||||
use resolver_api::HasResponse;
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
use serde_json::json;
|
||||
use serror::deserialize_error;
|
||||
@@ -8,7 +11,7 @@ use serror::deserialize_error;
|
||||
use crate::MonitorClient;
|
||||
|
||||
impl MonitorClient {
|
||||
pub async fn auth<T: HasResponse>(
|
||||
pub async fn auth<T: MonitorAuthRequest>(
|
||||
&self,
|
||||
request: T,
|
||||
) -> anyhow::Result<T::Response> {
|
||||
@@ -23,7 +26,7 @@ impl MonitorClient {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn read<T: HasResponse>(
|
||||
pub async fn read<T: MonitorReadRequest>(
|
||||
&self,
|
||||
request: T,
|
||||
) -> anyhow::Result<T::Response> {
|
||||
@@ -38,7 +41,7 @@ impl MonitorClient {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn write<T: HasResponse>(
|
||||
pub async fn write<T: MonitorWriteRequest>(
|
||||
&self,
|
||||
request: T,
|
||||
) -> anyhow::Result<T::Response> {
|
||||
@@ -53,7 +56,7 @@ impl MonitorClient {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn execute<T: HasResponse>(
|
||||
pub async fn execute<T: MonitorExecuteRequest>(
|
||||
&self,
|
||||
request: T,
|
||||
) -> anyhow::Result<T::Response> {
|
||||
|
||||
+35
-36
@@ -10,8 +10,8 @@ export type AuthResponses = {
|
||||
|
||||
export type ReadResponses = {
|
||||
GetVersion: Types.GetVersionResponse;
|
||||
GetUser: Types.User;
|
||||
GetUsers: Types.User[];
|
||||
GetUser: Types.GetUserResponse;
|
||||
GetUsers: Types.GetUsersResponse;
|
||||
GetUsername: Types.GetUsernameResponse;
|
||||
GetCoreInfo: Types.GetCoreInfoResponse;
|
||||
|
||||
@@ -20,73 +20,72 @@ export type ReadResponses = {
|
||||
|
||||
// ==== SERVER ====
|
||||
GetServersSummary: Types.GetServersSummaryResponse;
|
||||
GetServer: Types.Server;
|
||||
ListServers: Types.ServerListItem[];
|
||||
GetServer: Types.GetServerResponse;
|
||||
ListServers: Types.ListServersResponse;
|
||||
GetServerStatus: Types.GetServerStatusResponse;
|
||||
GetPeripheryVersion: Types.GetPeripheryVersionResponse;
|
||||
GetSystemInformation: Types.SystemInformation;
|
||||
GetDockerContainers: Types.ContainerSummary[];
|
||||
GetDockerImages: Types.ImageSummary[];
|
||||
GetDockerNetworks: Types.DockerNetwork[];
|
||||
GetServerActionState: Types.ServerActionState;
|
||||
GetSystemInformation: Types.GetSystemInformationResponse;
|
||||
GetDockerContainers: Types.GetDockerContainersResponse;
|
||||
GetDockerImages: Types.GetDockerImagesResponse;
|
||||
GetDockerNetworks: Types.GetDockerNetworksResponse;
|
||||
GetServerActionState: Types.GetServerActionStateResponse;
|
||||
GetHistoricalServerStats: Types.GetHistoricalServerStatsResponse;
|
||||
GetServerAvailableAccounts: Types.GetServerAvailableAccountsResponse;
|
||||
GetAvailableNetworks: Types.GetAvailableNetworksResponse;
|
||||
|
||||
// ==== DEPLOYMENT ====
|
||||
GetDeploymentsSummary: Types.GetDeploymentsSummaryResponse;
|
||||
GetDeployment: Types.Deployment;
|
||||
ListDeployments: Types.DeploymentListItem[];
|
||||
GetDeployment: Types.GetDeploymentResponse;
|
||||
ListDeployments: Types.ListDeploymentsResponse;
|
||||
GetDeploymentStatus: Types.GetDeploymentStatusResponse;
|
||||
GetDeploymentActionState: Types.DeploymentActionState;
|
||||
GetDeploymentActionState: Types.GetDeploymentActionStateResponse;
|
||||
GetDeployedVersion: Types.GetDeployedVersionResponse;
|
||||
GetDeploymentStats: Types.GetDeploymentStatusResponse;
|
||||
GetLog: Types.Log;
|
||||
GetDeploymentStats: Types.GetDeploymentStatsResponse;
|
||||
GetLog: Types.GetLogResponse;
|
||||
|
||||
// ==== BUILD ====
|
||||
GetBuildsSummary: Types.GetBuildsSummaryResponse;
|
||||
GetBuild: Types.Build;
|
||||
ListBuilds: Types.BuildListItem[];
|
||||
GetBuildActionState: Types.BuildActionState;
|
||||
GetBuild: Types.GetBuildResponse;
|
||||
ListBuilds: Types.ListBuildsResponse;
|
||||
GetBuildActionState: Types.GetBuildActionStateResponse;
|
||||
GetBuildMonthlyStats: Types.GetBuildMonthlyStatsResponse;
|
||||
GetBuildVersions: Types.BuildVersionResponseItem[];
|
||||
GetBuildVersions: Types.GetBuildVersionsResponse;
|
||||
|
||||
// ==== REPO ====
|
||||
GetReposSummary: Types.GetReposSummaryResponse;
|
||||
GetRepo: Types.Repo;
|
||||
ListRepos: Types.RepoListItem[];
|
||||
GetRepoActionState: Types.RepoActionState;
|
||||
GetRepo: Types.GetRepoResponse;
|
||||
ListRepos: Types.ListReposResponse;
|
||||
GetRepoActionState: Types.GetRepoActionStateResponse;
|
||||
|
||||
// ==== BUILDER ====
|
||||
GetBuildersSummary: Types.GetBuildersSummaryResponse;
|
||||
GetBuilder: Types.Builder;
|
||||
ListBuilders: Types.BuilderListItem[];
|
||||
GetBuilder: Types.GetBuilderResponse;
|
||||
ListBuilders: Types.ListBuildersResponse;
|
||||
GetBuilderAvailableAccounts: Types.GetBuilderAvailableAccountsResponse;
|
||||
|
||||
// ==== ALERTER ====
|
||||
GetAlertersSummary: Types.GetAlertersSummaryResponse;
|
||||
GetAlerter: Types.Alerter;
|
||||
ListAlerters: Types.AlerterListItem[];
|
||||
GetAlerter: Types.GetAlerterResponse;
|
||||
ListAlerters: Types.ListAlertersResponse;
|
||||
|
||||
// ==== TAG ====
|
||||
GetTag: Types.CustomTag;
|
||||
ListTags: Types.CustomTag[];
|
||||
GetTag: Types.GetTagResponse;
|
||||
ListTags: Types.ListTagsResponse;
|
||||
|
||||
// ==== UPDATE ====
|
||||
GetUpdate: Types.Update;
|
||||
GetUpdate: Types.GetUpdateResponse;
|
||||
ListUpdates: Types.ListUpdatesResponse;
|
||||
|
||||
// ==== ALERT ====
|
||||
ListAlerts: Types.ListAlertsResponse;
|
||||
|
||||
// ==== SERVER STATS ====
|
||||
GetAllSystemStats: Types.AllSystemStats;
|
||||
GetBasicSystemStats: Types.BasicSystemStats;
|
||||
GetCpuUsage: Types.CpuUsage;
|
||||
GetDiskUsage: Types.DiskUsage;
|
||||
GetNetworkUsage: Types.NetworkUsage;
|
||||
GetSystemProcesses: Types.SystemProcess[];
|
||||
GetSystemComponents: Types.SystemComponent[];
|
||||
GetAllSystemStats: Types.GetAllSystemStatsResponse;
|
||||
GetBasicSystemStats: Types.GetBasicSystemStatsResponse;
|
||||
GetCpuUsage: Types.GetCpuUsageResponse;
|
||||
GetDiskUsage: Types.GetDiskUsageResponse;
|
||||
GetNetworkUsage: Types.GetNetworkUsageResponse;
|
||||
GetSystemProcesses: Types.GetSystemProcessesResponse;
|
||||
GetSystemComponents: Types.GetSystemComponentsResponse;
|
||||
};
|
||||
|
||||
export type WriteResponses = {
|
||||
|
||||
+303
-236
@@ -249,127 +249,47 @@ export type U64 = number;
|
||||
|
||||
export type MongoDocument = any;
|
||||
|
||||
export type _PartialBuildConfig = Partial<BuildConfig>;
|
||||
export type GetAlerterResponse = Alerter;
|
||||
|
||||
export type _PartialDeploymentConfig = Partial<DeploymentConfig>;
|
||||
export type ListAlertersResponse = AlerterListItem[];
|
||||
|
||||
export type _PartialRepoConfig = Partial<RepoConfig>;
|
||||
export type GetBuildResponse = Build;
|
||||
|
||||
export type _PartialServerConfig = Partial<ServerConfig>;
|
||||
|
||||
export type _PartialCustomTag = Partial<CustomTag>;
|
||||
|
||||
export enum SeverityLevel {
|
||||
Ok = "OK",
|
||||
Warning = "WARNING",
|
||||
Critical = "CRITICAL",
|
||||
}
|
||||
|
||||
export type ResourceTarget =
|
||||
| { type: "System", id: string }
|
||||
| { type: "Build", id: string }
|
||||
| { type: "Builder", id: string }
|
||||
| { type: "Deployment", id: string }
|
||||
| { type: "Server", id: string }
|
||||
| { type: "Repo", id: string }
|
||||
| { type: "Alerter", id: string };
|
||||
|
||||
export type AlertData =
|
||||
| { type: "ServerUnreachable", data: {
|
||||
id: string;
|
||||
name: string;
|
||||
region?: string;
|
||||
}}
|
||||
| { type: "ServerCpu", data: {
|
||||
id: string;
|
||||
name: string;
|
||||
region?: string;
|
||||
percentage: number;
|
||||
top_procs: SystemProcess[];
|
||||
}}
|
||||
| { type: "ServerMem", data: {
|
||||
id: string;
|
||||
name: string;
|
||||
region?: string;
|
||||
used_gb: number;
|
||||
total_gb: number;
|
||||
top_procs: SystemProcess[];
|
||||
}}
|
||||
| { type: "ServerDisk", data: {
|
||||
id: string;
|
||||
name: string;
|
||||
region?: string;
|
||||
path: string;
|
||||
used_gb: number;
|
||||
total_gb: number;
|
||||
}}
|
||||
| { type: "ServerTemp", data: {
|
||||
id: string;
|
||||
name: string;
|
||||
region?: string;
|
||||
component: string;
|
||||
temp: number;
|
||||
max: number;
|
||||
}}
|
||||
| { type: "ContainerStateChange", data: {
|
||||
id: string;
|
||||
name: string;
|
||||
server_id: string;
|
||||
server_name: string;
|
||||
from: DockerContainerState;
|
||||
to: DockerContainerState;
|
||||
}}
|
||||
| { type: "None", data: {
|
||||
}};
|
||||
|
||||
export interface Alert {
|
||||
_id?: MongoId;
|
||||
ts: I64;
|
||||
resolved: boolean;
|
||||
level: SeverityLevel;
|
||||
target: ResourceTarget;
|
||||
variant: AlertData["type"];
|
||||
data: AlertData;
|
||||
resolved_ts?: I64;
|
||||
}
|
||||
|
||||
export interface CustomAlerterConfig {
|
||||
url: string;
|
||||
}
|
||||
|
||||
export interface SlackAlerterConfig {
|
||||
url: string;
|
||||
}
|
||||
export type ListBuildsResponse = BuildListItem[];
|
||||
|
||||
export interface BuildActionState {
|
||||
building: boolean;
|
||||
updating: boolean;
|
||||
}
|
||||
|
||||
export interface ServerBuilderConfig {
|
||||
id: string;
|
||||
export type GetBuildActionStateResponse = BuildActionState;
|
||||
|
||||
export interface BuildVersionResponseItem {
|
||||
version: Version;
|
||||
ts: I64;
|
||||
}
|
||||
|
||||
export interface AwsBuilderConfig {
|
||||
region: string;
|
||||
instance_type: string;
|
||||
volume_gb: number;
|
||||
ami_id: string;
|
||||
subnet_id: string;
|
||||
security_group_ids: string[];
|
||||
key_pair_name: string;
|
||||
assign_public_ip: boolean;
|
||||
github_accounts?: string[];
|
||||
docker_accounts?: string[];
|
||||
export type GetBuildVersionsResponse = BuildVersionResponseItem[];
|
||||
|
||||
export type GetBuilderResponse = Builder;
|
||||
|
||||
export type ListBuildersResponse = BuilderListItem[];
|
||||
|
||||
export type GetDeploymentResponse = Deployment;
|
||||
|
||||
export type ListDeploymentsResponse = DeploymentListItem[];
|
||||
|
||||
export interface Log {
|
||||
stage: string;
|
||||
command: string;
|
||||
stdout: string;
|
||||
stderr: string;
|
||||
success: boolean;
|
||||
start_ts: I64;
|
||||
end_ts: I64;
|
||||
}
|
||||
|
||||
export interface ContainerSummary {
|
||||
name: string;
|
||||
id: string;
|
||||
image: string;
|
||||
state: DockerContainerState;
|
||||
status?: string;
|
||||
}
|
||||
export type GetLogResponse = Log;
|
||||
|
||||
export interface DockerContainerStats {
|
||||
name: string;
|
||||
@@ -381,6 +301,8 @@ export interface DockerContainerStats {
|
||||
pids: string;
|
||||
}
|
||||
|
||||
export type GetDeploymentStatsResponse = DockerContainerStats;
|
||||
|
||||
export interface DeploymentActionState {
|
||||
deploying: boolean;
|
||||
stopping: boolean;
|
||||
@@ -391,15 +313,49 @@ export interface DeploymentActionState {
|
||||
deleting: boolean;
|
||||
}
|
||||
|
||||
export interface CloneArgs {
|
||||
export type GetDeploymentActionStateResponse = DeploymentActionState;
|
||||
|
||||
export interface ApiSecret {
|
||||
name: string;
|
||||
repo?: string;
|
||||
branch?: string;
|
||||
on_clone?: SystemCommand;
|
||||
on_pull?: SystemCommand;
|
||||
github_account?: string;
|
||||
hash?: string;
|
||||
created_at: I64;
|
||||
expires?: I64;
|
||||
}
|
||||
|
||||
export type ResourceTarget =
|
||||
| { type: "System", id: string }
|
||||
| { type: "Build", id: string }
|
||||
| { type: "Builder", id: string }
|
||||
| { type: "Deployment", id: string }
|
||||
| { type: "Server", id: string }
|
||||
| { type: "Repo", id: string }
|
||||
| { type: "Alerter", id: string };
|
||||
|
||||
export interface User {
|
||||
_id?: MongoId;
|
||||
username: string;
|
||||
enabled?: boolean;
|
||||
admin?: boolean;
|
||||
create_server_permissions?: boolean;
|
||||
create_build_permissions?: boolean;
|
||||
avatar?: string;
|
||||
secrets?: ApiSecret[];
|
||||
password?: string;
|
||||
github_id?: string;
|
||||
google_id?: string;
|
||||
last_update_view?: I64;
|
||||
recently_viewed?: ResourceTarget[];
|
||||
updated_at?: I64;
|
||||
}
|
||||
|
||||
export type GetUserResponse = User;
|
||||
|
||||
export type GetUsersResponse = User[];
|
||||
|
||||
export type GetRepoResponse = Repo;
|
||||
|
||||
export type ListReposResponse = RepoListItem[];
|
||||
|
||||
export interface RepoActionState {
|
||||
cloning: boolean;
|
||||
pulling: boolean;
|
||||
@@ -407,68 +363,11 @@ export interface RepoActionState {
|
||||
deleting: boolean;
|
||||
}
|
||||
|
||||
export interface ImageSummary {
|
||||
/** ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. */
|
||||
Id: string;
|
||||
/** ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. */
|
||||
ParentId: string;
|
||||
/** List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. */
|
||||
RepoTags: string[];
|
||||
/** List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. */
|
||||
RepoDigests: string[];
|
||||
/** Date and time at which the image was created as a Unix timestamp (number of seconds sinds EPOCH). */
|
||||
Created: I64;
|
||||
/** Total size of the image including all layers it is composed of. */
|
||||
Size: I64;
|
||||
/** Total size of image layers that are shared between this image and other images. This size is not calculated by default. `-1` indicates that the value has not been set / calculated. */
|
||||
SharedSize: I64;
|
||||
/** Total size of the image including all layers it is composed of. In versions of Docker before v1.10, this field was calculated from the image itself and all of its parent images. Docker v1.10 and up store images self-contained, and no longer use a parent-chain, making this field an equivalent of the Size field. This field is kept for backward compatibility, but may be removed in a future version of the API. */
|
||||
VirtualSize: I64;
|
||||
/** User-defined key/value metadata. */
|
||||
Labels: Record<string, string>;
|
||||
/** Number of containers using this image. Includes both stopped and running containers. This size is not calculated by default, and depends on which API endpoint is used. `-1` indicates that the value has not been set / calculated. */
|
||||
Containers: I64;
|
||||
}
|
||||
export type GetRepoActionStateResponse = RepoActionState;
|
||||
|
||||
export interface IpamConfig {
|
||||
Subnet?: string;
|
||||
IPRange?: string;
|
||||
Gateway?: string;
|
||||
AuxiliaryAddresses?: Record<string, string>;
|
||||
}
|
||||
export type GetServerResponse = Server;
|
||||
|
||||
export interface Ipam {
|
||||
/** Name of the IPAM driver to use. */
|
||||
Driver?: string;
|
||||
/** List of IPAM configuration options, specified as a map: ``` {\"Subnet\": <CIDR>, \"IPRange\": <CIDR>, \"Gateway\": <IP address>, \"AuxAddress\": <device_name:IP address>} ``` */
|
||||
Config?: IpamConfig[];
|
||||
/** Driver-specific options, specified as a map. */
|
||||
Options?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface NetworkContainer {
|
||||
Name?: string;
|
||||
EndpointID?: string;
|
||||
MacAddress?: string;
|
||||
IPv4Address?: string;
|
||||
IPv6Address?: string;
|
||||
}
|
||||
|
||||
export interface DockerNetwork {
|
||||
Name?: string;
|
||||
Id?: string;
|
||||
Created?: string;
|
||||
Scope?: string;
|
||||
Driver?: string;
|
||||
EnableIPv6?: boolean;
|
||||
IPAM?: Ipam;
|
||||
Internal?: boolean;
|
||||
Attachable?: boolean;
|
||||
Ingress?: boolean;
|
||||
Containers?: Record<string, NetworkContainer>;
|
||||
Options?: Record<string, string>;
|
||||
Labels?: Record<string, string>;
|
||||
}
|
||||
export type ListServersResponse = ServerListItem[];
|
||||
|
||||
export interface ServerActionState {
|
||||
pruning_networks: boolean;
|
||||
@@ -476,17 +375,7 @@ export interface ServerActionState {
|
||||
pruning_images: boolean;
|
||||
}
|
||||
|
||||
export interface SystemStatsRecord {
|
||||
ts: I64;
|
||||
sid: string;
|
||||
system_load: number;
|
||||
cpu_perc: number;
|
||||
cpu_freq_mhz: number;
|
||||
mem_used_gb: number;
|
||||
mem_total_gb: number;
|
||||
disk_used_gb: number;
|
||||
disk_total_gb: number;
|
||||
}
|
||||
export type GetServerActionStateResponse = ServerActionState;
|
||||
|
||||
export interface SystemInformation {
|
||||
name?: string;
|
||||
@@ -497,6 +386,8 @@ export interface SystemInformation {
|
||||
cpu_brand: string;
|
||||
}
|
||||
|
||||
export type GetSystemInformationResponse = SystemInformation;
|
||||
|
||||
export interface BasicSystemStats {
|
||||
system_load: number;
|
||||
cpu_perc: number;
|
||||
@@ -599,14 +490,99 @@ export interface AllSystemStats {
|
||||
refresh_list_ts: I64;
|
||||
}
|
||||
|
||||
export interface ServerHealth {
|
||||
cpu: SeverityLevel;
|
||||
mem: SeverityLevel;
|
||||
disk: SeverityLevel;
|
||||
disks: Record<string, SeverityLevel>;
|
||||
temps: Record<string, SeverityLevel>;
|
||||
export type GetAllSystemStatsResponse = AllSystemStats;
|
||||
|
||||
export type GetBasicSystemStatsResponse = BasicSystemStats;
|
||||
|
||||
export type GetCpuUsageResponse = CpuUsage;
|
||||
|
||||
export type GetDiskUsageResponse = DiskUsage;
|
||||
|
||||
export type GetNetworkUsageResponse = NetworkUsage;
|
||||
|
||||
export type GetSystemProcessesResponse = SystemProcess[];
|
||||
|
||||
export type GetSystemComponentsResponse = SystemComponent[];
|
||||
|
||||
export interface IpamConfig {
|
||||
Subnet?: string;
|
||||
IPRange?: string;
|
||||
Gateway?: string;
|
||||
AuxiliaryAddresses?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface Ipam {
|
||||
/** Name of the IPAM driver to use. */
|
||||
Driver?: string;
|
||||
/** List of IPAM configuration options, specified as a map: ``` {\"Subnet\": <CIDR>, \"IPRange\": <CIDR>, \"Gateway\": <IP address>, \"AuxAddress\": <device_name:IP address>} ``` */
|
||||
Config?: IpamConfig[];
|
||||
/** Driver-specific options, specified as a map. */
|
||||
Options?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface NetworkContainer {
|
||||
Name?: string;
|
||||
EndpointID?: string;
|
||||
MacAddress?: string;
|
||||
IPv4Address?: string;
|
||||
IPv6Address?: string;
|
||||
}
|
||||
|
||||
export interface DockerNetwork {
|
||||
Name?: string;
|
||||
Id?: string;
|
||||
Created?: string;
|
||||
Scope?: string;
|
||||
Driver?: string;
|
||||
EnableIPv6?: boolean;
|
||||
IPAM?: Ipam;
|
||||
Internal?: boolean;
|
||||
Attachable?: boolean;
|
||||
Ingress?: boolean;
|
||||
Containers?: Record<string, NetworkContainer>;
|
||||
Options?: Record<string, string>;
|
||||
Labels?: Record<string, string>;
|
||||
}
|
||||
|
||||
export type GetDockerNetworksResponse = DockerNetwork[];
|
||||
|
||||
export interface ImageSummary {
|
||||
/** ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. */
|
||||
Id: string;
|
||||
/** ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. */
|
||||
ParentId: string;
|
||||
/** List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. */
|
||||
RepoTags: string[];
|
||||
/** List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. */
|
||||
RepoDigests: string[];
|
||||
/** Date and time at which the image was created as a Unix timestamp (number of seconds sinds EPOCH). */
|
||||
Created: I64;
|
||||
/** Total size of the image including all layers it is composed of. */
|
||||
Size: I64;
|
||||
/** Total size of image layers that are shared between this image and other images. This size is not calculated by default. `-1` indicates that the value has not been set / calculated. */
|
||||
SharedSize: I64;
|
||||
/** Total size of the image including all layers it is composed of. In versions of Docker before v1.10, this field was calculated from the image itself and all of its parent images. Docker v1.10 and up store images self-contained, and no longer use a parent-chain, making this field an equivalent of the Size field. This field is kept for backward compatibility, but may be removed in a future version of the API. */
|
||||
VirtualSize?: I64;
|
||||
/** User-defined key/value metadata. */
|
||||
Labels: Record<string, string>;
|
||||
/** Number of containers using this image. Includes both stopped and running containers. This size is not calculated by default, and depends on which API endpoint is used. `-1` indicates that the value has not been set / calculated. */
|
||||
Containers: I64;
|
||||
}
|
||||
|
||||
export type GetDockerImagesResponse = ImageSummary[];
|
||||
|
||||
export interface ContainerSummary {
|
||||
name: string;
|
||||
id: string;
|
||||
image: string;
|
||||
state: DockerContainerState;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export type GetDockerContainersResponse = ContainerSummary[];
|
||||
|
||||
export type GetAvailableSecretsResponse = string[];
|
||||
|
||||
export enum TagColor {
|
||||
Red = "Red",
|
||||
Green = "Green",
|
||||
@@ -625,6 +601,10 @@ export interface CustomTag {
|
||||
color?: TagColor;
|
||||
}
|
||||
|
||||
export type GetTagResponse = CustomTag;
|
||||
|
||||
export type ListTagsResponse = CustomTag[];
|
||||
|
||||
export enum Operation {
|
||||
None = "None",
|
||||
LaunchServer = "LaunchServer",
|
||||
@@ -666,16 +646,6 @@ export enum Operation {
|
||||
AutoPull = "AutoPull",
|
||||
}
|
||||
|
||||
export interface Log {
|
||||
stage: string;
|
||||
command: string;
|
||||
stdout: string;
|
||||
stderr: string;
|
||||
success: boolean;
|
||||
start_ts: I64;
|
||||
end_ts: I64;
|
||||
}
|
||||
|
||||
export enum UpdateStatus {
|
||||
Queued = "Queued",
|
||||
InProgress = "InProgress",
|
||||
@@ -695,6 +665,137 @@ export interface Update {
|
||||
version: Version;
|
||||
}
|
||||
|
||||
export type GetUpdateResponse = Update;
|
||||
|
||||
export type _PartialBuildConfig = Partial<BuildConfig>;
|
||||
|
||||
export type _PartialDeploymentConfig = Partial<DeploymentConfig>;
|
||||
|
||||
export type _PartialRepoConfig = Partial<RepoConfig>;
|
||||
|
||||
export type _PartialServerConfig = Partial<ServerConfig>;
|
||||
|
||||
export type _PartialCustomTag = Partial<CustomTag>;
|
||||
|
||||
export enum SeverityLevel {
|
||||
Ok = "OK",
|
||||
Warning = "WARNING",
|
||||
Critical = "CRITICAL",
|
||||
}
|
||||
|
||||
export type AlertData =
|
||||
| { type: "ServerUnreachable", data: {
|
||||
id: string;
|
||||
name: string;
|
||||
region?: string;
|
||||
}}
|
||||
| { type: "ServerCpu", data: {
|
||||
id: string;
|
||||
name: string;
|
||||
region?: string;
|
||||
percentage: number;
|
||||
top_procs: SystemProcess[];
|
||||
}}
|
||||
| { type: "ServerMem", data: {
|
||||
id: string;
|
||||
name: string;
|
||||
region?: string;
|
||||
used_gb: number;
|
||||
total_gb: number;
|
||||
top_procs: SystemProcess[];
|
||||
}}
|
||||
| { type: "ServerDisk", data: {
|
||||
id: string;
|
||||
name: string;
|
||||
region?: string;
|
||||
path: string;
|
||||
used_gb: number;
|
||||
total_gb: number;
|
||||
}}
|
||||
| { type: "ServerTemp", data: {
|
||||
id: string;
|
||||
name: string;
|
||||
region?: string;
|
||||
component: string;
|
||||
temp: number;
|
||||
max: number;
|
||||
}}
|
||||
| { type: "ContainerStateChange", data: {
|
||||
id: string;
|
||||
name: string;
|
||||
server_id: string;
|
||||
server_name: string;
|
||||
from: DockerContainerState;
|
||||
to: DockerContainerState;
|
||||
}}
|
||||
| { type: "None", data: {
|
||||
}};
|
||||
|
||||
export interface Alert {
|
||||
_id?: MongoId;
|
||||
ts: I64;
|
||||
resolved: boolean;
|
||||
level: SeverityLevel;
|
||||
target: ResourceTarget;
|
||||
variant: AlertData["type"];
|
||||
data: AlertData;
|
||||
resolved_ts?: I64;
|
||||
}
|
||||
|
||||
export interface CustomAlerterConfig {
|
||||
url: string;
|
||||
}
|
||||
|
||||
export interface SlackAlerterConfig {
|
||||
url: string;
|
||||
}
|
||||
|
||||
export interface ServerBuilderConfig {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AwsBuilderConfig {
|
||||
region: string;
|
||||
instance_type: string;
|
||||
volume_gb: number;
|
||||
ami_id: string;
|
||||
subnet_id: string;
|
||||
security_group_ids: string[];
|
||||
key_pair_name: string;
|
||||
assign_public_ip: boolean;
|
||||
github_accounts?: string[];
|
||||
docker_accounts?: string[];
|
||||
}
|
||||
|
||||
export interface CloneArgs {
|
||||
name: string;
|
||||
repo?: string;
|
||||
branch?: string;
|
||||
on_clone?: SystemCommand;
|
||||
on_pull?: SystemCommand;
|
||||
github_account?: string;
|
||||
}
|
||||
|
||||
export interface SystemStatsRecord {
|
||||
ts: I64;
|
||||
sid: string;
|
||||
system_load: number;
|
||||
cpu_perc: number;
|
||||
cpu_freq_mhz: number;
|
||||
mem_used_gb: number;
|
||||
mem_total_gb: number;
|
||||
disk_used_gb: number;
|
||||
disk_total_gb: number;
|
||||
}
|
||||
|
||||
export interface ServerHealth {
|
||||
cpu: SeverityLevel;
|
||||
mem: SeverityLevel;
|
||||
disk: SeverityLevel;
|
||||
disks: Record<string, SeverityLevel>;
|
||||
temps: Record<string, SeverityLevel>;
|
||||
}
|
||||
|
||||
export interface UpdateListItem {
|
||||
id: string;
|
||||
operation: Operation;
|
||||
@@ -707,30 +808,6 @@ export interface UpdateListItem {
|
||||
version: Version;
|
||||
}
|
||||
|
||||
export interface ApiSecret {
|
||||
name: string;
|
||||
hash?: string;
|
||||
created_at: I64;
|
||||
expires?: I64;
|
||||
}
|
||||
|
||||
export interface User {
|
||||
_id?: MongoId;
|
||||
username: string;
|
||||
enabled?: boolean;
|
||||
admin?: boolean;
|
||||
create_server_permissions?: boolean;
|
||||
create_build_permissions?: boolean;
|
||||
avatar?: string;
|
||||
secrets?: ApiSecret[];
|
||||
password?: string;
|
||||
github_id?: string;
|
||||
google_id?: string;
|
||||
last_update_view?: I64;
|
||||
recently_viewed?: ResourceTarget[];
|
||||
updated_at?: I64;
|
||||
}
|
||||
|
||||
export interface GetLoginOptions {
|
||||
}
|
||||
|
||||
@@ -896,11 +973,6 @@ export interface GetBuildVersions {
|
||||
patch?: number;
|
||||
}
|
||||
|
||||
export interface BuildVersionResponseItem {
|
||||
version: Version;
|
||||
ts: I64;
|
||||
}
|
||||
|
||||
export interface GetBuilder {
|
||||
id: string;
|
||||
}
|
||||
@@ -1136,14 +1208,10 @@ export interface GetServerAvailableAccountsResponse {
|
||||
docker: string[];
|
||||
}
|
||||
|
||||
export interface GetAvailableNetworks {
|
||||
export interface GetAvailableSecrets {
|
||||
server_id: string;
|
||||
}
|
||||
|
||||
export interface GetAvailableNetworksResponse {
|
||||
networks: DockerNetwork[];
|
||||
}
|
||||
|
||||
export interface GetTag {
|
||||
id: string;
|
||||
}
|
||||
@@ -1443,7 +1511,6 @@ export type ReadRequest =
|
||||
| { type: "GetServerActionState", params: GetServerActionState }
|
||||
| { type: "GetHistoricalServerStats", params: GetHistoricalServerStats }
|
||||
| { type: "GetServerAvailableAccounts", params: GetServerAvailableAccounts }
|
||||
| { type: "GetAvailableNetworks", params: GetAvailableNetworks }
|
||||
| { type: "GetDeploymentsSummary", params: GetDeploymentsSummary }
|
||||
| { type: "GetDeployment", params: GetDeployment }
|
||||
| { type: "ListDeployments", params: ListDeployments }
|
||||
|
||||
@@ -8,7 +8,13 @@ license.workspace = true
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
monitor_macros.workspace = true
|
||||
# mogh
|
||||
mungos.workspace = true
|
||||
resolver_api.workspace = true
|
||||
derive_empty_traits.workspace = true
|
||||
derive_variants.workspace = true
|
||||
partial_derive2.workspace = true
|
||||
# ext
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
typeshare.workspace = true
|
||||
@@ -17,10 +23,5 @@ strum_macros.workspace = true
|
||||
async-trait.workspace = true
|
||||
anyhow.workspace = true
|
||||
async_timing_util.workspace = true
|
||||
resolver_api.workspace = true
|
||||
derive_builder.workspace = true
|
||||
bollard.workspace = true
|
||||
derive_variants.workspace = true
|
||||
partial_derive2.workspace = true
|
||||
make_option.workspace = true
|
||||
mungos.workspace = true
|
||||
bollard.workspace = true
|
||||
@@ -44,7 +44,7 @@ pub struct ImageSummary {
|
||||
|
||||
/// Total size of the image including all layers it is composed of. In versions of Docker before v1.10, this field was calculated from the image itself and all of its parent images. Docker v1.10 and up store images self-contained, and no longer use a parent-chain, making this field an equivalent of the Size field. This field is kept for backward compatibility, but may be removed in a future version of the API.
|
||||
#[serde(rename = "VirtualSize")]
|
||||
pub virtual_size: I64,
|
||||
pub virtual_size: Option<I64>,
|
||||
|
||||
/// User-defined key/value metadata.
|
||||
#[serde(rename = "Labels")]
|
||||
@@ -64,7 +64,7 @@ fn deserialize_nonoptional_vec<
|
||||
d: D,
|
||||
) -> Result<Vec<T>, D::Error> {
|
||||
serde::Deserialize::deserialize(d)
|
||||
.map(|x: Option<_>| x.unwrap_or(Vec::new()))
|
||||
.map(|x: Option<_>| x.unwrap_or_default())
|
||||
}
|
||||
|
||||
fn deserialize_nonoptional_map<
|
||||
@@ -75,7 +75,7 @@ fn deserialize_nonoptional_map<
|
||||
d: D,
|
||||
) -> Result<HashMap<String, T>, D::Error> {
|
||||
serde::Deserialize::deserialize(d)
|
||||
.map(|x: Option<_>| x.unwrap_or(HashMap::new()))
|
||||
.map(|x: Option<_>| x.unwrap_or_default())
|
||||
}
|
||||
|
||||
impl From<bollard::service::ImageSummary> for ImageSummary {
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
use resolver_api::derive::Request;
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::{derive::Request, HasResponse};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
pub trait MonitorAuthRequest: HasResponse {}
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorAuthRequest)]
|
||||
#[response(GetLoginOptionsResponse)]
|
||||
pub struct GetLoginOptions {}
|
||||
|
||||
@@ -20,7 +24,8 @@ pub struct GetLoginOptionsResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorAuthRequest)]
|
||||
#[response(CreateLocalUserResponse)]
|
||||
pub struct CreateLocalUser {
|
||||
pub username: String,
|
||||
@@ -36,7 +41,8 @@ pub struct CreateLocalUserResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorAuthRequest)]
|
||||
#[response(LoginLocalUserResponse)]
|
||||
pub struct LoginLocalUser {
|
||||
pub username: String,
|
||||
@@ -52,7 +58,8 @@ pub struct LoginLocalUserResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorAuthRequest)]
|
||||
#[response(ExchangeForJwtResponse)]
|
||||
pub struct ExchangeForJwt {
|
||||
pub token: String,
|
||||
@@ -67,7 +74,8 @@ pub struct ExchangeForJwtResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorAuthRequest)]
|
||||
#[response(LoginWithSecretResponse)]
|
||||
pub struct LoginWithSecret {
|
||||
pub username: String,
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
use crate::entities::update::Update;
|
||||
|
||||
use super::MonitorExecuteRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorExecuteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct RunBuild {
|
||||
pub build_id: String,
|
||||
@@ -16,7 +20,8 @@ pub struct RunBuild {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorExecuteRequest)]
|
||||
#[response(CancelBuildResponse)]
|
||||
pub struct CancelBuild {
|
||||
pub build_id: String,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
@@ -6,10 +7,13 @@ use crate::entities::{
|
||||
deployment::TerminationSignal, update::Update,
|
||||
};
|
||||
|
||||
use super::MonitorExecuteRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorExecuteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct Deploy {
|
||||
pub deployment_id: String,
|
||||
@@ -20,7 +24,8 @@ pub struct Deploy {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorExecuteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct StartContainer {
|
||||
pub deployment_id: String,
|
||||
@@ -29,7 +34,8 @@ pub struct StartContainer {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorExecuteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct StopContainer {
|
||||
pub deployment_id: String,
|
||||
@@ -40,7 +46,8 @@ pub struct StopContainer {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorExecuteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct RemoveContainer {
|
||||
pub deployment_id: String,
|
||||
|
||||
@@ -6,4 +6,7 @@ mod server;
|
||||
pub use build::*;
|
||||
pub use deployment::*;
|
||||
pub use repo::*;
|
||||
use resolver_api::HasResponse;
|
||||
pub use server::*;
|
||||
|
||||
pub trait MonitorExecuteRequest: HasResponse {}
|
||||
@@ -1,13 +1,17 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
use crate::entities::update::Update;
|
||||
|
||||
use super::MonitorExecuteRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorExecuteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct CloneRepo {
|
||||
pub id: String,
|
||||
@@ -16,7 +20,8 @@ pub struct CloneRepo {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorExecuteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct PullRepo {
|
||||
pub id: String,
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
use crate::entities::update::Update;
|
||||
|
||||
use super::MonitorExecuteRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorExecuteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct PruneDockerNetworks {
|
||||
pub server_id: String,
|
||||
@@ -16,7 +22,10 @@ pub struct PruneDockerNetworks {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorExecuteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct PruneDockerImages {
|
||||
pub server_id: String,
|
||||
@@ -25,7 +34,10 @@ pub struct PruneDockerImages {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorExecuteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct PruneDockerContainers {
|
||||
pub server_id: String,
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
use crate::{entities::alert::Alert, MongoDocument, I64, U64};
|
||||
|
||||
use super::MonitorReadRequest;
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(ListAlertsResponse)]
|
||||
pub struct ListAlerts {
|
||||
pub query: Option<MongoDocument>,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
@@ -7,28 +8,45 @@ use crate::{
|
||||
MongoDocument,
|
||||
};
|
||||
|
||||
use super::MonitorReadRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Alerter)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetAlerterResponse)]
|
||||
pub struct GetAlerter {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetAlerterResponse = Alerter;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Vec<AlerterListItem>)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(ListAlertersResponse)]
|
||||
pub struct ListAlerters {
|
||||
pub query: Option<MongoDocument>,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type ListAlertersResponse = Vec<AlerterListItem>;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetAlertersSummaryResponse)]
|
||||
pub struct GetAlertersSummary {}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use std::cmp::Ordering;
|
||||
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
@@ -12,37 +13,52 @@ use crate::{
|
||||
MongoDocument, I64,
|
||||
};
|
||||
|
||||
use super::MonitorReadRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Build)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetBuildResponse)]
|
||||
pub struct GetBuild {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetBuildResponse = Build;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Vec<BuildListItem>)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(ListBuildsResponse)]
|
||||
pub struct ListBuilds {
|
||||
pub query: Option<MongoDocument>,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type ListBuildsResponse = Vec<BuildListItem>;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(BuildActionState)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetBuildActionStateResponse)]
|
||||
pub struct GetBuildActionState {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetBuildActionStateResponse = BuildActionState;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetBuildsSummaryResponse)]
|
||||
pub struct GetBuildsSummary {}
|
||||
|
||||
@@ -55,7 +71,8 @@ pub struct GetBuildsSummaryResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetBuildMonthlyStatsResponse)]
|
||||
pub struct GetBuildMonthlyStats {
|
||||
#[serde(default)]
|
||||
@@ -106,8 +123,9 @@ impl GetBuildMonthlyStatsResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Default, Request)]
|
||||
#[response(Vec<BuildVersionResponseItem>)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Default, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetBuildVersionsResponse)]
|
||||
pub struct GetBuildVersions {
|
||||
pub id: String,
|
||||
#[serde(default)]
|
||||
@@ -117,6 +135,9 @@ pub struct GetBuildVersions {
|
||||
pub patch: Option<i32>,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetBuildVersionsResponse = Vec<BuildVersionResponseItem>;
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Default)]
|
||||
pub struct BuildVersionResponseItem {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
@@ -7,28 +8,39 @@ use crate::{
|
||||
MongoDocument,
|
||||
};
|
||||
|
||||
use super::MonitorReadRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Builder)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetBuilderResponse)]
|
||||
pub struct GetBuilder {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetBuilderResponse = Builder;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Vec<BuilderListItem>)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(ListBuildersResponse)]
|
||||
pub struct ListBuilders {
|
||||
pub query: Option<MongoDocument>,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type ListBuildersResponse = Vec<BuilderListItem>;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetBuildersSummaryResponse)]
|
||||
pub struct GetBuildersSummary {}
|
||||
|
||||
@@ -41,7 +53,8 @@ pub struct GetBuildersSummaryResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetBuilderAvailableAccountsResponse)]
|
||||
pub struct GetBuilderAvailableAccounts {
|
||||
pub id: String,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
@@ -13,28 +14,39 @@ use crate::{
|
||||
MongoDocument, I64, U64,
|
||||
};
|
||||
|
||||
use super::MonitorReadRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Deployment)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetDeploymentResponse)]
|
||||
pub struct GetDeployment {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetDeploymentResponse = Deployment;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Vec<DeploymentListItem>)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(ListDeploymentsResponse)]
|
||||
pub struct ListDeployments {
|
||||
pub query: Option<MongoDocument>,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type ListDeploymentsResponse = Vec<DeploymentListItem>;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetDeploymentStatusResponse)]
|
||||
pub struct GetDeploymentStatus {
|
||||
pub id: String,
|
||||
@@ -50,8 +62,9 @@ pub struct GetDeploymentStatusResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Log)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetLogResponse)]
|
||||
pub struct GetLog {
|
||||
pub deployment_id: String,
|
||||
#[serde(default = "default_tail")]
|
||||
@@ -62,10 +75,14 @@ fn default_tail() -> u64 {
|
||||
50
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetLogResponse = Log;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetDeployedVersionResponse)]
|
||||
pub struct GetDeployedVersion {
|
||||
pub deployment_id: String,
|
||||
@@ -80,25 +97,34 @@ pub struct GetDeployedVersionResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(DockerContainerStats)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetDeploymentStatsResponse)]
|
||||
pub struct GetDeploymentStats {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetDeploymentStatsResponse = DockerContainerStats;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(DeploymentActionState)]
|
||||
pub struct GetDeploymentActionState {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetDeploymentActionStateResponse = DeploymentActionState;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetDeploymentsSummaryResponse)]
|
||||
pub struct GetDeploymentsSummary {}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use resolver_api::derive::Request;
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::{derive::Request, HasResponse};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
@@ -26,10 +27,15 @@ pub use update::*;
|
||||
|
||||
use crate::entities::{user::User, Timelength};
|
||||
|
||||
pub trait MonitorReadRequest: HasResponse {}
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetVersionResponse)]
|
||||
pub struct GetVersion {}
|
||||
|
||||
@@ -42,21 +48,36 @@ pub struct GetVersionResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(User)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetUserResponse)]
|
||||
pub struct GetUser {}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetUserResponse = User;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Vec<User>)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetUsersResponse)]
|
||||
pub struct GetUsers {}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetUsersResponse = Vec<User>;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetUsernameResponse)]
|
||||
pub struct GetUsername {
|
||||
pub user_id: String,
|
||||
@@ -71,7 +92,10 @@ pub struct GetUsernameResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetCoreInfoResponse)]
|
||||
pub struct GetCoreInfo {}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
@@ -7,37 +8,52 @@ use crate::{
|
||||
MongoDocument,
|
||||
};
|
||||
|
||||
use super::MonitorReadRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(Repo)]
|
||||
pub struct GetRepo {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetRepoResponse = Repo;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(Vec<RepoListItem>)]
|
||||
pub struct ListRepos {
|
||||
pub query: Option<MongoDocument>,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type ListReposResponse = Vec<RepoListItem>;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(RepoActionState)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetRepoActionStateResponse)]
|
||||
pub struct GetRepoActionState {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetRepoActionStateResponse = RepoActionState;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetReposSummaryResponse)]
|
||||
pub struct GetReposSummary {}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
@@ -11,10 +12,15 @@ use crate::{
|
||||
MongoDocument,
|
||||
};
|
||||
|
||||
use super::MonitorReadRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(FindResourcesResponse)]
|
||||
pub struct FindResources {
|
||||
pub query: Option<MongoDocument>,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
@@ -20,28 +21,45 @@ use crate::{
|
||||
MongoDocument, I64,
|
||||
};
|
||||
|
||||
use super::MonitorReadRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(Server)]
|
||||
pub struct GetServer {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetServerResponse = Server;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Vec<ServerListItem>)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(ListServersResponse)]
|
||||
pub struct ListServers {
|
||||
pub query: Option<MongoDocument>,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type ListServersResponse = Vec<ServerListItem>;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetServerStatusResponse)]
|
||||
pub struct GetServerStatus {
|
||||
pub id: String,
|
||||
@@ -56,16 +74,25 @@ pub struct GetServerStatusResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(ServerActionState)]
|
||||
pub struct GetServerActionState {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetServerActionStateResponse = ServerActionState;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetPeripheryVersionResponse)]
|
||||
pub struct GetPeripheryVersion {
|
||||
pub server_id: String,
|
||||
@@ -80,88 +107,145 @@ pub struct GetPeripheryVersionResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(SystemInformation)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetSystemInformationResponse)]
|
||||
pub struct GetSystemInformation {
|
||||
pub server_id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetSystemInformationResponse = SystemInformation;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(AllSystemStats)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetAllSystemStatsResponse)]
|
||||
pub struct GetAllSystemStats {
|
||||
pub server_id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetAllSystemStatsResponse = AllSystemStats;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(BasicSystemStats)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetBasicSystemStatsResponse)]
|
||||
pub struct GetBasicSystemStats {
|
||||
pub server_id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetBasicSystemStatsResponse = BasicSystemStats;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(CpuUsage)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetCpuUsageResponse)]
|
||||
pub struct GetCpuUsage {
|
||||
pub server_id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetCpuUsageResponse = CpuUsage;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(DiskUsage)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetDiskUsageResponse)]
|
||||
pub struct GetDiskUsage {
|
||||
pub server_id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetDiskUsageResponse = DiskUsage;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(NetworkUsage)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetNetworkUsageResponse)]
|
||||
pub struct GetNetworkUsage {
|
||||
pub server_id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetNetworkUsageResponse = NetworkUsage;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Vec<SystemProcess>)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetSystemProcessesResponse)]
|
||||
pub struct GetSystemProcesses {
|
||||
pub server_id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetSystemProcessesResponse = Vec<SystemProcess>;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Vec<SystemComponent>)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetSystemComponentsResponse)]
|
||||
pub struct GetSystemComponents {
|
||||
pub server_id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetSystemComponentsResponse = Vec<SystemComponent>;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Vec<DockerNetwork>)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetDockerNetworksResponse)]
|
||||
pub struct GetDockerNetworks {
|
||||
pub server_id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetDockerNetworksResponse = Vec<DockerNetwork>;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetHistoricalServerStatsResponse)]
|
||||
pub struct GetHistoricalServerStats {
|
||||
pub server_id: String,
|
||||
@@ -180,25 +264,40 @@ pub struct GetHistoricalServerStatsResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Vec<ImageSummary>)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetDockerImagesResponse)]
|
||||
pub struct GetDockerImages {
|
||||
pub server_id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetDockerImagesResponse = Vec<ImageSummary>;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Vec<ContainerSummary>)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetDockerContainersResponse)]
|
||||
pub struct GetDockerContainers {
|
||||
pub server_id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetDockerContainersResponse = Vec<ContainerSummary>;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetServersSummaryResponse)]
|
||||
pub struct GetServersSummary {}
|
||||
|
||||
@@ -214,7 +313,10 @@ pub struct GetServersSummaryResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetServerAvailableAccountsResponse)]
|
||||
pub struct GetServerAvailableAccounts {
|
||||
pub id: String,
|
||||
@@ -230,14 +332,14 @@ pub struct GetServerAvailableAccountsResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(GetAvailableNetworksResponse)]
|
||||
pub struct GetAvailableNetworks {
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetAvailableSecretsResponse)]
|
||||
pub struct GetAvailableSecrets {
|
||||
pub server_id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct GetAvailableNetworksResponse {
|
||||
pub networks: Vec<DockerNetwork>,
|
||||
}
|
||||
pub type GetAvailableSecretsResponse = Vec<String>;
|
||||
|
||||
@@ -1,23 +1,38 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
use crate::{entities::tag::CustomTag, MongoDocument};
|
||||
|
||||
use super::MonitorReadRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(CustomTag)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetTagResponse)]
|
||||
pub struct GetTag {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type GetTagResponse = CustomTag;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Vec<CustomTag>)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(ListTagsResponse)]
|
||||
pub struct ListTags {
|
||||
pub query: Option<MongoDocument>,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
pub type ListTagsResponse = Vec<CustomTag>;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
@@ -7,15 +8,28 @@ use crate::{
|
||||
MongoDocument,
|
||||
};
|
||||
|
||||
use super::MonitorReadRequest;
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[response(Update)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(GetUpdateResponse)]
|
||||
pub struct GetUpdate {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
pub type GetUpdateResponse = Update;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorReadRequest)]
|
||||
#[response(ListUpdatesResponse)]
|
||||
pub struct ListUpdates {
|
||||
pub query: Option<MongoDocument>,
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
use crate::entities::alerter::{Alerter, PartialAlerterConfig};
|
||||
|
||||
use super::MonitorWriteRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Alerter)]
|
||||
pub struct CreateAlerter {
|
||||
pub name: String,
|
||||
@@ -17,7 +21,8 @@ pub struct CreateAlerter {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Alerter)]
|
||||
pub struct CopyAlerter {
|
||||
pub name: String,
|
||||
@@ -27,7 +32,8 @@ pub struct CopyAlerter {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Alerter)]
|
||||
pub struct DeleteAlerter {
|
||||
pub id: String,
|
||||
@@ -36,7 +42,8 @@ pub struct DeleteAlerter {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Alerter)]
|
||||
pub struct UpdateAlerter {
|
||||
pub id: String,
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
use crate::entities::build::{Build, PartialBuildConfig};
|
||||
|
||||
use super::MonitorWriteRequest;
|
||||
|
||||
#[typeshare(serialized_as = "Partial<BuildConfig>")]
|
||||
type _PartialBuildConfig = PartialBuildConfig;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Build)]
|
||||
pub struct CreateBuild {
|
||||
pub name: String,
|
||||
@@ -20,7 +26,10 @@ pub struct CreateBuild {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Build)]
|
||||
pub struct CopyBuild {
|
||||
pub name: String,
|
||||
@@ -30,7 +39,10 @@ pub struct CopyBuild {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Build)]
|
||||
pub struct DeleteBuild {
|
||||
pub id: String,
|
||||
@@ -39,7 +51,10 @@ pub struct DeleteBuild {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Build)]
|
||||
pub struct UpdateBuild {
|
||||
pub id: String,
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
use crate::entities::builder::{Builder, PartialBuilderConfig};
|
||||
|
||||
use super::MonitorWriteRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Builder)]
|
||||
pub struct CreateBuilder {
|
||||
pub name: String,
|
||||
@@ -17,7 +21,8 @@ pub struct CreateBuilder {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Builder)]
|
||||
pub struct CopyBuilder {
|
||||
pub name: String,
|
||||
@@ -27,7 +32,8 @@ pub struct CopyBuilder {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Builder)]
|
||||
pub struct DeleteBuilder {
|
||||
pub id: String,
|
||||
@@ -36,7 +42,8 @@ pub struct DeleteBuilder {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Builder)]
|
||||
pub struct UpdateBuilder {
|
||||
pub id: String,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
@@ -7,13 +8,16 @@ use crate::entities::{
|
||||
update::Update,
|
||||
};
|
||||
|
||||
use super::MonitorWriteRequest;
|
||||
|
||||
#[typeshare(serialized_as = "Partial<DeploymentConfig>")]
|
||||
type _PartialDeploymentConfig = PartialDeploymentConfig;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Deployment)]
|
||||
pub struct CreateDeployment {
|
||||
pub name: String,
|
||||
@@ -23,7 +27,8 @@ pub struct CreateDeployment {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Deployment)]
|
||||
pub struct CopyDeployment {
|
||||
pub name: String,
|
||||
@@ -33,7 +38,8 @@ pub struct CopyDeployment {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Deployment)]
|
||||
pub struct DeleteDeployment {
|
||||
pub id: String,
|
||||
@@ -42,7 +48,8 @@ pub struct DeleteDeployment {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Deployment)]
|
||||
pub struct UpdateDeployment {
|
||||
pub id: String,
|
||||
@@ -52,7 +59,8 @@ pub struct UpdateDeployment {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct RenameDeployment {
|
||||
pub id: String,
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
use crate::entities::update::ResourceTarget;
|
||||
|
||||
use super::MonitorWriteRequest;
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(UpdateDescriptionResponse)]
|
||||
pub struct UpdateDescription {
|
||||
pub target: ResourceTarget,
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
use crate::entities::{builder::AwsBuilderConfig, update::Update};
|
||||
|
||||
use super::MonitorWriteRequest;
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct LaunchServer {
|
||||
pub name: String,
|
||||
|
||||
@@ -19,7 +19,10 @@ pub use description::*;
|
||||
pub use launch::*;
|
||||
pub use permissions::*;
|
||||
pub use repo::*;
|
||||
use resolver_api::HasResponse;
|
||||
pub use secret::*;
|
||||
pub use server::*;
|
||||
pub use tags::*;
|
||||
pub use user::*;
|
||||
|
||||
pub trait MonitorWriteRequest: HasResponse {}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
@@ -7,8 +8,11 @@ use crate::entities::{
|
||||
PermissionLevel,
|
||||
};
|
||||
|
||||
use super::MonitorWriteRequest;
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct UpdateUserPermissionsOnTarget {
|
||||
pub user_id: String,
|
||||
@@ -17,7 +21,8 @@ pub struct UpdateUserPermissionsOnTarget {
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct UpdateUserPermissions {
|
||||
pub user_id: String,
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
use crate::entities::repo::{PartialRepoConfig, Repo};
|
||||
|
||||
use super::MonitorWriteRequest;
|
||||
|
||||
#[typeshare(serialized_as = "Partial<RepoConfig>")]
|
||||
type _PartialRepoConfig = PartialRepoConfig;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Repo)]
|
||||
pub struct CreateRepo {
|
||||
pub name: String,
|
||||
@@ -20,7 +24,8 @@ pub struct CreateRepo {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Repo)]
|
||||
pub struct CopyRepo {
|
||||
pub name: String,
|
||||
@@ -30,7 +35,8 @@ pub struct CopyRepo {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Repo)]
|
||||
pub struct DeleteRepo {
|
||||
pub id: String,
|
||||
@@ -39,7 +45,8 @@ pub struct DeleteRepo {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Repo)]
|
||||
pub struct UpdateRepo {
|
||||
pub id: String,
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
use crate::I64;
|
||||
|
||||
use super::MonitorWriteRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(CreateLoginSecretResponse)]
|
||||
pub struct CreateLoginSecret {
|
||||
pub name: String,
|
||||
@@ -23,7 +27,8 @@ pub struct CreateLoginSecretResponse {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(DeleteLoginSecretResponse)]
|
||||
pub struct DeleteLoginSecret {
|
||||
pub name: String,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
@@ -7,13 +8,16 @@ use crate::entities::{
|
||||
update::Update,
|
||||
};
|
||||
|
||||
use super::MonitorWriteRequest;
|
||||
|
||||
#[typeshare(serialized_as = "Partial<ServerConfig>")]
|
||||
type _PartialServerConfig = PartialServerConfig;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Server)]
|
||||
pub struct CreateServer {
|
||||
pub name: String,
|
||||
@@ -23,7 +27,8 @@ pub struct CreateServer {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Server)]
|
||||
pub struct DeleteServer {
|
||||
pub id: String,
|
||||
@@ -32,7 +37,8 @@ pub struct DeleteServer {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Server)]
|
||||
pub struct UpdateServer {
|
||||
pub id: String,
|
||||
@@ -42,7 +48,8 @@ pub struct UpdateServer {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct RenameServer {
|
||||
pub id: String,
|
||||
@@ -52,7 +59,8 @@ pub struct RenameServer {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct CreateNetwork {
|
||||
pub server_id: String,
|
||||
@@ -62,7 +70,8 @@ pub struct CreateNetwork {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(Update)]
|
||||
pub struct DeleteNetwork {
|
||||
pub server_id: String,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
@@ -7,13 +8,16 @@ use crate::entities::{
|
||||
update::ResourceTarget,
|
||||
};
|
||||
|
||||
use super::MonitorWriteRequest;
|
||||
|
||||
#[typeshare(serialized_as = "Partial<CustomTag>")]
|
||||
type _PartialCustomTag = PartialCustomTag;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(CustomTag)]
|
||||
pub struct CreateTag {
|
||||
pub name: String,
|
||||
@@ -28,7 +32,8 @@ pub struct CreateTag {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(CustomTag)]
|
||||
pub struct DeleteTag {
|
||||
pub id: String,
|
||||
@@ -37,7 +42,8 @@ pub struct DeleteTag {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(CustomTag)]
|
||||
pub struct UpdateTag {
|
||||
pub id: String,
|
||||
@@ -47,7 +53,8 @@ pub struct UpdateTag {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(())]
|
||||
pub struct AddTags {
|
||||
pub target: ResourceTarget,
|
||||
@@ -57,7 +64,8 @@ pub struct AddTags {
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request, EmptyTraits)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(())]
|
||||
pub struct RemoveTags {
|
||||
pub target: ResourceTarget,
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
use derive_empty_traits::EmptyTraits;
|
||||
use resolver_api::derive::Request;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
|
||||
use crate::entities::update::ResourceTarget;
|
||||
|
||||
use super::MonitorWriteRequest;
|
||||
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(PushRecentlyViewedResponse)]
|
||||
pub struct PushRecentlyViewed {
|
||||
pub resource: ResourceTarget,
|
||||
@@ -20,7 +26,10 @@ pub struct PushRecentlyViewedResponse {}
|
||||
//
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
|
||||
#[derive(
|
||||
Serialize, Deserialize, Debug, Clone, Request, EmptyTraits,
|
||||
)]
|
||||
#[empty_traits(MonitorWriteRequest)]
|
||||
#[response(SetLastSeenUpdateResponse)]
|
||||
pub struct SetLastSeenUpdate {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user