diff options
| author | 2025-01-04 22:38:23 +0800 | |
|---|---|---|
| committer | 2025-01-04 22:38:23 +0800 | |
| commit | c990518cb533a793399e44edbb4bc036342c7175 (patch) | |
| tree | 8e2bd0f833b803a73dea7d88e7c294cf3d078d4d /src/hrc/dev | |
| parent | bc57c1410c08323ba37114082d0fe609fafc2c5d (diff) | |
| download | HydroRollCore-c990518cb533a793399e44edbb4bc036342c7175.tar.gz HydroRollCore-c990518cb533a793399e44edbb4bc036342c7175.zip | |
Diffstat (limited to 'src/hrc/dev')
| -rw-r--r-- | src/hrc/dev/__init__.py | 1 | ||||
| -rw-r--r-- | src/hrc/dev/api/__init__.py | 0 | ||||
| -rw-r--r-- | src/hrc/dev/character.py | 2 | ||||
| -rw-r--r-- | src/hrc/dev/echo.py | 105 | ||||
| -rw-r--r-- | src/hrc/dev/grps/__init__.py | 1 | ||||
| -rw-r--r-- | src/hrc/dev/grps/v1.py | 12 |
6 files changed, 121 insertions, 0 deletions
diff --git a/src/hrc/dev/__init__.py b/src/hrc/dev/__init__.py new file mode 100644 index 0000000..ea8f56b --- /dev/null +++ b/src/hrc/dev/__init__.py @@ -0,0 +1 @@ +from hrc.dev.grps import v1
\ No newline at end of file diff --git a/src/hrc/dev/api/__init__.py b/src/hrc/dev/api/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/hrc/dev/api/__init__.py diff --git a/src/hrc/dev/character.py b/src/hrc/dev/character.py new file mode 100644 index 0000000..c883e45 --- /dev/null +++ b/src/hrc/dev/character.py @@ -0,0 +1,2 @@ +class Character: + class Attribute: ... diff --git a/src/hrc/dev/echo.py b/src/hrc/dev/echo.py new file mode 100644 index 0000000..5bdeab7 --- /dev/null +++ b/src/hrc/dev/echo.py @@ -0,0 +1,105 @@ +"""HydroRoll-Team/echo +水系跨平台事件标准(cross-platform event standard): Event Communication and Harmonization across Online platforms. +:ref: https://github/com/HydroRoll-Team/echo +:ref: https://echo.hydroroll.team +""" + +class Event(object): + """事件基类 + :ref: https://echo.hydroroll.team/Event/#0_event + """ + def __init__(self, event_type, data, metadata): + self.event_type = event_type + self.data = data + self.metadata = metadata + +class WorkFlow(Event): + """workflow + :ref: https://echo.hydroroll.team/Event/#1_workflow + """ + def __init__(self, data, metadata): + super().__init__('workflow', data, metadata) + +class CallBack(Event): + """callback + :ref: https://echo.hydroroll.team/Event/#4_callback + """ + def __init__(self, data, metadata): + super().__init__('callback', data, metadata) + +class Message(Event): + """message + :ref: https://echo.hydroroll.team/Event/#2_message + """ + def __init__(self, data, metadata): + super().__init__('message', data, metadata) + +class Reaction(Event): + """reaction + :ref: https://echo.hydroroll.team/Event/#3_reaction + """ + def __init__(self, data, metadata): + super().__init__('reaction', data, metadata) + +class Typing(Event): + """typing + :ref: https://echo.hydroroll.team/Event/#5_typing + """ + def __init__(self, data, metadata): + super().__init__('typing', data, metadata) + +class UserJoin(Event): + """user join + :ref: https://echo.hydroroll.team/Event/#6_user_join + """ + def __init__(self, data, metadata): + super().__init__('user_join', data, metadata) + +class UserLeave(Event): + """user leave + :ref: https://echo.hydroroll.team/Event/#7_user_leave + """ + def __init__(self, data, metadata): + super().__init__('user_leave', data, metadata) + +class FileShare(Event): + """file share + :ref: https://echo.hydroroll.team/Event/#8_file_share + """ + def __init__(self, data, metadata): + super().__init__('file_share', data, metadata) + +class Mention(Event): + """mention + :ref: https://echo.hydroroll.team/Event/#9_mention + """ + def __init__(self, data, metadata): + super().__init__('mention', data, metadata) + +class ChannelCreate(Event): + """channel create + :ref: https://echo.hydroroll.team/Event/#10_channel_create + """ + def __init__(self, data, metadata): + super().__init__('channel_create', data, metadata) + +class ChannelDelete(Event): + """channel delete + :ref: https://echo.hydroroll.team/Event/#11_channel_delete + """ + def __init__(self, data, metadata): + super().__init__('channel_delete', data, metadata) + +class ChannelUpdate(Event): + """channel update + :ref: https://echo.hydroroll.team/Event/#12_channel_update + """ + def __init__(self, data, metadata): + super().__init__('channel_update', data, metadata) + +class UserUpdate(Event): + """user update + :ref: https://echo.hydroroll.team/Event/#13_user_update + """ + def __init__(self, data, metadata): + super().__init__('user_update', data, metadata)
\ No newline at end of file diff --git a/src/hrc/dev/grps/__init__.py b/src/hrc/dev/grps/__init__.py new file mode 100644 index 0000000..bbf8c7e --- /dev/null +++ b/src/hrc/dev/grps/__init__.py @@ -0,0 +1 @@ +from . import v1
\ No newline at end of file diff --git a/src/hrc/dev/grps/v1.py b/src/hrc/dev/grps/v1.py new file mode 100644 index 0000000..fa987a7 --- /dev/null +++ b/src/hrc/dev/grps/v1.py @@ -0,0 +1,12 @@ +from datetime import datetime +from pydantic import BaseModel + + +__version__ = "1.0.0-alpha.1" + +class GRPS(BaseModel): + id: str + name: str + description: str + created_at: datetime + updated_at: datetime
\ No newline at end of file |
