fixed
This commit is contained in:
Binary file not shown.
@@ -462,7 +462,7 @@ def _uniffi_check_contract_api_version(lib):
|
|||||||
def _uniffi_check_api_checksums(lib):
|
def _uniffi_check_api_checksums(lib):
|
||||||
if lib.uniffi_hublib_checksum_func_get_secret_value() != 7762:
|
if lib.uniffi_hublib_checksum_func_get_secret_value() != 7762:
|
||||||
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
||||||
if lib.uniffi_hublib_checksum_func_validate_secret_value() != 27903:
|
if lib.uniffi_hublib_checksum_func_recreate_secret_value() != 51310:
|
||||||
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
||||||
|
|
||||||
# A ctypes library to expose the extern-C FFI definitions.
|
# A ctypes library to expose the extern-C FFI definitions.
|
||||||
@@ -577,14 +577,14 @@ _UniffiLib.uniffi_hublib_fn_func_get_secret_value.argtypes = (
|
|||||||
ctypes.POINTER(_UniffiRustCallStatus),
|
ctypes.POINTER(_UniffiRustCallStatus),
|
||||||
)
|
)
|
||||||
_UniffiLib.uniffi_hublib_fn_func_get_secret_value.restype = _UniffiRustBuffer
|
_UniffiLib.uniffi_hublib_fn_func_get_secret_value.restype = _UniffiRustBuffer
|
||||||
_UniffiLib.uniffi_hublib_fn_func_validate_secret_value.argtypes = (
|
_UniffiLib.uniffi_hublib_fn_func_recreate_secret_value.argtypes = (
|
||||||
ctypes.c_uint64,
|
ctypes.c_uint64,
|
||||||
_UniffiRustBuffer,
|
_UniffiRustBuffer,
|
||||||
_UniffiRustBuffer,
|
_UniffiRustBuffer,
|
||||||
_UniffiRustBuffer,
|
_UniffiRustBuffer,
|
||||||
ctypes.POINTER(_UniffiRustCallStatus),
|
ctypes.POINTER(_UniffiRustCallStatus),
|
||||||
)
|
)
|
||||||
_UniffiLib.uniffi_hublib_fn_func_validate_secret_value.restype = ctypes.c_int8
|
_UniffiLib.uniffi_hublib_fn_func_recreate_secret_value.restype = _UniffiRustBuffer
|
||||||
_UniffiLib.ffi_hublib_rustbuffer_alloc.argtypes = (
|
_UniffiLib.ffi_hublib_rustbuffer_alloc.argtypes = (
|
||||||
ctypes.c_uint64,
|
ctypes.c_uint64,
|
||||||
ctypes.POINTER(_UniffiRustCallStatus),
|
ctypes.POINTER(_UniffiRustCallStatus),
|
||||||
@@ -856,9 +856,9 @@ _UniffiLib.ffi_hublib_rust_future_complete_void.restype = None
|
|||||||
_UniffiLib.uniffi_hublib_checksum_func_get_secret_value.argtypes = (
|
_UniffiLib.uniffi_hublib_checksum_func_get_secret_value.argtypes = (
|
||||||
)
|
)
|
||||||
_UniffiLib.uniffi_hublib_checksum_func_get_secret_value.restype = ctypes.c_uint16
|
_UniffiLib.uniffi_hublib_checksum_func_get_secret_value.restype = ctypes.c_uint16
|
||||||
_UniffiLib.uniffi_hublib_checksum_func_validate_secret_value.argtypes = (
|
_UniffiLib.uniffi_hublib_checksum_func_recreate_secret_value.argtypes = (
|
||||||
)
|
)
|
||||||
_UniffiLib.uniffi_hublib_checksum_func_validate_secret_value.restype = ctypes.c_uint16
|
_UniffiLib.uniffi_hublib_checksum_func_recreate_secret_value.restype = ctypes.c_uint16
|
||||||
_UniffiLib.ffi_hublib_uniffi_contract_version.argtypes = (
|
_UniffiLib.ffi_hublib_uniffi_contract_version.argtypes = (
|
||||||
)
|
)
|
||||||
_UniffiLib.ffi_hublib_uniffi_contract_version.restype = ctypes.c_uint32
|
_UniffiLib.ffi_hublib_uniffi_contract_version.restype = ctypes.c_uint32
|
||||||
@@ -882,27 +882,6 @@ class _UniffiConverterUInt64(_UniffiConverterPrimitiveInt):
|
|||||||
def write(value, buf):
|
def write(value, buf):
|
||||||
buf.write_u64(value)
|
buf.write_u64(value)
|
||||||
|
|
||||||
class _UniffiConverterBool:
|
|
||||||
@classmethod
|
|
||||||
def check_lower(cls, value):
|
|
||||||
return not not value
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def lower(cls, value):
|
|
||||||
return 1 if value else 0
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def lift(value):
|
|
||||||
return value != 0
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def read(cls, buf):
|
|
||||||
return cls.lift(buf.read_u8())
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def write(cls, value, buf):
|
|
||||||
buf.write_u8(value)
|
|
||||||
|
|
||||||
class _UniffiConverterString:
|
class _UniffiConverterString:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def check_lower(value):
|
def check_lower(value):
|
||||||
@@ -950,7 +929,7 @@ def get_secret_value(cur_time: "int",user_agent: "str",url: "str") -> "str":
|
|||||||
_UniffiConverterString.lower(url)))
|
_UniffiConverterString.lower(url)))
|
||||||
|
|
||||||
|
|
||||||
def validate_secret_value(cur_time: "int",user_agent: "str",url: "str",gotten_value: "str") -> "bool":
|
def recreate_secret_value(cur_time: "int",user_agent: "str",url: "str",gotten_value: "str") -> "str":
|
||||||
_UniffiConverterUInt64.check_lower(cur_time)
|
_UniffiConverterUInt64.check_lower(cur_time)
|
||||||
|
|
||||||
_UniffiConverterString.check_lower(user_agent)
|
_UniffiConverterString.check_lower(user_agent)
|
||||||
@@ -959,7 +938,7 @@ def validate_secret_value(cur_time: "int",user_agent: "str",url: "str",gotten_va
|
|||||||
|
|
||||||
_UniffiConverterString.check_lower(gotten_value)
|
_UniffiConverterString.check_lower(gotten_value)
|
||||||
|
|
||||||
return _UniffiConverterBool.lift(_uniffi_rust_call(_UniffiLib.uniffi_hublib_fn_func_validate_secret_value,
|
return _UniffiConverterString.lift(_uniffi_rust_call(_UniffiLib.uniffi_hublib_fn_func_recreate_secret_value,
|
||||||
_UniffiConverterUInt64.lower(cur_time),
|
_UniffiConverterUInt64.lower(cur_time),
|
||||||
_UniffiConverterString.lower(user_agent),
|
_UniffiConverterString.lower(user_agent),
|
||||||
_UniffiConverterString.lower(url),
|
_UniffiConverterString.lower(url),
|
||||||
@@ -969,6 +948,6 @@ def validate_secret_value(cur_time: "int",user_agent: "str",url: "str",gotten_va
|
|||||||
__all__ = [
|
__all__ = [
|
||||||
"InternalError",
|
"InternalError",
|
||||||
"get_secret_value",
|
"get_secret_value",
|
||||||
"validate_secret_value",
|
"recreate_secret_value",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user