Update api and bromine version

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head
trivernis 3 years ago
parent ff03b8a4ff
commit bf17174401

@ -156,6 +156,15 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]]
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "bindgen" name = "bindgen"
version = "0.54.0" version = "0.54.0"
@ -233,6 +242,24 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
[[package]]
name = "bromine"
version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "913d14c7bfcf3b8ea8a6fc9fc2217dc734a9557c54ebe2dd4a3cc8e769ffffc4"
dependencies = [
"async-trait",
"bincode",
"byteorder",
"futures 0.3.17",
"lazy_static",
"serde",
"thiserror",
"tokio",
"tracing",
"typemap_rev",
]
[[package]] [[package]]
name = "bumpalo" name = "bumpalo"
version = "3.8.0" version = "3.8.0"
@ -936,9 +963,10 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
[[package]] [[package]]
name = "mediarepo-api" name = "mediarepo-api"
version = "0.12.0" version = "0.13.0"
source = "git+https://github.com/Trivernis/mediarepo-api.git?rev=16b892eab0b3446198601a8f5829d0bd54d2efdf#16b892eab0b3446198601a8f5829d0bd54d2efdf" source = "git+https://github.com/Trivernis/mediarepo-api.git?rev=d64787c36e6cf68567db1c480860cd95b7c20e3f#d64787c36e6cf68567db1c480860cd95b7c20e3f"
dependencies = [ dependencies = [
"bromine",
"chrono", "chrono",
"serde", "serde",
"serde_piecewise_default", "serde_piecewise_default",
@ -954,9 +982,9 @@ dependencies = [
"futures 0.3.17", "futures 0.3.17",
"glob", "glob",
"itertools", "itertools",
"mediarepo-api",
"multibase", "multibase",
"multihash", "multihash",
"rmp-ipc",
"sea-orm", "sea-orm",
"serde", "serde",
"sqlx", "sqlx",
@ -1020,7 +1048,6 @@ version = "0.1.0"
dependencies = [ dependencies = [
"chrono", "chrono",
"compare", "compare",
"mediarepo-api",
"mediarepo-core", "mediarepo-core",
"mediarepo-database", "mediarepo-database",
"mediarepo-model", "mediarepo-model",
@ -1644,45 +1671,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "rmp"
version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f55e5fa1446c4d5dd1f5daeed2a4fe193071771a2636274d0d7a3b082aa7ad6"
dependencies = [
"byteorder",
"num-traits",
]
[[package]]
name = "rmp-ipc"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "573eb3e2e1008f550b7b5a53053d5ed8378fbda57731fa3739c3cfb18ad667f6"
dependencies = [
"async-trait",
"byteorder",
"futures 0.3.17",
"lazy_static",
"rmp-serde",
"serde",
"thiserror",
"tokio",
"tracing",
"typemap_rev",
]
[[package]]
name = "rmp-serde"
version = "0.15.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "723ecff9ad04f4ad92fe1c8ca6c20d2196d9286e9c60727c4cb5511629260e9d"
dependencies = [
"byteorder",
"rmp",
"serde",
]
[[package]] [[package]]
name = "rust_decimal" name = "rust_decimal"
version = "1.17.0" version = "1.17.0"

@ -71,9 +71,9 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308" checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -82,9 +82,9 @@ version = "0.1.51"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -114,6 +114,15 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]]
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "bindgen" name = "bindgen"
version = "0.54.0" version = "0.54.0"
@ -127,8 +136,8 @@ dependencies = [
"lazy_static", "lazy_static",
"lazycell", "lazycell",
"peeking_take_while", "peeking_take_while",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"regex", "regex",
"rustc-hash", "rustc-hash",
"shlex", "shlex",
@ -191,6 +200,24 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
[[package]]
name = "bromine"
version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "913d14c7bfcf3b8ea8a6fc9fc2217dc734a9557c54ebe2dd4a3cc8e769ffffc4"
dependencies = [
"async-trait",
"bincode",
"byteorder",
"futures",
"lazy_static",
"serde",
"thiserror",
"tokio",
"tracing",
"typemap_rev",
]
[[package]] [[package]]
name = "bumpalo" name = "bumpalo"
version = "3.8.0" version = "3.8.0"
@ -245,6 +272,20 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
dependencies = [
"libc",
"num-integer",
"num-traits",
"serde",
"time",
"winapi",
]
[[package]] [[package]]
name = "clang-sys" name = "clang-sys"
version = "0.29.3" version = "0.29.3"
@ -378,7 +419,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db"
dependencies = [ dependencies = [
"data-encoding", "data-encoding",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -514,9 +555,9 @@ checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"proc-macro-hack", "proc-macro-hack",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -789,6 +830,19 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
[[package]]
name = "mediarepo-api"
version = "0.13.0"
source = "git+https://github.com/Trivernis/mediarepo-api.git?rev=d64787c36e6cf68567db1c480860cd95b7c20e3f#d64787c36e6cf68567db1c480860cd95b7c20e3f"
dependencies = [
"bromine",
"chrono",
"serde",
"serde_piecewise_default",
"thiserror",
"tracing",
]
[[package]] [[package]]
name = "mediarepo-core" name = "mediarepo-core"
version = "0.1.0" version = "0.1.0"
@ -797,9 +851,9 @@ dependencies = [
"futures", "futures",
"glob", "glob",
"itertools", "itertools",
"mediarepo-api",
"multibase", "multibase",
"multihash", "multihash",
"rmp-ipc",
"sea-orm", "sea-orm",
"serde", "serde",
"sqlx", "sqlx",
@ -914,9 +968,9 @@ checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99"
dependencies = [ dependencies = [
"proc-macro-crate", "proc-macro-crate",
"proc-macro-error", "proc-macro-error",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"synstructure", "synstructure",
] ]
@ -1032,9 +1086,9 @@ checksum = "4e23813b1bcb2d41a838849a2bbae40ae5c03c85ecabf04ba97086f438484714"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"proc-macro-error", "proc-macro-error",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1127,9 +1181,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [ dependencies = [
"proc-macro-error-attr", "proc-macro-error-attr",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"version_check", "version_check",
] ]
@ -1139,8 +1193,8 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"version_check", "version_check",
] ]
@ -1156,13 +1210,31 @@ version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
[[package]]
name = "proc-macro2"
version = "0.4.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
dependencies = [
"unicode-xid 0.1.0",
]
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.32" version = "1.0.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43"
dependencies = [ dependencies = [
"unicode-xid", "unicode-xid 0.2.2",
]
[[package]]
name = "quote"
version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
dependencies = [
"proc-macro2 0.4.30",
] ]
[[package]] [[package]]
@ -1171,7 +1243,7 @@ version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
] ]
[[package]] [[package]]
@ -1272,45 +1344,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "rmp"
version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f55e5fa1446c4d5dd1f5daeed2a4fe193071771a2636274d0d7a3b082aa7ad6"
dependencies = [
"byteorder",
"num-traits",
]
[[package]]
name = "rmp-ipc"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "573eb3e2e1008f550b7b5a53053d5ed8378fbda57731fa3739c3cfb18ad667f6"
dependencies = [
"async-trait",
"byteorder",
"futures",
"lazy_static",
"rmp-serde",
"serde",
"thiserror",
"tokio",
"tracing",
"typemap_rev",
]
[[package]]
name = "rmp-serde"
version = "0.15.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "723ecff9ad04f4ad92fe1c8ca6c20d2196d9286e9c60727c4cb5511629260e9d"
dependencies = [
"byteorder",
"rmp",
"serde",
]
[[package]] [[package]]
name = "rustc-hash" name = "rustc-hash"
version = "1.1.0" version = "1.1.0"
@ -1362,9 +1395,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34cdc022b4f606353fe5dc85b09713a04e433323b70163e81513b141c6ae6eb5" checksum = "34cdc022b4f606353fe5dc85b09713a04e433323b70163e81513b141c6ae6eb5"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"thiserror", "thiserror",
] ]
@ -1384,9 +1417,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51c247af6c2c4ffd372fe97e9afa579b4438e4c306c9aa3f11cbf72f1e845180" checksum = "51c247af6c2c4ffd372fe97e9afa579b4438e4c306c9aa3f11cbf72f1e845180"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1404,9 +1437,31 @@ version = "1.0.130"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
]
[[package]]
name = "serde_piecewise_default"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d91a44b0f51aedd237f8f25c831e1f629982a187a5045c08ce4bccccce17b4b0"
dependencies = [
"serde",
"serde_piecewise_default_derive",
]
[[package]]
name = "serde_piecewise_default_derive"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19446953e7b22342c23c79ede938c04b1c12f4eb7513db30cda94193ce30ff2a"
dependencies = [
"proc-macro2 0.4.30",
"quote 0.6.13",
"serde",
"syn 0.15.44",
] ]
[[package]] [[package]]
@ -1523,12 +1578,12 @@ dependencies = [
"either", "either",
"heck", "heck",
"once_cell", "once_cell",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"sha2", "sha2",
"sqlx-core", "sqlx-core",
"sqlx-rt", "sqlx-rt",
"syn", "syn 1.0.81",
"url", "url",
] ]
@ -1554,15 +1609,26 @@ dependencies = [
"unicode-normalization", "unicode-normalization",
] ]
[[package]]
name = "syn"
version = "0.15.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
dependencies = [
"proc-macro2 0.4.30",
"quote 0.6.13",
"unicode-xid 0.1.0",
]
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.81" version = "1.0.81"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"unicode-xid", "unicode-xid 0.2.2",
] ]
[[package]] [[package]]
@ -1571,10 +1637,10 @@ version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"unicode-xid", "unicode-xid 0.2.2",
] ]
[[package]] [[package]]
@ -1606,9 +1672,9 @@ version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1636,6 +1702,16 @@ dependencies = [
"weezl", "weezl",
] ]
[[package]]
name = "time"
version = "0.1.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
dependencies = [
"libc",
"winapi",
]
[[package]] [[package]]
name = "tinyvec" name = "tinyvec"
version = "1.5.1" version = "1.5.1"
@ -1693,9 +1769,9 @@ version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1740,6 +1816,12 @@ version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b"
[[package]]
name = "unicode-xid"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
[[package]] [[package]]
name = "unicode-xid" name = "unicode-xid"
version = "0.2.2" version = "0.2.2"
@ -1807,9 +1889,9 @@ dependencies = [
"bumpalo", "bumpalo",
"lazy_static", "lazy_static",
"log", "log",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -1819,7 +1901,7 @@ version = "0.2.78"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9"
dependencies = [ dependencies = [
"quote", "quote 1.0.10",
"wasm-bindgen-macro-support", "wasm-bindgen-macro-support",
] ]
@ -1829,9 +1911,9 @@ version = "0.2.78"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]

@ -12,7 +12,6 @@ multibase = "0.9.1"
base64 = "0.13.0" base64 = "0.13.0"
toml = "0.5.8" toml = "0.5.8"
serde = "1.0.130" serde = "1.0.130"
rmp-ipc = "0.11.0"
typemap_rev = "0.1.5" typemap_rev = "0.1.5"
futures = "0.3.17" futures = "0.3.17"
itertools = "0.10.1" itertools = "0.10.1"
@ -35,6 +34,10 @@ features = ["migrate"]
version = "1.12.0" version = "1.12.0"
features = ["fs", "io-util", "io-std"] features = ["fs", "io-util", "io-std"]
[dependencies.mediarepo-api]
git = "https://github.com/Trivernis/mediarepo-api.git"
rev = "d64787c36e6cf68567db1c480860cd95b7c20e3f"
features = ["bromine"]
[features] [features]
default = [] default = []

@ -1,4 +1,3 @@
use rmp_ipc::error::Error;
use sea_orm::DbErr; use sea_orm::DbErr;
use std::fmt::{Display, Formatter}; use std::fmt::{Display, Formatter};
use thiserror::Error; use thiserror::Error;
@ -24,7 +23,7 @@ pub enum RepoError {
TomlSer(#[from] toml::ser::Error), TomlSer(#[from] toml::ser::Error),
#[error(transparent)] #[error(transparent)]
IPC(#[from] rmp_ipc::error::Error), IPC(#[from] mediarepo_api::bromine::error::Error),
#[error(transparent)] #[error(transparent)]
Raw(StringError), Raw(StringError),
@ -77,8 +76,8 @@ impl From<&str> for RepoError {
} }
} }
impl From<RepoError> for rmp_ipc::error::Error { impl From<RepoError> for mediarepo_api::bromine::error::Error {
fn from(e: RepoError) -> Error { fn from(e: RepoError) -> mediarepo_api::bromine::error::Error {
rmp_ipc::error::Error::Message(format!("{:?}", e)) mediarepo_api::bromine::error::Error::Message(format!("{:?}", e))
} }
} }

@ -1,6 +1,7 @@
pub use futures; pub use futures;
pub use itertools; pub use itertools;
pub use rmp_ipc; pub use mediarepo_api;
pub use mediarepo_api::bromine;
pub use thumbnailer; pub use thumbnailer;
pub mod context; pub mod context;

