flea/architecture.md
2024-03-28 18:47:14 +03:00

1.2 KiB

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()
    }