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