@ -71,9 +71,9 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308" checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -82,9 +82,9 @@ version = "0.1.51"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -110,9 +110,9 @@ checksum = "ec107f431ee3d8a8e45e6dd117adab769556ef463959e77bf6a4888d5fd500cf"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro-error 0.4.12", "proc-macro-error 0.4.12",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -127,6 +127,15 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]]
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "bitflags" name = "bitflags"
version = "1.3.2" version = "1.3.2"
@ -184,6 +193,24 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
[[package]]
name = "bromine"
version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "913d14c7bfcf3b8ea8a6fc9fc2217dc734a9557c54ebe2dd4a3cc8e769ffffc4"
dependencies = [
"async-trait",
"bincode",
"byteorder",
"futures",
"lazy_static",
"serde",
"thiserror",
"tokio",
"tracing",
"typemap_rev",
]
[[package]] [[package]]
name = "bumpalo" name = "bumpalo"
version = "3.8.0" version = "3.8.0"
@ -232,6 +259,7 @@ dependencies = [
"libc", "libc",
"num-integer", "num-integer",
"num-traits", "num-traits",
"serde",
"time", "time",
"winapi", "winapi",
] ]
@ -374,7 +402,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db"
dependencies = [ dependencies = [
"data-encoding", "data-encoding",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -500,9 +528,9 @@ checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"proc-macro-hack", "proc-macro-hack",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -770,6 +798,19 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
[[package]]
name = "mediarepo-api"
version = "0.13.0"
source = "git+https://github.com/Trivernis/mediarepo-api.git?rev=d64787c36e6cf68567db1c480860cd95b7c20e3f#d64787c36e6cf68567db1c480860cd95b7c20e3f"
dependencies = [
"bromine",
"chrono",
"serde",
"serde_piecewise_default",
"thiserror",
"tracing",
]
[[package]] [[package]]
name = "mediarepo-core" name = "mediarepo-core"
version = "0.1.0" version = "0.1.0"
@ -778,9 +819,9 @@ dependencies = [
"futures", "futures",
"glob", "glob",
"itertools", "itertools",
"mediarepo-api",
"multibase", "multibase",
"multihash", "multihash",
"rmp-ipc",
"sea-orm", "sea-orm",
"serde", "serde",
"sqlx", "sqlx",
@ -906,9 +947,9 @@ checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99"
dependencies = [ dependencies = [
"proc-macro-crate", "proc-macro-crate",
"proc-macro-error 1.0.4", "proc-macro-error 1.0.4",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"synstructure", "synstructure",
] ]
@ -1076,9 +1117,9 @@ checksum = "4e23813b1bcb2d41a838849a2bbae40ae5c03c85ecabf04ba97086f438484714"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"proc-macro-error 1.0.4", "proc-macro-error 1.0.4",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1165,9 +1206,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7" checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7"
dependencies = [ dependencies = [
"proc-macro-error-attr 0.4.12", "proc-macro-error-attr 0.4.12",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"version_check", "version_check",
] ]
@ -1178,9 +1219,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [ dependencies = [
"proc-macro-error-attr 1.0.4", "proc-macro-error-attr 1.0.4",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"version_check", "version_check",
] ]
@ -1190,9 +1231,9 @@ version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a5b4b77fdb63c1eca72173d68d24501c54ab1269409f6b672c85deb18af69de" checksum = "8a5b4b77fdb63c1eca72173d68d24501c54ab1269409f6b672c85deb18af69de"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"syn-mid", "syn-mid",
"version_check", "version_check",
] ]
@ -1203,8 +1244,8 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"version_check", "version_check",
] ]
@ -1220,13 +1261,31 @@ version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
[[package]]
name = "proc-macro2"
version = "0.4.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
dependencies = [
"unicode-xid 0.1.0",
]
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.32" version = "1.0.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43"
dependencies = [ dependencies = [
"unicode-xid", "unicode-xid 0.2.2",
]
[[package]]
name = "quote"
version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
dependencies = [
"proc-macro2 0.4.30",
] ]
[[package]] [[package]]
@ -1235,7 +1294,7 @@ version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
] ]
[[package]] [[package]]
@ -1321,45 +1380,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "rmp"
version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f55e5fa1446c4d5dd1f5daeed2a4fe193071771a2636274d0d7a3b082aa7ad6"
dependencies = [
"byteorder",
"num-traits",
]
[[package]]
name = "rmp-ipc"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "573eb3e2e1008f550b7b5a53053d5ed8378fbda57731fa3739c3cfb18ad667f6"
dependencies = [
"async-trait",
"byteorder",
"futures",
"lazy_static",
"rmp-serde",
"serde",
"thiserror",
"tokio",
"tracing",
"typemap_rev",
]
[[package]]
name = "rmp-serde"
version = "0.15.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "723ecff9ad04f4ad92fe1c8ca6c20d2196d9286e9c60727c4cb5511629260e9d"
dependencies = [
"byteorder",
"rmp",
"serde",
]
[[package]] [[package]]
name = "rust_decimal" name = "rust_decimal"
version = "1.17.0" version = "1.17.0"
@ -1430,9 +1450,9 @@ checksum = "f8d4da296bdf6ab25a89e09af3a0d80e94e18580575fae3f7fbe7314604e8c8c"
dependencies = [ dependencies = [
"bae", "bae",
"heck", "heck",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1455,9 +1475,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34cdc022b4f606353fe5dc85b09713a04e433323b70163e81513b141c6ae6eb5" checksum = "34cdc022b4f606353fe5dc85b09713a04e433323b70163e81513b141c6ae6eb5"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"thiserror", "thiserror",
] ]
@ -1477,9 +1497,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51c247af6c2c4ffd372fe97e9afa579b4438e4c306c9aa3f11cbf72f1e845180" checksum = "51c247af6c2c4ffd372fe97e9afa579b4438e4c306c9aa3f11cbf72f1e845180"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1520,9 +1540,9 @@ version = "1.0.130"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1537,6 +1557,28 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "serde_piecewise_default"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d91a44b0f51aedd237f8f25c831e1f629982a187a5045c08ce4bccccce17b4b0"
dependencies = [
"serde",
"serde_piecewise_default_derive",
]
[[package]]
name = "serde_piecewise_default_derive"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19446953e7b22342c23c79ede938c04b1c12f4eb7513db30cda94193ce30ff2a"
dependencies = [
"proc-macro2 0.4.30",
"quote 0.6.13",
"serde",
"syn 0.15.44",
]
[[package]] [[package]]
name = "sha2" name = "sha2"
version = "0.9.8" version = "0.9.8"
@ -1653,13 +1695,13 @@ dependencies = [
"either", "either",
"heck", "heck",
"once_cell", "once_cell",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"serde_json", "serde_json",
"sha2", "sha2",
"sqlx-core", "sqlx-core",
"sqlx-rt", "sqlx-rt",
"syn", "syn 1.0.81",
"url", "url",
] ]
@ -1691,15 +1733,26 @@ dependencies = [
"unicode-normalization", "unicode-normalization",
] ]
[[package]]
name = "syn"
version = "0.15.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
dependencies = [
"proc-macro2 0.4.30",
"quote 0.6.13",
"unicode-xid 0.1.0",
]
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.81" version = "1.0.81"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"unicode-xid", "unicode-xid 0.2.2",
] ]
[[package]] [[package]]
@ -1708,9 +1761,9 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baa8e7560a164edb1621a55d18a0c59abf49d360f47aa7b821061dd7eea7fac9" checksum = "baa8e7560a164edb1621a55d18a0c59abf49d360f47aa7b821061dd7eea7fac9"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1719,10 +1772,10 @@ version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"unicode-xid", "unicode-xid 0.2.2",
] ]
[[package]] [[package]]
@ -1754,9 +1807,9 @@ version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1873,9 +1926,9 @@ version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1920,6 +1973,12 @@ version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b"
[[package]]
name = "unicode-xid"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
[[package]] [[package]]
name = "unicode-xid" name = "unicode-xid"
version = "0.2.2" version = "0.2.2"
@ -1997,9 +2056,9 @@ dependencies = [
"bumpalo", "bumpalo",
"lazy_static", "lazy_static",
"log", "log",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -2009,7 +2068,7 @@ version = "0.2.78"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9"
dependencies = [ dependencies = [
"quote", "quote 1.0.10",
"wasm-bindgen-macro-support", "wasm-bindgen-macro-support",
] ]
@ -2019,9 +2078,9 @@ version = "0.2.78"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]

