From f4fd0525fe436d9c4701c28a7e51f422c3fa2bde Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Thu, 28 Mar 2024 18:47:14 +0300 Subject: [PATCH] Add architecture --- architecture.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 architecture.md diff --git a/architecture.md b/architecture.md new file mode 100644 index 0000000..9dc548c --- /dev/null +++ b/architecture.md @@ -0,0 +1,47 @@ +```mermaid +classDiagram + TelegramListener <|-- Bus + TextMatcher <|-- TelegramClient + TextMatcher <|-- Bus + Bus <|-- TextMatcher + TelegramClient <|-- Bus + Users <|-- TelegramClient + Bus <|-- TelegramListener + + class Bus{ + +2024-03-28 18:27:50.551 [info] Installing honnef.co/go/tools/cmd/staticcheck@latest (/Users/nazarovsa/go/bin/staticcheck) SUCCEEDED + } + + class TelegramListener { + +MessageReceived + -TextMatcher.TextMatchCreated + } + + class TextMatcher { + +TextMatchCreated + +TextMatchMatched + -TelegramListener.MessageReceived + +long Create(CreateTextMatchRequest request) + +TextMatchData? GetById(long id) + +TextMatchData[] GetByUserId(long userId) + +void Delete(long id) + +void Activate(long id) + +void Disable(long id) + } + + class Users { + +long Create(CreateUserRequest request) + +UserData? GetById(long id) + +UserData? GetByIdentity(UserIdentityType identityType, string identity) + } + + class TelegramClient { + -TextMatcher.TextMatchMatched + -Users.Create() + -Users.GetById() + -Users.GetByIdentity() + -TextMatcher.GetByUserId() + -TextMatcher.Create() + } + +``` \ No newline at end of file