diff --git a/Cargo.lock b/Cargo.lock index c5f8867..cac2519 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -115,9 +115,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", @@ -177,9 +177,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -204,9 +204,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" dependencies = [ "serde", ] @@ -222,9 +222,9 @@ dependencies = [ [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cc" @@ -241,13 +241,27 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cloud-connector-proto" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +dependencies = [ + "freyja-build-common", + "prost", + "prost-types", + "proto-common 0.1.0", + "proto-common 0.1.0 (git+https://github.com/eclipse-ibeji/freyja)", + "tonic", +] + +[[package]] +name = "cloud-connector-proto" +version = "0.1.0" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "prost", "prost-types", + "serde", + "serde_json", "time", "tonic", - "tonic-build 0.11.0", + "tonic-build", ] [[package]] @@ -326,14 +340,14 @@ dependencies = [ [[package]] name = "core-protobuf-data-access" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/ibeji#545304a3acec0ccbb87ca82fe1935e445338f7b8" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ + "freyja-build-common", "prost", "prost-types", + "proto-common 0.1.0 (git+https://github.com/eclipse-ibeji/freyja)", "serde", - "tokio", "tonic", - "tonic-build 0.11.0", ] [[package]] @@ -345,6 +359,15 @@ dependencies = [ "libc", ] +[[package]] +name = "crc32fast" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +dependencies = [ + "cfg-if", +] + [[package]] name = "crossbeam-channel" version = "0.5.12" @@ -383,6 +406,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", + "serde", ] [[package]] @@ -457,14 +481,14 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "file-service-discovery-adapter" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", "freyja-build-common", @@ -478,16 +502,35 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + [[package]] name = "freyja" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", "env_logger", @@ -509,12 +552,16 @@ dependencies = [ [[package]] name = "freyja-build-common" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" +dependencies = [ + "tonic-build", + "ureq", +] [[package]] name = "freyja-common" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", "config", @@ -524,6 +571,7 @@ dependencies = [ "serde", "serde_json", "strum_macros", + "time", "tokio", ] @@ -703,10 +751,10 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "grpc-cloud-adapter" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", - "cloud-connector-proto", + "cloud-connector-proto 0.1.0 (git+https://github.com/eclipse-ibeji/freyja)", "freyja-build-common", "freyja-common", "futures", @@ -719,7 +767,7 @@ dependencies = [ [[package]] name = "grpc-digital-twin-adapter" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", "core-protobuf-data-access", @@ -734,7 +782,7 @@ dependencies = [ [[package]] name = "grpc-mapping-adapter" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", "freyja-build-common", @@ -750,7 +798,7 @@ dependencies = [ [[package]] name = "grpc-service-discovery-adapter" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", "freyja-build-common", @@ -763,9 +811,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes", "fnv", @@ -773,7 +821,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.5", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -895,10 +943,20 @@ dependencies = [ "tokio-io-timeout", ] +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "in-memory-mock-cloud-adapter" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", "freyja-common", @@ -910,7 +968,7 @@ dependencies = [ [[package]] name = "in-memory-mock-data-adapter" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", "freyja-build-common", @@ -923,7 +981,7 @@ dependencies = [ [[package]] name = "in-memory-mock-digital-twin-adapter" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", "freyja-build-common", @@ -935,7 +993,7 @@ dependencies = [ [[package]] name = "in-memory-mock-mapping-adapter" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", "freyja-build-common", @@ -956,9 +1014,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -1023,7 +1081,7 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "managed-subscribe-data-adapter" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", "core-protobuf-data-access", @@ -1038,13 +1096,13 @@ dependencies = [ [[package]] name = "mapping-service-proto" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "freyja-common", "prost", "prost-types", "tonic", - "tonic-build 0.11.0", + "tonic-build", ] [[package]] @@ -1096,7 +1154,7 @@ name = "mqtt-cloud-connector" version = "0.1.0" dependencies = [ "async-trait", - "cloud-connector-proto", + "cloud-connector-proto 0.1.0", "env_logger", "freyja-common", "futures", @@ -1109,13 +1167,13 @@ dependencies = [ "time", "tokio", "tonic", - "tonic-build 0.11.0", + "tonic-build", ] [[package]] name = "mqtt-data-adapter" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", "freyja-build-common", @@ -1296,7 +1354,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.2.5", + "indexmap 2.2.6", ] [[package]] @@ -1351,9 +1409,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ "proc-macro2", "syn", @@ -1371,7 +1429,7 @@ dependencies = [ [[package]] name = "proc-macros" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "convert_case", "proc-macro2", @@ -1433,6 +1491,15 @@ dependencies = [ "prost", ] +[[package]] +name = "proto-common" +version = "0.1.0" + +[[package]] +name = "proto-common" +version = "0.1.0" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" + [[package]] name = "quote" version = "1.0.35" @@ -1474,9 +1541,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", @@ -1501,6 +1568,21 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "ron" version = "0.8.1" @@ -1508,7 +1590,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64", - "bitflags 2.4.2", + "bitflags 2.5.0", "serde", "serde_derive", ] @@ -1531,17 +1613,48 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99008d7ad0bbbea527ec27bddbc0e432c5b87d8175178cee68d2eec9c4a1813c" +dependencies = [ + "log", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "868e20fada228fefaf6b652e00cc73623d54f8171e7352c18bb281571f2d92da" + +[[package]] +name = "rustls-webpki" +version = "0.102.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -1557,7 +1670,7 @@ checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "sample-grpc-data-adapter" version = "0.1.0" -source = "git+https://github.com/eclipse-ibeji/freyja#c88572d9eb406964a1e88f02535f70f04c2d2f9c" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ "async-trait", "freyja-build-common", @@ -1572,15 +1685,14 @@ dependencies = [ [[package]] name = "samples-protobuf-data-access" -version = "1.0.0" -source = "git+https://github.com/eclipse-ibeji/ibeji#545304a3acec0ccbb87ca82fe1935e445338f7b8" +version = "0.1.0" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ + "freyja-build-common", "prost", "prost-types", - "serde", - "tokio", + "proto-common 0.1.0 (git+https://github.com/eclipse-ibeji/freyja)", "tonic", - "tonic-build 0.11.0", ] [[package]] @@ -1626,12 +1738,13 @@ dependencies = [ [[package]] name = "service_discovery_proto" version = "0.1.0" -source = "git+https://github.com/eclipse-chariott/chariott#ba45702985837d719c200517c78f07ba4b031c9a" +source = "git+https://github.com/eclipse-ibeji/freyja#3f3a9d3c564e95c486ea04e81c652def66bd0929" dependencies = [ + "freyja-build-common", "prost", - "tokio", + "prost-types", + "proto-common 0.1.0 (git+https://github.com/eclipse-ibeji/freyja)", "tonic", - "tonic-build 0.10.2", ] [[package]] @@ -1664,6 +1777,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "strum_macros" version = "0.26.2" @@ -1677,11 +1796,17 @@ dependencies = [ "syn", ] +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + [[package]] name = "syn" -version = "2.0.52" +version = "2.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0" dependencies = [ "proc-macro2", "quote", @@ -1733,10 +1858,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", + "itoa", "num-conv", "powerfmt", "serde", "time-core", + "time-macros", ] [[package]] @@ -1745,6 +1872,16 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +[[package]] +name = "time-macros" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +dependencies = [ + "num-conv", + "time-core", +] + [[package]] name = "tiny-keccak" version = "2.0.2" @@ -1754,6 +1891,21 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "tokio" version = "1.36.0" @@ -1794,9 +1946,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -1819,9 +1971,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af06656561d28735e9c1cd63dfd57132c8155426aa6af24f36a00a351f88c48e" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", @@ -1840,11 +1992,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.7" +version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18769cd1cec395d70860ceb4d932812a0b4d06b1a4bb336745a4d21b9496e992" +checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -1878,19 +2030,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tonic-build" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" -dependencies = [ - "prettyplease", - "proc-macro2", - "prost-build", - "quote", - "syn", -] - [[package]] name = "tonic-build" version = "0.11.0" @@ -1985,18 +2124,67 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + [[package]] name = "unicode-segmentation" version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "ureq" +version = "2.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f214ce18d8b2cbe84ed3aa6486ed3f5b285cf8d8fbdbce9f3f767a724adc35" +dependencies = [ + "base64", + "flate2", + "log", + "once_cell", + "rustls", + "rustls-pki-types", + "rustls-webpki", + "url", + "webpki-roots", +] + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + [[package]] name = "utf8parse" version = "0.2.1" @@ -2005,9 +2193,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom", ] @@ -2039,6 +2227,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "webpki-roots" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "which" version = "4.4.2" @@ -2200,3 +2397,9 @@ checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" dependencies = [ "linked-hash-map", ] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/Cargo.toml b/Cargo.toml index 8fb006a..b140c82 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,19 +10,24 @@ members = [ "freyja_apps/e2e", "freyja_apps/ibeji_integration", "freyja_apps/in_memory", + "proto/cloud_connector", + "proto/common" ] [workspace.dependencies] # Local dependencies +cloud-connector-proto = { path = "proto/cloud_connector" } +proto-common = { path = "proto/common" } # ESDV dependencies # Versioning is managed by the Cargo.lock file rather than copying rev properties to all of these ## Freyja -cloud-connector-proto = { git = "https://github.com/eclipse-ibeji/freyja" } file-service-discovery-adapter = { git = "https://github.com/eclipse-ibeji/freyja" } freyja = { git = "https://github.com/eclipse-ibeji/freyja" } freyja-common = { git = "https://github.com/eclipse-ibeji/freyja" } +freyja-build-common = { git = "https://github.com/eclipse-ibeji/freyja" } +freyja-proto-common = { git = "https://github.com/eclipse-ibeji/freyja", package = "proto-common" } grpc-cloud-adapter = { git = "https://github.com/eclipse-ibeji/freyja" } grpc-digital-twin-adapter = { git = "https://github.com/eclipse-ibeji/freyja" } grpc-service-discovery-adapter = { git = "https://github.com/eclipse-ibeji/freyja" } @@ -42,9 +47,10 @@ futures = "0.3.30" log = "0.4.21" paho-mqtt = "0.12.1" prost = "0.12.3" +prost-types = "0.12.3" serde = "1.0.197" serde_json = "1.0.114" -time = "0.3.34" +time = { version = "0.3.34", features = ["serde-human-readable"] } tokio = "1.36.0" tonic = "0.11.0" tonic-build = "0.11.0" \ No newline at end of file diff --git a/cloud_connectors/mqtt_connector/src/mqtt_connector.rs b/cloud_connectors/mqtt_connector/src/mqtt_connector.rs index 96c45aa..31bdfc6 100644 --- a/cloud_connectors/mqtt_connector/src/mqtt_connector.rs +++ b/cloud_connectors/mqtt_connector/src/mqtt_connector.rs @@ -180,8 +180,6 @@ impl CloudConnector for MQTTConnector { #[cfg(test)] mod azure_cloud_connector_tests { - use cloud_connector_proto::v1::UpdateDigitalTwinRequestBuilder; - use super::*; #[tokio::test] @@ -191,11 +189,16 @@ mod azure_cloud_connector_tests { mqtt_event_grid_topic: String::new(), }; - let builder = UpdateDigitalTwinRequestBuilder::new().string_value(String::new()); - - let request = tonic::Request::new(builder.build()); + let request = UpdateDigitalTwinRequest { + value: Some(Value { + kind: Some(Kind::StringValue(String::new())), + }), + ..Default::default() + }; - let result = consumer_impl.update_digital_twin(request).await; + let result = consumer_impl + .update_digital_twin(tonic::Request::new(request)) + .await; assert!(result.is_err()); } diff --git a/proto/cloud_connector/Cargo.toml b/proto/cloud_connector/Cargo.toml new file mode 100644 index 0000000..99c4761 --- /dev/null +++ b/proto/cloud_connector/Cargo.toml @@ -0,0 +1,19 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. +# SPDX-License-Identifier: MIT + +[package] +name = "cloud-connector-proto" +version = "0.1.0" +edition = "2021" +license = "MIT" + +[dependencies] +prost = { workspace = true } +prost-types = { workspace = true } +tonic = { workspace = true } + +[build-dependencies] +freyja-build-common = { workspace = true } +freyja-proto-common = { workspace = true } +proto-common = { workspace = true } \ No newline at end of file diff --git a/proto/cloud_connector/build.rs b/proto/cloud_connector/build.rs new file mode 100644 index 0000000..2f82002 --- /dev/null +++ b/proto/cloud_connector/build.rs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// SPDX-License-Identifier: MIT + +use freyja_build_common::compile_remote_proto; +use freyja_proto_common::interface_url; + +fn main() -> Result<(), Box> { + compile_remote_proto(interface_url!(freyja, CLOUD_CONNECTOR_INTERFACE), &[])?; + + Ok(()) +} diff --git a/proto/cloud_connector/src/lib.rs b/proto/cloud_connector/src/lib.rs new file mode 100644 index 0000000..f65184b --- /dev/null +++ b/proto/cloud_connector/src/lib.rs @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// SPDX-License-Identifier: MIT + +// Re-export this library so consumers have access to the types used in generation +pub use prost_types; + +pub mod v1 { + tonic::include_proto!("cloud_connector"); +} diff --git a/proto/common/Cargo.toml b/proto/common/Cargo.toml new file mode 100644 index 0000000..edb99a5 --- /dev/null +++ b/proto/common/Cargo.toml @@ -0,0 +1,11 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. +# SPDX-License-Identifier: MIT + +[package] +name = "proto-common" +version = "0.1.0" +edition = "2021" +license = "MIT" + +[dependencies] \ No newline at end of file diff --git a/proto/common/src/lib.rs b/proto/common/src/lib.rs new file mode 100644 index 0000000..d7bf7fd --- /dev/null +++ b/proto/common/src/lib.rs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// SPDX-License-Identifier: MIT + +// This module contains constants related to remote protobuf files as well as helpers for referencing them. +// This also helps manage interface versions from a central location, which is particularly helpful for Ibeji since +// the interfaces are referenced in two different crates. + +pub const GITHUB_BASE_URL: &str = "https://raw.githubusercontent.com"; + +pub mod freyja { + pub const REPO_NAME: &str = "eclipse-ibeji/freyja"; + pub const VERSION: &str = "0.1.0"; + + pub mod interfaces { + pub const CLOUD_CONNECTOR_INTERFACE: &str = + "interfaces/cloud_connector/v1/cloud_connector.proto"; + pub const MAPPING_SERVICE_INTERFACE: &str = + "interfaces/mapping_service/v1/mapping_service.proto"; + } +}