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

Commit

Permalink
[issue #1] common provider for one or more nodes
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
lucasepe committed Jun 8, 2020
1 parent 931c65e commit ade166b
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 2 deletions.
2 changes: 0 additions & 2 deletions cmd/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ dist/**
# Goreleaser file
.goreleaser.yml

# Custom Bash Scripts
draft-all.sh
28 changes: 28 additions & 0 deletions cmd/draft-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

SRC_DIR=../examples
DPI=120
EXE=./dist/draft_linux_amd64/draft

## declare an array of files
declare -a arr=("$SRC_DIR/client.yml"
"$SRC_DIR/service.yml"
"$SRC_DIR/broker.yml"
"$SRC_DIR/gateway.yml"
"$SRC_DIR/queue.yml"
"$SRC_DIR/function.yml"
"$SRC_DIR/database.yml"
"$SRC_DIR/storage.yml"
"$SRC_DIR/message-bus-pattern.yml"
"$SRC_DIR/aws-cognito-custom-auth-flow.yml"
"$SRC_DIR/s3-upload-presigned-url.yml"
"$SRC_DIR/backend-for-frontend.yml" )

## now loop through the above array
for i in "${arr[@]}"
do
# grab the filename without extension
filename=$(basename -- "$i")
# run draft...run!
"$EXE" "$i" | dot -Tpng -Gdpi=$DPI > "$SRC_DIR/${filename%.*}.png"
done
Binary file added cmd/test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions cmd/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
title: Upload file to S3 using Lambda for pre-signed URL
backgroundColor: '#ffffff'
components:
-
kind: client
label: "Web App"
provider: Internet
impl: SPA
-
kind: gateway
provider: AWS
impl: "API Gateway"
-
kind: function
label: "Get\nPre-Signed URL"
provider: AWS
impl: "Lambda"
-
kind: storage
label: "*.jpg\n*.png"
provider: AWS
impl: S3
connections:
-
origin:
componentId: cl1
targets:
-
componentId: gt1
-
origin:
componentId: gt1
targets:
-
componentId: fn1
-
origin:
componentId: fn1
targets:
-
componentId: st1

0 comments on commit ade166b

Please sign in to comment.