Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit ade166b

Browse files
committed
[issue #1] common provider for one or more nodes
* groups components with the same `provider` attribute (see examples) * add the new attribute `impl` to all components (see examples) * change microservice shape to 'octagon' * layout README file
1 parent 931c65e commit ade166b

File tree

4 files changed

+69
-2
lines changed

4 files changed

+69
-2
lines changed

cmd/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,3 @@ dist/**
3434
# Goreleaser file
3535
.goreleaser.yml
3636

37-
# Custom Bash Scripts
38-
draft-all.sh

cmd/draft-all.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
SRC_DIR=../examples
4+
DPI=120
5+
EXE=./dist/draft_linux_amd64/draft
6+
7+
## declare an array of files
8+
declare -a arr=("$SRC_DIR/client.yml"
9+
"$SRC_DIR/service.yml"
10+
"$SRC_DIR/broker.yml"
11+
"$SRC_DIR/gateway.yml"
12+
"$SRC_DIR/queue.yml"
13+
"$SRC_DIR/function.yml"
14+
"$SRC_DIR/database.yml"
15+
"$SRC_DIR/storage.yml"
16+
"$SRC_DIR/message-bus-pattern.yml"
17+
"$SRC_DIR/aws-cognito-custom-auth-flow.yml"
18+
"$SRC_DIR/s3-upload-presigned-url.yml"
19+
"$SRC_DIR/backend-for-frontend.yml" )
20+
21+
## now loop through the above array
22+
for i in "${arr[@]}"
23+
do
24+
# grab the filename without extension
25+
filename=$(basename -- "$i")
26+
# run draft...run!
27+
"$EXE" "$i" | dot -Tpng -Gdpi=$DPI > "$SRC_DIR/${filename%.*}.png"
28+
done

cmd/test.png

15.5 KB
Loading

cmd/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
title: Upload file to S3 using Lambda for pre-signed URL
2+
backgroundColor: '#ffffff'
3+
components:
4+
-
5+
kind: client
6+
label: "Web App"
7+
provider: Internet
8+
impl: SPA
9+
-
10+
kind: gateway
11+
provider: AWS
12+
impl: "API Gateway"
13+
-
14+
kind: function
15+
label: "Get\nPre-Signed URL"
16+
provider: AWS
17+
impl: "Lambda"
18+
-
19+
kind: storage
20+
label: "*.jpg\n*.png"
21+
provider: AWS
22+
impl: S3
23+
connections:
24+
-
25+
origin:
26+
componentId: cl1
27+
targets:
28+
-
29+
componentId: gt1
30+
-
31+
origin:
32+
componentId: gt1
33+
targets:
34+
-
35+
componentId: fn1
36+
-
37+
origin:
38+
componentId: fn1
39+
targets:
40+
-
41+
componentId: st1

0 commit comments

Comments
 (0)