From deab0f5484818d5ac6b981f698770795107667e6 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Thu, 3 Aug 2023 18:40:23 +0200 Subject: [PATCH] deside howto create gittrust --- doc/dev/architecture.md | 68 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/doc/dev/architecture.md b/doc/dev/architecture.md index e69de29..706dbf9 100644 --- a/doc/dev/architecture.md +++ b/doc/dev/architecture.md @@ -0,0 +1,68 @@ + +## Initialization + +```mermaid +sequenceDiagram + actor user + participant app as Application + participant ds as DesktopService + participant gtr as GitTrustFactory + participant pa as CliArgumentsParser + participant cr as DesktopConfigRepository + participant ut as CliUtils + participant su as ProvsWithSudo + + user ->> app: main + activate app + app ->> pa: parseCommands + app ->> cr: getConfig(configFileName) + app ->> ut: createProvInstance(cmd.target) + app ->> su: ensureSudoWithoutPassword(cmd.target.remoteTarget()?.password) + app ->> ds: provisionDesktopCommand(cmd, config) + activate ds + ds ->> gtr : get("github", "gitlab") + gtr -->> ds: GitTrust + deactivate ds + deactivate app +``` + +## Domain + +```mermaid +classDiagram + namespace configuration { + class TargetCliCommand { + val target: String, + val passwordInteractive: Boolean = false + } + class ConfigFileName { + fileName: String + } + } + + namespace desktop { + class DesktopCliCommand { + } + + class DesktopConfig { + val ssh: SshKeyPairSource? = null, + val gpg: KeyPairSource? = null, + val gitUserName: String? = null, + val gitEmail: String? = null, + } + + class DesktopType { + val name: String + } + class DesktopOnlyModule { + <> + FIREFOX, VERIFY + } + } + + DesktopCliCommand "1" *-- "1" DesktopType: type + DesktopCliCommand "1" *-- "1" TargetCliCommand: target + DesktopCliCommand "1" *-- "1" ConfigFileName: configFile + DesktopCliCommand "1" *-- "..n" DesktopOnlyModule: onlyModules + +``` \ No newline at end of file