1
0
forked from bot/app
LiteyukiBot/assets/storage.html-CTWcf-jW.js

13 lines
8.0 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as e,o as t,c as n,e as a}from"./app-DuYQPtzk.js";const s={},o=a(`<h3 id="def-on-get-data-tuple-str-dict-str-any-none" tabindex="-1"><a class="header-anchor" href="#def-on-get-data-tuple-str-dict-str-any-none"><span><em><strong>def</strong></em> <code>on_get(data: tuple[str, dict[str, Any]]) -&gt; None</code></span></a></h3><h3 id="def-on-set-data-tuple-str-dict-str-any-none" tabindex="-1"><a class="header-anchor" href="#def-on-set-data-tuple-str-dict-str-any-none"><span><em><strong>def</strong></em> <code>on_set(data: tuple[str, dict[str, Any]]) -&gt; None</code></span></a></h3><h3 id="def-on-delete-data-tuple-str-dict-str-any-none" tabindex="-1"><a class="header-anchor" href="#def-on-delete-data-tuple-str-dict-str-any-none"><span><em><strong>def</strong></em> <code>on_delete(data: tuple[str, dict[str, Any]]) -&gt; None</code></span></a></h3><h3 id="def-on-get-all-data-tuple-str-dict-str-any-none" tabindex="-1"><a class="header-anchor" href="#def-on-get-all-data-tuple-str-dict-str-any-none"><span><em><strong>def</strong></em> <code>on_get_all(data: tuple[str, dict[str, Any]]) -&gt; None</code></span></a></h3><h3 id="class-keyvaluestore" tabindex="-1"><a class="header-anchor" href="#class-keyvaluestore"><span><em><strong>class</strong></em> <code>KeyValueStore</code></span></a></h3><h3 id="def-init-self-none" tabindex="-1"><a class="header-anchor" href="#def-init-self-none"><span> <em><strong>def</strong></em> <code>__init__(self) -&gt; None</code></span></a></h3><p></p><h3 id="def-set-self-key-str-value-any-none" tabindex="-1"><a class="header-anchor" href="#def-set-self-key-str-value-any-none"><span> <em><strong>def</strong></em> <code>set(self, key: str, value: Any) -&gt; None</code></span></a></h3><p> 设置键值对</p><p>Args:</p><pre><code>key: 键
value: 值
</code></pre><h3 id="def-get-self-key-str-default-optional-any-optional-any" tabindex="-1"><a class="header-anchor" href="#def-get-self-key-str-default-optional-any-optional-any"><span> <em><strong>def</strong></em> <code>get(self, key: str, default: Optional[Any]) -&gt; Optional[Any]</code></span></a></h3><p> 获取键值对</p><p>Args:</p><pre><code>key: 键
default: 默认值
</code></pre><p>Returns:</p><pre><code>Any: 值
</code></pre><h3 id="def-delete-self-key-str-ignore-key-error-bool-none" tabindex="-1"><a class="header-anchor" href="#def-delete-self-key-str-ignore-key-error-bool-none"><span> <em><strong>def</strong></em> <code>delete(self, key: str, ignore_key_error: bool) -&gt; None</code></span></a></h3><p> 删除键值对</p><p>Args:</p><pre><code>key: 键
ignore_key_error: 是否忽略键不存在的错误
</code></pre><p>Returns:</p><h3 id="def-get-all-self-dict-str-any" tabindex="-1"><a class="header-anchor" href="#def-get-all-self-dict-str-any"><span> <em><strong>def</strong></em> <code>get_all(self) -&gt; dict[str, Any]</code></span></a></h3><p> 获取所有键值对</p><p>Returns:</p><pre><code>dict[str, Any]: 键值对
</code></pre><h3 id="class-globalkeyvaluestore" tabindex="-1"><a class="header-anchor" href="#class-globalkeyvaluestore"><span><em><strong>class</strong></em> <code>GlobalKeyValueStore</code></span></a></h3><h3 id="classmethod" tabindex="-1"><a class="header-anchor" href="#classmethod"><span> <em><strong>@classmethod</strong></em></span></a></h3><h3 id="def-get-instance-cls-any-none" tabindex="-1"><a class="header-anchor" href="#def-get-instance-cls-any-none"><span> <em><strong>def</strong></em> <code>get_instance(cls: Any) -&gt; None</code></span></a></h3><p></p><h3 id="attr-instance-none" tabindex="-1"><a class="header-anchor" href="#attr-instance-none"><span> <em><strong>attr</strong></em> <code>_instance: None</code></span></a></h3><h3 id="attr-lock-threading-lock" tabindex="-1"><a class="header-anchor" href="#attr-lock-threading-lock"><span> <em><strong>attr</strong></em> <code>_lock: threading.Lock()</code></span></a></h3>`,32),l=[o];function r(d,i){return t(),n("div",null,l)}const p=e(s,[["render",r],["__file","storage.html.vue"]]),g=JSON.parse('{"path":"/en/dev/api/liteyuki/comm/storage.html","title":"liteyuki.comm.storage","lang":"en-US","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/en/dev/api/liteyuki/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":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-19T02:04:24.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-19T02:04:24.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm.storage\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-19T02:04: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":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724033064000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":3}]},"readingTime":{"minutes":0.57,"words":172},"filePathRelative":"en/dev/api/liteyuki/comm/storage.md","localizedDate":"August 19, 2024","autoDesc":true}');export{p as comp,g as data};