@ -71,9 +71,9 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308" checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -82,9 +82,9 @@ version = "0.1.51"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -110,9 +110,9 @@ checksum = "ec107f431ee3d8a8e45e6dd117adab769556ef463959e77bf6a4888d5fd500cf"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro-error 0.4.12", "proc-macro-error 0.4.12",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -127,6 +127,15 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]]
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "bindgen" name = "bindgen"
version = "0.54.0" version = "0.54.0"
@ -140,8 +149,8 @@ dependencies = [
"lazy_static", "lazy_static",
"lazycell", "lazycell",
"peeking_take_while", "peeking_take_while",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"regex", "regex",
"rustc-hash", "rustc-hash",
"shlex", "shlex",
@ -204,6 +213,24 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
[[package]]
name = "bromine"
version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "913d14c7bfcf3b8ea8a6fc9fc2217dc734a9557c54ebe2dd4a3cc8e769ffffc4"
dependencies = [
"async-trait",
"bincode",
"byteorder",
"futures",
"lazy_static",
"serde",
"thiserror",
"tokio",
"tracing",
"typemap_rev",
]
[[package]] [[package]]
name = "bumpalo" name = "bumpalo"
version = "3.8.0" version = "3.8.0"
@ -267,6 +294,7 @@ dependencies = [
"libc", "libc",
"num-integer", "num-integer",
"num-traits", "num-traits",
"serde",
"time", "time",
"winapi", "winapi",
] ]
@ -420,7 +448,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db"
dependencies = [ dependencies = [
"data-encoding", "data-encoding",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -571,9 +599,9 @@ checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"proc-macro-hack", "proc-macro-hack",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -857,6 +885,19 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
[[package]]
name = "mediarepo-api"
version = "0.13.0"
source = "git+https://github.com/Trivernis/mediarepo-api.git?rev=d64787c36e6cf68567db1c480860cd95b7c20e3f#d64787c36e6cf68567db1c480860cd95b7c20e3f"
dependencies = [
"bromine",
"chrono",
"serde",
"serde_piecewise_default",
"thiserror",
"tracing",
]
[[package]] [[package]]
name = "mediarepo-core" name = "mediarepo-core"
version = "0.1.0" version = "0.1.0"
@ -865,9 +906,9 @@ dependencies = [
"futures", "futures",
"glob", "glob",
"itertools", "itertools",
"mediarepo-api",
"multibase", "multibase",
"multihash", "multihash",
"rmp-ipc",
"sea-orm", "sea-orm",
"serde", "serde",
"sqlx", "sqlx",
@ -1020,9 +1061,9 @@ checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99"
dependencies = [ dependencies = [
"proc-macro-crate", "proc-macro-crate",
"proc-macro-error 1.0.4", "proc-macro-error 1.0.4",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"synstructure", "synstructure",
] ]
@ -1200,9 +1241,9 @@ checksum = "4e23813b1bcb2d41a838849a2bbae40ae5c03c85ecabf04ba97086f438484714"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"proc-macro-error 1.0.4", "proc-macro-error 1.0.4",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1295,9 +1336,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7" checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7"
dependencies = [ dependencies = [
"proc-macro-error-attr 0.4.12", "proc-macro-error-attr 0.4.12",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"version_check", "version_check",
] ]
@ -1308,9 +1349,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [ dependencies = [
"proc-macro-error-attr 1.0.4", "proc-macro-error-attr 1.0.4",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"version_check", "version_check",
] ]
@ -1320,9 +1361,9 @@ version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a5b4b77fdb63c1eca72173d68d24501c54ab1269409f6b672c85deb18af69de" checksum = "8a5b4b77fdb63c1eca72173d68d24501c54ab1269409f6b672c85deb18af69de"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"syn-mid", "syn-mid",
"version_check", "version_check",
] ]
@ -1333,8 +1374,8 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"version_check", "version_check",
] ]
@ -1350,13 +1391,31 @@ version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
[[package]]
name = "proc-macro2"
version = "0.4.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
dependencies = [
"unicode-xid 0.1.0",
]
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.32" version = "1.0.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43"
dependencies = [ dependencies = [
"unicode-xid", "unicode-xid 0.2.2",
]
[[package]]
name = "quote"
version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
dependencies = [
"proc-macro2 0.4.30",
] ]
[[package]] [[package]]
@ -1365,7 +1424,7 @@ version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
] ]
[[package]] [[package]]
@ -1466,45 +1525,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "rmp"
version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f55e5fa1446c4d5dd1f5daeed2a4fe193071771a2636274d0d7a3b082aa7ad6"
dependencies = [
"byteorder",
"num-traits",
]
[[package]]
name = "rmp-ipc"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "573eb3e2e1008f550b7b5a53053d5ed8378fbda57731fa3739c3cfb18ad667f6"
dependencies = [
"async-trait",
"byteorder",
"futures",
"lazy_static",
"rmp-serde",
"serde",
"thiserror",
"tokio",
"tracing",
"typemap_rev",
]
[[package]]
name = "rmp-serde"
version = "0.15.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "723ecff9ad04f4ad92fe1c8ca6c20d2196d9286e9c60727c4cb5511629260e9d"
dependencies = [
"byteorder",
"rmp",
"serde",
]
[[package]] [[package]]
name = "rust_decimal" name = "rust_decimal"
version = "1.17.0" version = "1.17.0"
@ -1581,9 +1601,9 @@ checksum = "f8d4da296bdf6ab25a89e09af3a0d80e94e18580575fae3f7fbe7314604e8c8c"
dependencies = [ dependencies = [
"bae", "bae",
"heck", "heck",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1606,9 +1626,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34cdc022b4f606353fe5dc85b09713a04e433323b70163e81513b141c6ae6eb5" checksum = "34cdc022b4f606353fe5dc85b09713a04e433323b70163e81513b141c6ae6eb5"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"thiserror", "thiserror",
] ]
@ -1628,9 +1648,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51c247af6c2c4ffd372fe97e9afa579b4438e4c306c9aa3f11cbf72f1e845180" checksum = "51c247af6c2c4ffd372fe97e9afa579b4438e4c306c9aa3f11cbf72f1e845180"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1671,9 +1691,9 @@ version = "1.0.130"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1688,6 +1708,28 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "serde_piecewise_default"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d91a44b0f51aedd237f8f25c831e1f629982a187a5045c08ce4bccccce17b4b0"
dependencies = [
"serde",
"serde_piecewise_default_derive",
]
[[package]]
name = "serde_piecewise_default_derive"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19446953e7b22342c23c79ede938c04b1c12f4eb7513db30cda94193ce30ff2a"
dependencies = [
"proc-macro2 0.4.30",
"quote 0.6.13",
"serde",
"syn 0.15.44",
]
[[package]] [[package]]
name = "sha2" name = "sha2"
version = "0.9.8" version = "0.9.8"
@ -1810,13 +1852,13 @@ dependencies = [
"either", "either",
"heck", "heck",
"once_cell", "once_cell",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"serde_json", "serde_json",
"sha2", "sha2",
"sqlx-core", "sqlx-core",
"sqlx-rt", "sqlx-rt",
"syn", "syn 1.0.81",
"url", "url",
] ]
@ -1848,15 +1890,26 @@ dependencies = [
"unicode-normalization", "unicode-normalization",
] ]
[[package]]
name = "syn"
version = "0.15.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
dependencies = [
"proc-macro2 0.4.30",
"quote 0.6.13",
"unicode-xid 0.1.0",
]
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.81" version = "1.0.81"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"unicode-xid", "unicode-xid 0.2.2",
] ]
[[package]] [[package]]
@ -1865,9 +1918,9 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baa8e7560a164edb1621a55d18a0c59abf49d360f47aa7b821061dd7eea7fac9" checksum = "baa8e7560a164edb1621a55d18a0c59abf49d360f47aa7b821061dd7eea7fac9"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -1876,10 +1929,10 @@ version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"unicode-xid", "unicode-xid 0.2.2",
] ]
[[package]] [[package]]
@ -1911,9 +1964,9 @@ version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -2031,9 +2084,9 @@ version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
] ]
[[package]] [[package]]
@ -2087,6 +2140,12 @@ version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b"
[[package]]
name = "unicode-xid"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
[[package]] [[package]]
name = "unicode-xid" name = "unicode-xid"
version = "0.2.2" version = "0.2.2"
@ -2164,9 +2223,9 @@ dependencies = [
"bumpalo", "bumpalo",
"lazy_static", "lazy_static",
"log", "log",
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -2176,7 +2235,7 @@ version = "0.2.78"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9"
dependencies = [ dependencies = [
"quote", "quote 1.0.10",
"wasm-bindgen-macro-support", "wasm-bindgen-macro-support",
] ]
@ -2186,9 +2245,9 @@ version = "0.2.78"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2 1.0.32",
"quote", "quote 1.0.10",
"syn", "syn 1.0.81",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]

