qaskx.template/document/localhost/sequence/definitions/sd01/sd01.mermaid.tmpl

40 lines
1.2 KiB
Cheetah

%% Service name {{.ServicePoints}}
{{ range .Apis}}
%% Sequence diagram for {{ .ServiceId }} as Svc {{ .Name }}
sequenceDiagram
participant consumer as Consumer
participant gateway as Gateway
participant microservice as {{$.ServiceNames}}
{{ range $.Depends}}
participant {{ .ServiceId }} as Svc {{ .Name }}{{ end }}
consumer->>+gateway: {{$.ServicePoints}}
note right of gateway: Authentication check at GW
gateway->>+microservice: {{$.ServicePoints}}
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 }}