Skip to content

Commit

Permalink
feat(aws-v2): add Relationship
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorin committed Feb 6, 2020
1 parent 72daee3 commit 4f0c9d6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
14 changes: 7 additions & 7 deletions aws-v2/example-git_to_s3_webhooks.puml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@startuml
'!global $INCLUSION_MODE="local"
'!include library.puml
!global $INCLUSION_MODE="local"
!include library.puml

!global $AWS_LIB_BRANCH="master"
!global $AWS_LIB_BASE_URL="https://raw.githubusercontent.com/tmorin/plantuml-libs/" + $AWS_LIB_BRANCH + "/aws-v2"
!includeurl $AWS_LIB_BASE_URL/library.puml
'!global $AWS_LIB_BRANCH="master"
'!global $AWS_LIB_BASE_URL="https://raw.githubusercontent.com/tmorin/plantuml-libs/" + $AWS_LIB_BRANCH + "/aws-v2"
'!includeurl $AWS_LIB_BASE_URL/library.puml

includeSubLibrary("groups")
includeSubLibrary("elements/Compute")
Expand All @@ -24,8 +24,8 @@ GroupAwsCloud('aws') {
AmazonSimpleStorageServiceS3BucketWithObjects("bucket_output", "Amazon S3 output bucket")
}

git_users -down-> git_server : git push
git_server -down-> lambda0 : git webhook
git_users -down-> git_server : Relationship("git push", "ssh")
git_server -down-> lambda0 : Relationship("git webhook", "https")
lambda0 -down-> lambda1
lambda1 -down-> bucket_ssh
lambda1 -down-> kms
Expand Down
19 changes: 19 additions & 0 deletions aws-v2/functions.puml
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
@startuml

' Icons

!function getIconPath($size, $name) return $IMAGE_BASE_PATH + "icons-" + $size + "x" + $size + "/" + $name + ".png"
!function get50Path($name) return getIconPath("50", $name)
!function getIcon($name) return get50Path($name)

' Inclusion

!function includeSubLibrary($name)
!if (%get_variable_value("$INCLUSION_MODE") == "remote")
!includeurl $AWS_LIB_BASE_URL/$name.puml
!else
!include $name.puml
!endif
!endfunction

' Relationship

!function Relationship($desc="", $tech="")
!if ($desc) && ($tech)
<b><size:12>$desc</size></b>\n<size:11>[$tech]</size>
!elseif ($desc)
<b><size:12>$desc</size></b>
!else
<size:11>[$tech]</size>
!endif
!endfunction

@enduml

0 comments on commit 4f0c9d6

Please sign in to comment.