@ -127,6 +127,15 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]]
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "bitflags" name = "bitflags"
version = "1.3.2" version = "1.3.2"
@ -184,6 +193,24 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
[[package]]
name = "bromine"
version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "913d14c7bfcf3b8ea8a6fc9fc2217dc734a9557c54ebe2dd4a3cc8e769ffffc4"
dependencies = [
"async-trait",
"bincode",
"byteorder",
"futures 0.3.17",
"lazy_static",
"serde",
"thiserror",
"tokio",
"tracing",
"typemap_rev",
]
[[package]] [[package]]
name = "bumpalo" name = "bumpalo"
version = "3.8.0" version = "3.8.0"
@ -802,9 +829,10 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
[[package]] [[package]]
name = "mediarepo-api" name = "mediarepo-api"
version = "0.12.0" version = "0.13.0"
source = "git+https://github.com/Trivernis/mediarepo-api.git?rev=16b892eab0b3446198601a8f5829d0bd54d2efdf#16b892eab0b3446198601a8f5829d0bd54d2efdf" source = "git+https://github.com/Trivernis/mediarepo-api.git?rev=d64787c36e6cf68567db1c480860cd95b7c20e3f#d64787c36e6cf68567db1c480860cd95b7c20e3f"
dependencies = [ dependencies = [
"bromine",
"chrono", "chrono",
"serde", "serde",
"serde_piecewise_default", "serde_piecewise_default",
@ -820,9 +848,9 @@ dependencies = [
"futures 0.3.17", "futures 0.3.17",
"glob", "glob",
"itertools", "itertools",
"mediarepo-api",
"multibase", "multibase",
"multihash", "multihash",
"rmp-ipc",
"sea-orm", "sea-orm",
"serde", "serde",
"sqlx", "sqlx",
@ -867,7 +895,6 @@ version = "0.1.0"
dependencies = [ dependencies = [
"chrono", "chrono",
"compare", "compare",
"mediarepo-api",
"mediarepo-core", "mediarepo-core",
"mediarepo-database", "mediarepo-database",
"mediarepo-model", "mediarepo-model",
@ -1451,45 +1478,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "rmp"
version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f55e5fa1446c4d5dd1f5daeed2a4fe193071771a2636274d0d7a3b082aa7ad6"
dependencies = [
"byteorder",
"num-traits",
]
[[package]]
name = "rmp-ipc"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "573eb3e2e1008f550b7b5a53053d5ed8378fbda57731fa3739c3cfb18ad667f6"
dependencies = [
"async-trait",
"byteorder",
"futures 0.3.17",
"lazy_static",
"rmp-serde",
"serde",
"thiserror",
"tokio",
"tracing",
"typemap_rev",
]
[[package]]
name = "rmp-serde"
version = "0.15.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "723ecff9ad04f4ad92fe1c8ca6c20d2196d9286e9c60727c4cb5511629260e9d"
dependencies = [
"byteorder",
"rmp",
"serde",
]
[[package]] [[package]]
name = "rust_decimal" name = "rust_decimal"
version = "1.17.0" version = "1.17.0"

@ -30,8 +30,4 @@ features = ["serde"]
[dependencies.tracing-futures] [dependencies.tracing-futures]
version = "0.2.5" version = "0.2.5"
features = ["tokio-executor"] features = ["tokio-executor"]
[dependencies.mediarepo-api]
git = "https://github.com/Trivernis/mediarepo-api.git"
rev = "16b892eab0b3446198601a8f5829d0bd54d2efdf"

@ -1,5 +1,7 @@
use mediarepo_api::types::files::{FileMetadataResponse, ThumbnailMetadataResponse}; use mediarepo_core::mediarepo_api::types::files::{
use mediarepo_api::types::tags::TagResponse; FileMetadataResponse, ThumbnailMetadataResponse,
};
use mediarepo_core::mediarepo_api::types::tags::TagResponse;
use mediarepo_model::file::File; use mediarepo_model::file::File;
use mediarepo_model::tag::Tag; use mediarepo_model::tag::Tag;
use mediarepo_model::thumbnail::Thumbnail; use mediarepo_model::thumbnail::Thumbnail;

@ -1,6 +1,6 @@
use mediarepo_api::types::misc::InfoResponse; use mediarepo_core::bromine::prelude::*;
use mediarepo_core::error::{RepoError, RepoResult}; use mediarepo_core::error::{RepoError, RepoResult};
use mediarepo_core::rmp_ipc::prelude::*; use mediarepo_core::mediarepo_api::types::misc::InfoResponse;
use mediarepo_core::settings::Settings; use mediarepo_core::settings::Settings;
use mediarepo_core::type_keys::SettingsKey; use mediarepo_core::type_keys::SettingsKey;
use mediarepo_model::repo::Repo; use mediarepo_model::repo::Repo;
@ -68,14 +68,12 @@ fn get_builder<L: AsyncStreamProtocolListener>(address: L::AddressType) -> IPCBu
} }
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn info<S: AsyncProtocolStream>(ctx: &Context<S>, event: Event) -> IPCResult<()> { async fn info(ctx: &Context, _: Event) -> IPCResult<()> {
let response = InfoResponse::new( let response = InfoResponse::new(
env!("CARGO_PKG_NAME").to_string(), env!("CARGO_PKG_NAME").to_string(),
env!("CARGO_PKG_VERSION").to_string(), env!("CARGO_PKG_VERSION").to_string(),
); );
ctx.emitter ctx.emit("info", response).await?;
.emit_response(event.id(), "info", response)
.await?;
Ok(()) Ok(())
} }

@ -2,15 +2,15 @@ use crate::from_model::FromModel;
use crate::utils::{file_by_identifier, get_repo_from_context, hash_by_identifier}; use crate::utils::{file_by_identifier, get_repo_from_context, hash_by_identifier};
use chrono::NaiveDateTime; use chrono::NaiveDateTime;
use compare::Compare; use compare::Compare;
use mediarepo_api::types::files::{ use mediarepo_core::bromine::prelude::*;
use mediarepo_core::fs::thumbnail_store::Dimensions;
use mediarepo_core::itertools::Itertools;
use mediarepo_core::mediarepo_api::types::files::{
AddFileRequestHeader, FileMetadataResponse, FilterExpression, FindFilesRequest, AddFileRequestHeader, FileMetadataResponse, FilterExpression, FindFilesRequest,
GetFileThumbnailOfSizeRequest, GetFileThumbnailsRequest, ReadFileRequest, SortDirection, GetFileThumbnailOfSizeRequest, GetFileThumbnailsRequest, ReadFileRequest, SortDirection,
SortKey, ThumbnailMetadataResponse, UpdateFileNameRequest, SortKey, ThumbnailMetadataResponse, UpdateFileNameRequest,
}; };
use mediarepo_api::types::identifier::FileIdentifier; use mediarepo_core::mediarepo_api::types::identifier::FileIdentifier;
use mediarepo_core::fs::thumbnail_store::Dimensions;
use mediarepo_core::itertools::Itertools;
use mediarepo_core::rmp_ipc::prelude::*;
use mediarepo_core::thumbnailer::ThumbnailSize; use mediarepo_core::thumbnailer::ThumbnailSize;
use mediarepo_core::utils::parse_namespace_and_tag; use mediarepo_core::utils::parse_namespace_and_tag;
use mediarepo_database::queries::tags::{ use mediarepo_database::queries::tags::{
@ -37,7 +37,7 @@ impl NamespaceProvider for FilesNamespace {
"files" "files"
} }
fn register<S: AsyncProtocolStream>(handler: &mut EventHandler<S>) { fn register(handler: &mut EventHandler) {
events!(handler, events!(handler,
"all_files" => Self::all_files, "all_files" => Self::all_files,
"get_file" => Self::get_file, "get_file" => Self::get_file,
@ -55,7 +55,7 @@ impl NamespaceProvider for FilesNamespace {
impl FilesNamespace { impl FilesNamespace {
/// Returns a list of all files /// Returns a list of all files
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn all_files<S: AsyncProtocolStream>(ctx: &Context<S>, event: Event) -> IPCResult<()> { async fn all_files(ctx: &Context, _event: Event) -> IPCResult<()> {
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
let files = repo.files().await?; let files = repo.files().await?;
@ -64,31 +64,27 @@ impl FilesNamespace {
.map(FileMetadataResponse::from_model) .map(FileMetadataResponse::from_model)
.collect(); .collect();
ctx.emitter ctx.emit_to(Self::name(), "all_files", responses).await?;
.emit_response_to(event.id(), Self::name(), "all_files", responses)
.await?;
Ok(()) Ok(())
} }
/// Returns a file by id /// Returns a file by id
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn get_file<S: AsyncProtocolStream>(ctx: &Context<S>, event: Event) -> IPCResult<()> { async fn get_file(ctx: &Context, event: Event) -> IPCResult<()> {
let id = event.data::<FileIdentifier>()?; let id = event.payload::<FileIdentifier>()?;
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
let file = file_by_identifier(id, &repo).await?; let file = file_by_identifier(id, &repo).await?;
let response = FileMetadataResponse::from_model(file); let response = FileMetadataResponse::from_model(file);
ctx.emitter ctx.emit_to(Self::name(), "get_file", response).await?;
.emit_response_to(event.id(), Self::name(), "get_file", response)
.await?;
Ok(()) Ok(())
} }
/// Searches for files by tags /// Searches for files by tags
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn find_files<S: AsyncProtocolStream>(ctx: &Context<S>, event: Event) -> IPCResult<()> { async fn find_files(ctx: &Context, event: Event) -> IPCResult<()> {
let req = event.data::<FindFilesRequest>()?; let req = event.payload::<FindFilesRequest>()?;
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
let tags = req let tags = req
@ -143,17 +139,15 @@ impl FilesNamespace {
.into_iter() .into_iter()
.map(FileMetadataResponse::from_model) .map(FileMetadataResponse::from_model)
.collect(); .collect();
ctx.emitter ctx.emit_to(Self::name(), "find_files", responses).await?;
.emit_response_to(event.id(), Self::name(), "find_files", responses)
.await?;
Ok(()) Ok(())
} }
/// Adds a file to the repository /// Adds a file to the repository
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn add_file<S: AsyncProtocolStream>(ctx: &Context<S>, event: Event) -> IPCResult<()> { async fn add_file(ctx: &Context, event: Event) -> IPCResult<()> {
let (request, bytes) = event let (request, bytes) = event
.data::<TandemPayload<AddFileRequestHeader, BytePayload>>()? .payload::<TandemPayload<AddFileRequestHeader, BytePayload>>()?
.into_inner(); .into_inner();
let AddFileRequestHeader { metadata, tags } = request; let AddFileRequestHeader { metadata, tags } = request;
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
@ -174,22 +168,20 @@ impl FilesNamespace {
let tag_ids: Vec<i64> = tags.into_iter().map(|t| t.id()).unique().collect(); let tag_ids: Vec<i64> = tags.into_iter().map(|t| t.id()).unique().collect();
file.add_tags(tag_ids).await?; file.add_tags(tag_ids).await?;
ctx.emitter ctx.emit_to(
.emit_response_to( Self::name(),
event.id(), "add_file",
Self::name(), FileMetadataResponse::from_model(file),
"add_file", )
FileMetadataResponse::from_model(file), .await?;
)
.await?;
Ok(()) Ok(())
} }
/// Reads the binary contents of a file /// Reads the binary contents of a file
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn read_file<S: AsyncProtocolStream>(ctx: &Context<S>, event: Event) -> IPCResult<()> { async fn read_file(ctx: &Context, event: Event) -> IPCResult<()> {
let request = event.data::<ReadFileRequest>()?; let request = event.payload::<ReadFileRequest>()?;
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
let file = file_by_identifier(request.id, &repo).await?; let file = file_by_identifier(request.id, &repo).await?;
@ -197,8 +189,7 @@ impl FilesNamespace {
let mut buf = Vec::new(); let mut buf = Vec::new();
reader.read_to_end(&mut buf).await?; reader.read_to_end(&mut buf).await?;
ctx.emitter ctx.emit_to(Self::name(), "read_file", BytePayload::new(buf))
.emit_response_to(event.id(), Self::name(), "read_file", BytePayload::new(buf))
.await?; .await?;
Ok(()) Ok(())
@ -206,8 +197,8 @@ impl FilesNamespace {
/// Returns a list of available thumbnails of a file /// Returns a list of available thumbnails of a file
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn thumbnails<S: AsyncProtocolStream>(ctx: &Context<S>, event: Event) -> IPCResult<()> { async fn thumbnails(ctx: &Context, event: Event) -> IPCResult<()> {
let request = event.data::<GetFileThumbnailsRequest>()?; let request = event.payload::<GetFileThumbnailsRequest>()?;
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
let file_hash = hash_by_identifier(request.id.clone(), &repo).await?; let file_hash = hash_by_identifier(request.id.clone(), &repo).await?;
let mut thumbnails = repo.get_file_thumbnails(file_hash).await?; let mut thumbnails = repo.get_file_thumbnails(file_hash).await?;
@ -223,8 +214,7 @@ impl FilesNamespace {
.into_iter() .into_iter()
.map(ThumbnailMetadataResponse::from_model) .map(ThumbnailMetadataResponse::from_model)
.collect(); .collect();
ctx.emitter ctx.emit_to(Self::name(), "get_thumbnails", thumb_responses)
.emit_response_to(event.id(), Self::name(), "get_thumbnails", thumb_responses)
.await?; .await?;
Ok(()) Ok(())
@ -232,11 +222,8 @@ impl FilesNamespace {
/// Returns a thumbnail that is within the range of the requested sizes /// Returns a thumbnail that is within the range of the requested sizes
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn get_thumbnail_of_size<S: AsyncProtocolStream>( async fn get_thumbnail_of_size(ctx: &Context, event: Event) -> IPCResult<()> {
ctx: &Context<S>, let request = event.payload::<GetFileThumbnailOfSizeRequest>()?;
event: Event,
) -> IPCResult<()> {
let request = event.data::<GetFileThumbnailOfSizeRequest>()?;
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
let file_hash = hash_by_identifier(request.id.clone(), &repo).await?; let file_hash = hash_by_identifier(request.id.clone(), &repo).await?;
let thumbnails = repo.get_file_thumbnails(file_hash).await?; let thumbnails = repo.get_file_thumbnails(file_hash).await?;
@ -267,48 +254,38 @@ impl FilesNamespace {
thumbnail.get_reader().await?.read_to_end(&mut buf).await?; thumbnail.get_reader().await?.read_to_end(&mut buf).await?;
let byte_payload = BytePayload::new(buf); let byte_payload = BytePayload::new(buf);
let thumb_payload = ThumbnailMetadataResponse::from_model(thumbnail); let thumb_payload = ThumbnailMetadataResponse::from_model(thumbnail);
ctx.emitter ctx.emit_to(
.emit_response_to( Self::name(),
event.id(), "get_thumbnail_of_size",
Self::name(), TandemPayload::new(thumb_payload, byte_payload),
"get_thumbnail_of_size", )
TandemPayload::new(thumb_payload, byte_payload), .await?;
)
.await?;
Ok(()) Ok(())
} }
/// Updates the name of a file /// Updates the name of a file
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn update_file_name<S: AsyncProtocolStream>( async fn update_file_name(ctx: &Context, event: Event) -> IPCResult<()> {
ctx: &Context<S>,
event: Event,
) -> IPCResult<()> {
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
let request = event.data::<UpdateFileNameRequest>()?; let request = event.payload::<UpdateFileNameRequest>()?;
let mut file = file_by_identifier(request.file_id, &repo).await?; let mut file = file_by_identifier(request.file_id, &repo).await?;
file.set_name(request.name).await?; file.set_name(request.name).await?;
ctx.emitter ctx.emit_to(
.emit_response_to( Self::name(),
event.id(), "update_file_name",
Self::name(), FileMetadataResponse::from_model(file),
"update_file_name", )
FileMetadataResponse::from_model(file), .await?;
)
.await?;
Ok(()) Ok(())
} }
/// Deletes all thumbnails of a file /// Deletes all thumbnails of a file
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn delete_thumbnails<S: AsyncProtocolStream>( async fn delete_thumbnails(ctx: &Context, event: Event) -> IPCResult<()> {
ctx: &Context<S>,
event: Event,
) -> IPCResult<()> {
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
let id = event.data::<FileIdentifier>()?; let id = event.payload::<FileIdentifier>()?;
let file = file_by_identifier(id, &repo).await?; let file = file_by_identifier(id, &repo).await?;
let thumbnails = repo.get_file_thumbnails(file.hash().to_owned()).await?; let thumbnails = repo.get_file_thumbnails(file.hash().to_owned()).await?;

@ -1,5 +1,5 @@
use mediarepo_core::rmp_ipc::prelude::AsyncStreamProtocolListener; use mediarepo_core::bromine::prelude::AsyncStreamProtocolListener;
use mediarepo_core::rmp_ipc::{namespace, namespace::Namespace, IPCBuilder}; use mediarepo_core::bromine::{namespace, namespace::Namespace, IPCBuilder};
pub mod files; pub mod files;
pub mod tags; pub mod tags;

@ -1,8 +1,8 @@
use crate::from_model::FromModel; use crate::from_model::FromModel;
use crate::utils::{file_by_identifier, get_repo_from_context}; use crate::utils::{file_by_identifier, get_repo_from_context};
use mediarepo_api::types::files::{GetFileTagsRequest, GetFilesTagsRequest}; use mediarepo_core::bromine::prelude::*;
use mediarepo_api::types::tags::{ChangeFileTagsRequest, TagResponse}; use mediarepo_core::mediarepo_api::types::files::{GetFileTagsRequest, GetFilesTagsRequest};
use mediarepo_core::rmp_ipc::prelude::*; use mediarepo_core::mediarepo_api::types::tags::{ChangeFileTagsRequest, TagResponse};
pub struct TagsNamespace; pub struct TagsNamespace;
@ -11,7 +11,7 @@ impl NamespaceProvider for TagsNamespace {
"tags" "tags"
} }
fn register<S: AsyncProtocolStream>(handler: &mut EventHandler<S>) { fn register(handler: &mut EventHandler) {
events!(handler, events!(handler,
"all_tags" => Self::all_tags, "all_tags" => Self::all_tags,
"tags_for_file" => Self::tags_for_file, "tags_for_file" => Self::tags_for_file,
@ -25,7 +25,7 @@ impl NamespaceProvider for TagsNamespace {
impl TagsNamespace { impl TagsNamespace {
/// Returns a list of all tags in the database /// Returns a list of all tags in the database
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn all_tags<S: AsyncProtocolStream>(ctx: &Context<S>, event: Event) -> IPCResult<()> { async fn all_tags(ctx: &Context, _event: Event) -> IPCResult<()> {
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
let tags: Vec<TagResponse> = repo let tags: Vec<TagResponse> = repo
.tags() .tags()
@ -33,27 +33,21 @@ impl TagsNamespace {
.into_iter() .into_iter()
.map(TagResponse::from_model) .map(TagResponse::from_model)
.collect(); .collect();
ctx.emitter ctx.emit_to(Self::name(), "all_tags", tags).await?;
.emit_response_to(event.id(), Self::name(), "all_tags", tags)
.await?;
Ok(()) Ok(())
} }
/// Returns all tags for a single file /// Returns all tags for a single file
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn tags_for_file<S: AsyncProtocolStream>( async fn tags_for_file(ctx: &Context, event: Event) -> IPCResult<()> {
ctx: &Context<S>,
event: Event,
) -> IPCResult<()> {
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
let request = event.data::<GetFileTagsRequest>()?; let request = event.payload::<GetFileTagsRequest>()?;
let file = file_by_identifier(request.id, &repo).await?; let file = file_by_identifier(request.id, &repo).await?;
let tags = file.tags().await?; let tags = file.tags().await?;
let responses: Vec<TagResponse> = tags.into_iter().map(TagResponse::from_model).collect(); let responses: Vec<TagResponse> = tags.into_iter().map(TagResponse::from_model).collect();
ctx.emitter ctx.emit_to(Self::name(), "tags_for_file", responses)
.emit_response_to(event.id(), Self::name(), "tags_for_file", responses)
.await?; .await?;
Ok(()) Ok(())
@ -61,20 +55,16 @@ impl TagsNamespace {
/// Returns all tags for a given list of file hashes /// Returns all tags for a given list of file hashes
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn tags_for_files<S: AsyncProtocolStream>( async fn tags_for_files(ctx: &Context, event: Event) -> IPCResult<()> {
ctx: &Context<S>,
event: Event,
) -> IPCResult<()> {
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
let request = event.data::<GetFilesTagsRequest>()?; let request = event.payload::<GetFilesTagsRequest>()?;
let tag_responses: Vec<TagResponse> = repo let tag_responses: Vec<TagResponse> = repo
.find_tags_for_hashes(request.hashes) .find_tags_for_hashes(request.hashes)
.await? .await?
.into_iter() .into_iter()
.map(TagResponse::from_model) .map(TagResponse::from_model)
.collect(); .collect();
ctx.emitter ctx.emit_to(Self::name(), "tags_for_files", tag_responses)
.emit_response_to(event.id(), Self::name(), "tags_for_files", tag_responses)
.await?; .await?;
Ok(()) Ok(())
@ -82,9 +72,9 @@ impl TagsNamespace {
/// Creates all tags given as input or returns the existing tag /// Creates all tags given as input or returns the existing tag
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn create_tags<S: AsyncProtocolStream>(ctx: &Context<S>, event: Event) -> IPCResult<()> { async fn create_tags(ctx: &Context, event: Event) -> IPCResult<()> {
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
let tags = event.data::<Vec<String>>()?; let tags = event.payload::<Vec<String>>()?;
let mut created_tags = Vec::new(); let mut created_tags = Vec::new();
for tag in tags { for tag in tags {
@ -95,9 +85,7 @@ impl TagsNamespace {
.into_iter() .into_iter()
.map(TagResponse::from_model) .map(TagResponse::from_model)
.collect(); .collect();
ctx.emitter ctx.emit_to(Self::name(), "create_tags", responses).await?;
.emit_response_to(event.id(), Self::name(), "create_tags", responses)
.await?;
Ok(()) Ok(())
} }
@ -105,12 +93,9 @@ impl TagsNamespace {
/// Changes tags of a file /// Changes tags of a file
/// it removes the tags from the removed list and adds the one from the add list /// it removes the tags from the removed list and adds the one from the add list
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
async fn change_file_tags<S: AsyncProtocolStream>( async fn change_file_tags(ctx: &Context, event: Event) -> IPCResult<()> {
ctx: &Context<S>,
event: Event,
) -> IPCResult<()> {
let repo = get_repo_from_context(ctx).await; let repo = get_repo_from_context(ctx).await;
let request = event.data::<ChangeFileTagsRequest>()?; let request = event.payload::<ChangeFileTagsRequest>()?;
let file = file_by_identifier(request.file_id, &repo).await?; let file = file_by_identifier(request.file_id, &repo).await?;
if !request.added_tags.is_empty() { if !request.added_tags.is_empty() {
@ -126,8 +111,7 @@ impl TagsNamespace {
.into_iter() .into_iter()
.map(TagResponse::from_model) .map(TagResponse::from_model)
.collect(); .collect();
ctx.emitter ctx.emit_to(Self::name(), "change_file_tags", responses)
.emit_response_to(event.id(), Self::name(), "change_file_tags", responses)
.await?; .await?;
Ok(()) Ok(())

@ -1,13 +1,12 @@
use mediarepo_api::types::identifier::FileIdentifier; use mediarepo_core::bromine::ipc::context::Context;
use mediarepo_core::error::{RepoError, RepoResult}; use mediarepo_core::error::{RepoError, RepoResult};
use mediarepo_core::rmp_ipc::ipc::context::Context; use mediarepo_core::mediarepo_api::types::identifier::FileIdentifier;
use mediarepo_core::rmp_ipc::protocol::AsyncProtocolStream;
use mediarepo_model::file::File; use mediarepo_model::file::File;
use mediarepo_model::repo::Repo; use mediarepo_model::repo::Repo;
use mediarepo_model::type_keys::RepoKey; use mediarepo_model::type_keys::RepoKey;
use std::sync::Arc; use std::sync::Arc;
pub async fn get_repo_from_context<S: AsyncProtocolStream>(ctx: &Context<S>) -> Arc<Repo> { pub async fn get_repo_from_context(ctx: &Context) -> Arc<Repo> {
let data = ctx.data.read().await; let data = ctx.data.read().await;
let repo = data.get::<RepoKey>().unwrap(); let repo = data.get::<RepoKey>().unwrap();
Arc::clone(repo) Arc::clone(repo)

Loading…
Cancel
Save