import{_ as e,o as a,c as t,e as n}from"./app-ClSKFI0Z.js";const r={},l=n(`
设置键值对
Args:
key: 键
value: 值
获取键值对
Args:
key: 键
default: 默认值
Returns:
Any: 值
删除键值对
Args:
key: 键
ignore_key_error: 是否忽略键不存在的错误
Returns:
获取所有键值对
Returns:
dict[str, Any]: 键值对
`,44),o=[l];function s(d,c){return a(),t("div",null,o)}const h=e(r,[["render",s],["__file","storage.html.vue"]]),y=JSON.parse(`{"path":"/dev/api/comm/storage.html","title":"liteyuki.comm.storage","lang":"zh-CN","frontmatter":{"title":"liteyuki.comm.storage","order":1,"icon":"laptop-code","category":"API","description":"def on_get(data: tuple[str, dict[str, Any]]) -> None def on_set(data: tuple[str, dict[str, Any]]) -> None def on_delete(data: tuple[str, dict[str, Any]]) -> None def on_get_all(...","head":[["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/comm/storage.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.comm.storage"}],["meta",{"property":"og:description","content":"def on_get(data: tuple[str, dict[str, Any]]) -> None def on_set(data: tuple[str, dict[str, Any]]) -> None def on_delete(data: tuple[str, dict[str, Any]]) -> None def on_get_all(..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-19T02:22:24.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-19T02:22:24.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm.storage\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-19T02:22:24.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"def on_get(data: tuple[str, dict[str, Any]]) -> None","slug":"def-on-get-data-tuple-str-dict-str-any-none","link":"#def-on-get-data-tuple-str-dict-str-any-none","children":[]},{"level":3,"title":"def on_set(data: tuple[str, dict[str, Any]]) -> None","slug":"def-on-set-data-tuple-str-dict-str-any-none","link":"#def-on-set-data-tuple-str-dict-str-any-none","children":[]},{"level":3,"title":"def on_delete(data: tuple[str, dict[str, Any]]) -> None","slug":"def-on-delete-data-tuple-str-dict-str-any-none","link":"#def-on-delete-data-tuple-str-dict-str-any-none","children":[]},{"level":3,"title":"def on_get_all(data: tuple[str, dict[str, Any]]) -> None","slug":"def-on-get-all-data-tuple-str-dict-str-any-none","link":"#def-on-get-all-data-tuple-str-dict-str-any-none","children":[]},{"level":3,"title":"class KeyValueStore","slug":"class-keyvaluestore","link":"#class-keyvaluestore","children":[]},{"level":3,"title":"def __init__(self) -> None","slug":"def-init-self-none","link":"#def-init-self-none","children":[]},{"level":3,"title":"def set(self, key: str, value: Any) -> None","slug":"def-set-self-key-str-value-any-none","link":"#def-set-self-key-str-value-any-none","children":[]},{"level":3,"title":"def get(self, key: str, default: Optional[Any]) -> Optional[Any]","slug":"def-get-self-key-str-default-optional-any-optional-any","link":"#def-get-self-key-str-default-optional-any-optional-any","children":[]},{"level":3,"title":"def delete(self, key: str, ignore_key_error: bool) -> None","slug":"def-delete-self-key-str-ignore-key-error-bool-none","link":"#def-delete-self-key-str-ignore-key-error-bool-none","children":[]},{"level":3,"title":"def get_all(self) -> dict[str, Any]","slug":"def-get-all-self-dict-str-any","link":"#def-get-all-self-dict-str-any","children":[]},{"level":3,"title":"class GlobalKeyValueStore","slug":"class-globalkeyvaluestore","link":"#class-globalkeyvaluestore","children":[]},{"level":3,"title":"@classmethod","slug":"classmethod","link":"#classmethod","children":[]},{"level":3,"title":"def get_instance(cls: Any) -> None","slug":"def-get-instance-cls-any-none","link":"#def-get-instance-cls-any-none","children":[]},{"level":3,"title":"attr _instance: None","slug":"attr-instance-none","link":"#attr-instance-none","children":[]},{"level":3,"title":"attr _lock: threading.Lock()","slug":"attr-lock-threading-lock","link":"#attr-lock-threading-lock","children":[]},{"level":3,"title":"var key = data[1]['key']","slug":"var-key-data-1-key","link":"#var-key-data-1-key","children":[]},{"level":3,"title":"var default = data[1]['default']","slug":"var-default-data-1-default","link":"#var-default-data-1-default","children":[]},{"level":3,"title":"var recv_chan = data[1]['recv_chan']","slug":"var-recv-chan-data-1-recv-chan","link":"#var-recv-chan-data-1-recv-chan","children":[]},{"level":3,"title":"var key = data[1]['key']","slug":"var-key-data-1-key-1","link":"#var-key-data-1-key-1","children":[]},{"level":3,"title":"var value = data[1]['value']","slug":"var-value-data-1-value","link":"#var-value-data-1-value","children":[]},{"level":3,"title":"var key = data[1]['key']","slug":"var-key-data-1-key-2","link":"#var-key-data-1-key-2","children":[]},{"level":3,"title":"var recv_chan = data[1]['recv_chan']","slug":"var-recv-chan-data-1-recv-chan-1","link":"#var-recv-chan-data-1-recv-chan-1","children":[]},{"level":3,"title":"var lock = _get_lock(key)","slug":"var-lock-get-lock-key","link":"#var-lock-get-lock-key","children":[]},{"level":3,"title":"var lock = _get_lock(key)","slug":"var-lock-get-lock-key-1","link":"#var-lock-get-lock-key-1","children":[]},{"level":3,"title":"var recv_chan = Channel[Optional[Any]]('recv_chan')","slug":"var-recv-chan-channel-optional-any-recv-chan","link":"#var-recv-chan-channel-optional-any-recv-chan","children":[]},{"level":3,"title":"var lock = _get_lock(key)","slug":"var-lock-get-lock-key-2","link":"#var-lock-get-lock-key-2","children":[]},{"level":3,"title":"var recv_chan = Channel[dict[str, Any]]('recv_chan')","slug":"var-recv-chan-channel-dict-str-any-recv-chan","link":"#var-recv-chan-channel-dict-str-any-recv-chan","children":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724034144000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":4}]},"readingTime":{"minutes":0.77,"words":232},"filePathRelative":"dev/api/comm/storage.md","localizedDate":"2024年8月19日","autoDesc":true}`);export{h as comp,y as data};