-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8b159a
commit b498404
Showing
125 changed files
with
10,189 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from . import adapters, auth, base | ||
from .adapters import * | ||
from .auth import * | ||
from .base import * | ||
|
||
__version__ = ... | ||
__revision__ = ... | ||
__date__ = ... | ||
__copyright__ = ... | ||
__license__ = ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from . import base, fs, memory, mongo, null | ||
from .base import BaseAdapter | ||
from .fs import FsAdapter | ||
from .memory import MemoryAdapter | ||
from .mongo import MongoAdapter | ||
from .null import NullAdapter | ||
|
||
__version__ = ... | ||
__revision__ = ... | ||
__date__ = ... | ||
__copyright__ = ... | ||
__license__ = ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
__author__ = ... | ||
__version__ = ... | ||
__revision__ = ... | ||
__date__ = ... | ||
__copyright__ = ... | ||
__license__ = ... | ||
class BaseAdapter: | ||
""" | ||
Top level abstract representation of a netius adapter. | ||
The adapter is responsible for the storage/retrieval | ||
of key based values, and may be used as the storage | ||
engine back-end for a series or purposes (eg: email | ||
storage, torrent hash table storage, sessions, etc.) | ||
""" | ||
def set(self, value, owner=...): # -> None: | ||
... | ||
|
||
def get(self, key): # -> str: | ||
... | ||
|
||
def get_file(self, key, mode=...): # -> StringIO: | ||
... | ||
|
||
def delete(self, key, owner=...): # -> None: | ||
... | ||
|
||
def append(self, key, value): # -> None: | ||
... | ||
|
||
def truncate(self, key, count): # -> None: | ||
... | ||
|
||
def size(self, key): # -> Literal[0]: | ||
... | ||
|
||
def sizes(self, owner=...): # -> list[int]: | ||
... | ||
|
||
def total(self, owner=...): # -> int: | ||
... | ||
|
||
def reserve(self, owner=...): # -> None: | ||
... | ||
|
||
def count(self, owner=...): # -> Literal[0]: | ||
... | ||
|
||
def list(self, owner=...): # -> tuple[()]: | ||
... | ||
|
||
def generate(self): # -> str: | ||
... | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from . import base | ||
|
||
__author__ = ... | ||
__version__ = ... | ||
__revision__ = ... | ||
__date__ = ... | ||
__copyright__ = ... | ||
__license__ = ... | ||
class FsAdapter(base.BaseAdapter): | ||
def __init__(self, base_path=...) -> None: | ||
... | ||
|
||
def set(self, value, owner=...): # -> str: | ||
... | ||
|
||
def get_file(self, key, mode=...): # -> IO[Any]: | ||
... | ||
|
||
def delete(self, key, owner=...): # -> None: | ||
... | ||
|
||
def size(self, key): # -> int: | ||
... | ||
|
||
def count(self, owner=...): # -> int: | ||
... | ||
|
||
def list(self, owner=...): # -> list[str]: | ||
... | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from . import base | ||
|
||
__author__ = ... | ||
__version__ = ... | ||
__revision__ = ... | ||
__date__ = ... | ||
__copyright__ = ... | ||
__license__ = ... | ||
class MemoryAdapter(base.BaseAdapter): | ||
def __init__(self) -> None: | ||
... | ||
|
||
def set(self, value, owner=...): # -> str: | ||
... | ||
|
||
def get_file(self, key, mode=...): # -> StringIO: | ||
... | ||
|
||
def delete(self, key, owner=...): # -> None: | ||
... | ||
|
||
def append(self, key, value): # -> None: | ||
... | ||
|
||
def truncate(self, key, count): # -> None: | ||
... | ||
|
||
def size(self, key): # -> int: | ||
... | ||
|
||
def count(self, owner=...): # -> int: | ||
... | ||
|
||
def list(self, owner=...): # -> dict_keys[Any, Any]: | ||
... | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from . import base | ||
|
||
__author__ = ... | ||
__version__ = ... | ||
__revision__ = ... | ||
__date__ = ... | ||
__copyright__ = ... | ||
__license__ = ... | ||
class MongoAdapter(base.BaseAdapter): | ||
def set(self, value, owner=...): # -> None: | ||
... | ||
|
||
def get(self, key): # -> None: | ||
... | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from . import base | ||
|
||
__author__ = ... | ||
__version__ = ... | ||
__revision__ = ... | ||
__date__ = ... | ||
__copyright__ = ... | ||
__license__ = ... | ||
class NullAdapter(base.BaseAdapter): | ||
... | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from . import address, allow, base, deny, dummy, memory, passwd, simple | ||
from .address import AddressAuth | ||
from .allow import AllowAuth | ||
from .base import Auth | ||
from .deny import DenyAuth | ||
from .dummy import DummyAuth | ||
from .memory import MemoryAuth | ||
from .passwd import PasswdAuth | ||
from .simple import SimpleAuth | ||
|
||
__version__ = ... | ||
__revision__ = ... | ||
__date__ = ... | ||
__copyright__ = ... | ||
__license__ = ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from . import base | ||
|
||
__author__ = ... | ||
__version__ = ... | ||
__revision__ = ... | ||
__date__ = ... | ||
__copyright__ = ... | ||
__license__ = ... | ||
class AddressAuth(base.Auth): | ||
def __init__(self, allowed=..., *args, **kwargs) -> None: | ||
... | ||
|
||
@classmethod | ||
def auth(cls, allowed=..., *args, **kwargs): # -> bool: | ||
... | ||
|
||
@classmethod | ||
def is_simple(cls): # -> Literal[True]: | ||
... | ||
|
||
def auth_i(self, *args, **kwargs): # -> bool: | ||
... | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from . import base | ||
|
||
__author__ = ... | ||
__version__ = ... | ||
__revision__ = ... | ||
__date__ = ... | ||
__copyright__ = ... | ||
__license__ = ... | ||
class AllowAuth(base.Auth): | ||
@classmethod | ||
def auth(cls, *args, **kwargs): # -> Literal[True]: | ||
... | ||
|
||
@classmethod | ||
def is_simple(cls): # -> Literal[True]: | ||
... | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from typing import Literal | ||
|
||
HashType = Literal["plain", "md5", "sha1", "sha256", "sha512"] | ||
class Auth: | ||
@classmethod | ||
def verify(cls, encoded: str, decoded: str) -> bool: | ||
... | ||
|
||
@classmethod | ||
def generate(cls, password: str, type: HashType = ..., salt: str = ...) -> str: | ||
... | ||
|
||
@classmethod | ||
def unpack(cls, password: str) -> tuple[HashType, str, str, str]: | ||
... | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from . import base | ||
|
||
__author__ = ... | ||
__version__ = ... | ||
__revision__ = ... | ||
__date__ = ... | ||
__copyright__ = ... | ||
__license__ = ... | ||
class DenyAuth(base.Auth): | ||
@classmethod | ||
def auth(cls, *args, **kwargs): # -> Literal[False]: | ||
... | ||
|
||
@classmethod | ||
def is_simple(cls): # -> Literal[True]: | ||
... | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from . import base | ||
|
||
__author__ = ... | ||
__version__ = ... | ||
__revision__ = ... | ||
__date__ = ... | ||
__copyright__ = ... | ||
__license__ = ... | ||
class DummyAuth(base.Auth): | ||
def __init__(self, value=..., *args, **kwargs) -> None: | ||
... | ||
|
||
@classmethod | ||
def auth(cls, value=..., *args, **kwargs): # -> bool: | ||
... | ||
|
||
@classmethod | ||
def is_simple(cls): # -> Literal[True]: | ||
... | ||
|
||
def auth_i(self, *args, **kwargs): # -> bool: | ||
... | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from . import base | ||
|
||
__version__ = ... | ||
__revision__ = ... | ||
__date__ = ... | ||
__copyright__ = ... | ||
__license__ = ... | ||
class MemoryAuth(base.Auth): | ||
def __init__(self, registry=..., *args, **kwargs) -> None: | ||
... | ||
|
||
@classmethod | ||
def auth(cls, username, password, registry=..., *args, **kwargs): # -> bool: | ||
... | ||
|
||
@classmethod | ||
def meta(cls, username, registry=..., *args, **kwargs): # -> dict[Any, Any]: | ||
... | ||
|
||
@classmethod | ||
def get_registry(cls): # -> None: | ||
... | ||
|
||
@classmethod | ||
def load_registry(cls): | ||
... | ||
|
||
def auth_i(self, username, password, *args, **kwargs): # -> bool: | ||
... | ||
|
||
|
||
|
Oops, something went wrong.