qaskx.template/other/default/sequence/definitions/sd01/sd01.mermaid.tmpl

40 lines
1.2 KiB
Cheetah
Raw Normal View History

2024-01-01 12:35:13 +00:00
2024-02-25 11:52:59 +00:00
%% Service name {{.ServicePoints}}
2024-01-01 12:35:13 +00:00
{{ range .Apis}}
%% Sequence diagram for {{ .ServiceId }} as Svc {{ .Name }}
sequenceDiagram
participant consumer as Consumer
participant gateway as Gateway
2024-02-25 11:52:59 +00:00
participant microservice as {{$.ServiceNames}}
2024-01-01 12:35:13 +00:00
{{ range $.Depends}}
participant {{ .ServiceId }} as Svc {{ .Name }}{{ end }}
2024-02-25 10:53:43 +00:00
consumer->>+gateway: {{$.ServicePoints}}
2024-01-01 12:35:13 +00:00
note right of gateway: Authentication check at GW
2024-02-25 10:53:43 +00:00
gateway->>+microservice: {{$.ServicePoints}}
2024-01-01 12:35:13 +00:00
microservice->>+authz: Validate requestor
note right of authz: Authorise to function
authz-->>-microservice: 200 or 401/403 status
microservice->>+feature: Check feature switch
feature-->>-microservice: 200 or 401/403 status
microservice->>log: log request/response
microservice-->>+{{ .ServiceId }}: link {{ .Url }}
note right of {{ .ServiceId }}: Explanation of what happens
{{ .ServiceId }}-->>-microservice: 200 OK response
alt 200 OK
microservice-->>gateway: 200 OK response
gateway-->>-consumer: 200 OK response
else not OK, error
microservice-->>-gateway: !200 ERR response
gateway-->>-consumer: !200 ERR response
end
{{ end }}