-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from Blamer-io/diagrams
diagrams import
- Loading branch information
Showing
5 changed files
with
102 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,27 @@ | ||
--- | ||
name: puml | ||
on: | ||
push: | ||
paths: | ||
- '**.puml' | ||
branches: | ||
- master | ||
permissions: | ||
contents: write | ||
jobs: | ||
plantuml: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v2 | ||
- name: Generate SVG Diagrams | ||
uses: holowinski/plantuml-github-action@main | ||
with: | ||
args: -v -tsvg diagrams/*.puml | ||
- name: Commit changes | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
author_name: h1alexbel | ||
author_email: hialexbel@gmail.com | ||
message: 'diagram generated' | ||
add: 'diagrams/*' |
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 @@ | ||
@startuml | ||
title Add Token Success Flow | ||
actor TelegramUser as user | ||
participant Bot as bot | ||
participant Hub as hub | ||
database Database as db | ||
participant Auth as auth | ||
participant GitHub as github | ||
|
||
user -> bot : Chat ID, Token, TokenAlias | ||
bot -> hub : Chat ID, Token, TokenAlias | ||
hub -> auth: Validate token | ||
auth -> github: Auth token | ||
github --> auth: Auth response | ||
auth --> hub: Auth response | ||
hub -> db: Chat ID, Token, TokenAlias | ||
hub --> bot: Chat ID, TokenAlias status | ||
bot --> user: Chat ID, TokenAlias status | ||
@enduml |
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 @@ | ||
@startuml | ||
title Notifications Read Flow | ||
actor TelegramUser as user | ||
participant Bot as bot | ||
participant Hub as hub | ||
queue Broker as broker | ||
database Database as db | ||
participant Notifications as notifications | ||
participant GitHub as github | ||
|
||
notifications -> hub | ||
hub -> db: All toggled aliases | ||
db --> hub: Chat ID:Token, TokenAlias | ||
hub --> notifications: Chat ID:Token, TokenAlias | ||
notifications -> github: Polling by token | ||
github --> notifications: Notifications Stream | ||
notifications -> broker: Tuple ID, Notifications Stream | ||
bot -> broker | ||
broker --> bot: Tuple ID, Notifications Stream | ||
bot --> user: Chat ID, TokenAlias:Notifications Stream | ||
@enduml |
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,11 @@ | ||
@startuml | ||
title Register Chat ID Flow | ||
actor TelegramUser as user | ||
participant Bot as bot | ||
participant Hub as hub | ||
database Database as db | ||
|
||
user -> bot: /chat-id | ||
bot -> hub: Chat ID | ||
hub -> db: Chat ID | ||
@enduml |
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,24 @@ | ||
@startuml | ||
title Token Validation Process | ||
actor TelegramUser as user | ||
participant Bot as bot | ||
participant Hub as hub | ||
database Database as db | ||
participant Auth as auth | ||
participant GitHub as github | ||
|
||
loop every 30 minutes | ||
auth -> hub | ||
hub -> db: All tokens | ||
db --> hub: Chat ID, Tokens | ||
hub --> auth: Chat ID, Tokens | ||
auth -> github: Validate token | ||
github --> auth: Validation status | ||
alt Token expired | ||
auth -> hub: Chat ID, Token, TokenAlias expired | ||
hub -> db: Chat ID, Token, TokenAlias expired status | ||
auth -> bot: Chat ID, Token expired | ||
bot --> user: Chat ID, Token expired | ||
end | ||
end | ||
@enduml |