Skip to content

Commit ab7a300

Browse files
authored
Create README.md
1 parent 972cd5c commit ab7a300

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# go-uml
2+
Just a little tool to create UML Diagrams built in Go. You can use it to build simple sequence diagrams, however, this project is still under development
3+
and you won't find some functionalities yet such as
4+
5+
- provide conditional flows
6+
7+
# Example
8+
9+
```
10+
d := sequence.NewDiagram("user_starts_chatting")
11+
12+
client := "Client"
13+
backend := "Backend"
14+
db := "DynamoDB"
15+
16+
d.SetTitle("User initiates chat with another User")
17+
d.AddParticipant(client)
18+
d.AddParticipant(backend)
19+
d.AddParticipant(db)
20+
21+
d.AddDirectionalEdge(client, backend, "PUT /chat/user/<TO_ID>")
22+
d.AddDirectionalEdge(backend, db, "checks or create inbox for user")
23+
d.AddDirectionalEdge(backend, client, "return chat meta data + chat secret")
24+
d.AddDirectionalEdge(client, backend, "WS /joinchat/<CHAT_ID> payload: secret")
25+
d.AddDirectionalEdge(backend, db, "compare inbox secret")
26+
d.AddDirectionalEdge(backend, db, "set all unread messages to read")
27+
d.AddDirectionalEdge(backend, db, "store connection ID for user")
28+
d.AddDirectionalEdge(backend, client, "202 - You're good to go")
29+
d.AddDirectionalEdge(client, backend, "WS /sendmessage/<CHAT_ID> payload: hello!")
30+
d.AddDirectionalEdge(backend, db, "get connection ID for <TO_ID>")
31+
d.AddDirectionalEdge(backend, backend, "notify <TO_ID> with connection ID if present")
32+
d.AddDirectionalEdge(backend, db, "store message in chat")
33+
d.AddDirectionalEdge(client, backend, "disconnect")
34+
d.AddDirectionalEdge(backend, db, "remove connection ID for user")
35+
36+
d.Render()
37+
38+
```

0 commit comments

Comments
 (0)