mirror of
https://github.com/mCaptcha/cache.git
synced 2024-11-21 16:25:19 +03:00
update redis-module
This commit is contained in:
parent
d0c9de8829
commit
66d02ec543
6 changed files with 35 additions and 35 deletions
60
Cargo.lock
generated
60
Cargo.lock
generated
|
@ -62,9 +62,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.2.1"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "bitvec"
|
||||
|
@ -101,9 +101,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|||
|
||||
[[package]]
|
||||
name = "clang-sys"
|
||||
version = "1.2.0"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "853eda514c284c2287f4bf20ae614f8781f40a81d32ecda6e91449304dfe077c"
|
||||
checksum = "81cf2cc85830eae84823884db23c5306442a6c3d5bfd3beb2f2a2c829faa1816"
|
||||
dependencies = [
|
||||
"glob",
|
||||
"libc",
|
||||
|
@ -152,7 +152,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote 1.0.9",
|
||||
"strsim 0.10.0",
|
||||
"syn 1.0.74",
|
||||
"syn 1.0.75",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -163,7 +163,7 @@ checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a"
|
|||
dependencies = [
|
||||
"darling_core",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.74",
|
||||
"syn 1.0.75",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -184,7 +184,7 @@ dependencies = [
|
|||
"darling",
|
||||
"proc-macro2",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.74",
|
||||
"syn 1.0.75",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -194,7 +194,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "58a94ace95092c5acb1e97a7e846b310cfbd499652f72297da7493f618a98d73"
|
||||
dependencies = [
|
||||
"derive_builder_core",
|
||||
"syn 1.0.74",
|
||||
"syn 1.0.75",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -207,7 +207,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote 1.0.9",
|
||||
"rustc_version",
|
||||
"syn 1.0.74",
|
||||
"syn 1.0.75",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -295,9 +295,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
|||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "0.4.7"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
|
||||
checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
|
@ -313,9 +313,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.98"
|
||||
version = "0.2.101"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790"
|
||||
checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
|
@ -330,7 +330,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "libmcaptcha"
|
||||
version = "0.1.4"
|
||||
source = "git+https://github.com/mCaptcha/libmcaptcha?branch=master#1d4f97f511ad851a58359ecd1737b381b61cf22e"
|
||||
source = "git+https://github.com/mCaptcha/libmcaptcha?branch=master#b2684d93482cec8e40cd6ccbc2cee4be3b1eef25"
|
||||
dependencies = [
|
||||
"derive_builder",
|
||||
"derive_more",
|
||||
|
@ -497,9 +497,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "redis-module"
|
||||
version = "0.22.0"
|
||||
version = "0.23.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8c4db88768c836e229778864160139dbd906301532806909836675d81f66b6e2"
|
||||
checksum = "aa35d4a0a162f70f156bc58fa120f45e2cd61d43a7e07130bcb6822f77501a03"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"bitflags",
|
||||
|
@ -568,29 +568,29 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.127"
|
||||
version = "1.0.130"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8"
|
||||
checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.127"
|
||||
version = "1.0.130"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc"
|
||||
checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.74",
|
||||
"syn 1.0.75",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.66"
|
||||
version = "1.0.67"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127"
|
||||
checksum = "a7f9e390c27c3c0ce8bc5d725f6e4d30a29d26659494aa4b17535f7522c5c950"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"ryu",
|
||||
|
@ -599,9 +599,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "shlex"
|
||||
version = "1.0.0"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42a568c8f2cd051a4d283bd6eb0343ac214c1b0f1ac19f93e1175b2dee38c73d"
|
||||
checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
|
@ -624,7 +624,7 @@ dependencies = [
|
|||
"heck",
|
||||
"proc-macro2",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.74",
|
||||
"syn 1.0.75",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -640,9 +640,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.74"
|
||||
version = "1.0.75"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1873d832550d4588c3dbc20f01361ab00bfe741048f71e3fecf145a7cc18b29c"
|
||||
checksum = "b7f58f7e8eaa0009c5fec437aabf511bd9933e4b2d7407bd05273c01a8906ea7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote 1.0.9",
|
||||
|
@ -684,9 +684,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.9.0"
|
||||
version = "1.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4b7b349f11a7047e6d1276853e612d152f5e8a352c61917887cc2169e2366b4c"
|
||||
checksum = "92036be488bb6594459f2e03b60e42df6f937fe6ca5c5ffdcb539c6b84dc40f5"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"pin-project-lite",
|
||||
|
|
|
@ -13,7 +13,7 @@ crate-type = ["cdylib"]
|
|||
name = "cache"
|
||||
|
||||
[dependencies]
|
||||
redis-module = { version="0.22", features = ["experimental-api"]}
|
||||
redis-module = { version="0.23", features = ["experimental-api"]}
|
||||
libc = "0.2"
|
||||
serde_json = "1.0.64"
|
||||
serde = {version = "1.0.126", features = ["derive"]}
|
||||
|
|
|
@ -283,7 +283,7 @@ pub mod type_methods {
|
|||
pub extern "C" fn rdb_load(rdb: *mut raw::RedisModuleIO, encver: c_int) -> *mut c_void {
|
||||
let bucket = match encver {
|
||||
0 => {
|
||||
let data = raw::load_string(rdb);
|
||||
let data = raw::load_string(rdb).unwrap().to_string();
|
||||
let bucket: Bucket = Format::Json.from_str(&data).unwrap();
|
||||
bucket
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ pub mod type_methods {
|
|||
pub extern "C" fn rdb_load(rdb: *mut raw::RedisModuleIO, encver: c_int) -> *mut c_void {
|
||||
let challenge = match encver {
|
||||
0 => {
|
||||
let data = raw::load_string(rdb);
|
||||
let data = raw::load_string(rdb).unwrap().to_string();
|
||||
let challenge: Result<AddVisitorResult, CacheError> = Format::Json.from_str(&data);
|
||||
if challenge.is_err() {
|
||||
panic!(
|
||||
|
|
|
@ -259,7 +259,7 @@ pub mod type_methods {
|
|||
pub extern "C" fn rdb_load(rdb: *mut raw::RedisModuleIO, encver: c_int) -> *mut c_void {
|
||||
let mcaptcha = match encver {
|
||||
0 => {
|
||||
let data = raw::load_string(rdb);
|
||||
let data = raw::load_string(rdb).unwrap().to_string();
|
||||
let mcaptcha: Result<MCaptcha, CacheError> = Format::Json.from_str(&data);
|
||||
if mcaptcha.is_err() {
|
||||
panic!(
|
||||
|
|
|
@ -197,7 +197,7 @@ pub mod type_methods {
|
|||
pub extern "C" fn rdb_load(rdb: *mut raw::RedisModuleIO, encver: c_int) -> *mut c_void {
|
||||
let bucket = match encver {
|
||||
0 => {
|
||||
let data = raw::load_string(rdb);
|
||||
let data = raw::load_string(rdb).unwrap().to_string();
|
||||
if data == SAFETY_RDB_VAL {
|
||||
MCaptchaSafety {}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue