docs: sync documentation with v1.1.0 protocol and CLI changes
This commit is contained in:
+32
-42
@@ -6,33 +6,33 @@ This document explains how goget processes a download request from start to fini
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
Start([User invokes goget]):::accent0
|
||||
ParseFlags["Parse CLI flags"]:::accent7
|
||||
LoadConfig["Load config + merge overrides"]:::accent7
|
||||
ResolveProtocol["Resolve protocol handler\nfrom URL scheme"]:::accent1
|
||||
CreateRequest["Build core.DownloadRequest"]:::accent1
|
||||
CheckResume{"Resume metadata\nexists?"}:::accent2
|
||||
LoadResume["Load .goget.meta\n(resume info + chunk map)"]:::accent2
|
||||
SetupOutput["Setup output writer\n(atomic temp file + resume)"]:::accent2
|
||||
CreateDirs{"--create-dirs\n(parent missing)?"}:::accent2
|
||||
MkdirAll["os.MkdirAll → create\nparent directories"]:::accent2
|
||||
CheckParallel{"File > 100 MB\nor --parallel set?"}:::accent1
|
||||
SequentialDownload["Sequential download\n(single connection)"]:::accent1
|
||||
ParallelDownload["Parallel chunked download\n(multiple Range requests)"]:::accent1
|
||||
Decompress{"Auto-decompress\nenabled?"}:::accent7
|
||||
Decompression["Decompress response\n(gzip, deflate, bzip2, zlib)"]:::accent7
|
||||
VerifyChecksum{"Checksum\nspecified?"}:::accent7
|
||||
ChecksumVerify["Verify checksum\n(SHA-256, SHA-512, etc.)"]:::accent7
|
||||
PGPVerify{"PGP verify/\ndecrypt?"}:::accent7
|
||||
PGPProcess["Verify signature /\ndecrypt file"]:::accent7
|
||||
SaveHSTS["Save HSTS cache\n(RFC 6797)"]:::accent7
|
||||
AtomicRename["Atomic rename\ntemp → final"]:::accent2
|
||||
SigInt{"SIGINT received?"}:::accent4
|
||||
SaveSidecar["Save .goget.meta\nfor resume"]:::accent2
|
||||
Exit130["Exit 130"]:::accent4
|
||||
RunHook{"--on-complete\nset?"}:::accent7
|
||||
PostHook["Run post-download command\n(GOGET_OUTPUT, GOGET_SIZE, GOGET_URL)"]:::accent7
|
||||
Done([Done]):::accent0
|
||||
Start([User invokes goget])
|
||||
ParseFlags["Parse CLI flags"]
|
||||
LoadConfig["Load config + merge overrides"]
|
||||
ResolveProtocol["Resolve protocol handler\nfrom URL scheme"]
|
||||
CreateRequest["Build core.DownloadRequest"]
|
||||
CheckResume{"Resume metadata\nexists?"}
|
||||
LoadResume["Load .goget.meta\n(resume info + chunk map)"]
|
||||
SetupOutput["Setup output writer\n(atomic temp file + resume)"]
|
||||
CreateDirs{"--create-dirs\n(parent missing)?"}
|
||||
MkdirAll["os.MkdirAll → create\nparent directories"]
|
||||
CheckParallel{"File > 100 MB\nor --parallel set?"}
|
||||
SequentialDownload["Sequential download\n(single connection)"]
|
||||
ParallelDownload["Parallel chunked download\n(multiple Range requests)"]
|
||||
Decompress{"Auto-decompress\nenabled?"}
|
||||
Decompression["Decompress response\n(gzip, deflate, bzip2, zlib)"]
|
||||
VerifyChecksum{"Checksum\nspecified?"}
|
||||
ChecksumVerify["Verify checksum\n(SHA-256, SHA-512, etc.)"]
|
||||
PGPVerify{"PGP verify/\ndecrypt?"}
|
||||
PGPProcess["Verify signature /\ndecrypt file"]
|
||||
SaveHSTS["Save HSTS cache\n(RFC 6797)"]
|
||||
AtomicRename["Atomic rename\ntemp → final"]
|
||||
SigInt{"SIGINT received?"}
|
||||
SaveSidecar["Save .goget.meta\nfor resume"]
|
||||
Exit130["Exit 130"]
|
||||
RunHook{"--on-complete\nset?"}
|
||||
PostHook["Run post-download command\n(GOGET_OUTPUT, GOGET_SIZE, GOGET_URL)"]
|
||||
Done([Done])
|
||||
|
||||
Start --> ParseFlags --> LoadConfig --> ResolveProtocol
|
||||
ResolveProtocol --> CreateRequest --> CheckResume
|
||||
@@ -58,12 +58,6 @@ flowchart TD
|
||||
SigInt -->|No| RunHook
|
||||
RunHook -->|Yes| PostHook --> Done
|
||||
RunHook -->|No| Done
|
||||
|
||||
classDef accent0 fill:#3B82F6,stroke:#2563EB,color:#fff
|
||||
classDef accent1 fill:#22C55E,stroke:#16A34A,color:#fff
|
||||
classDef accent2 fill:#F59E0B,stroke:#D97706,color:#000
|
||||
classDef accent4 fill:#EF4444,stroke:#DC2626,color:#fff
|
||||
classDef accent7 fill:#64748B,stroke:#475569,color:#fff
|
||||
```
|
||||
|
||||
## Phase 1: Request Construction
|
||||
@@ -94,17 +88,13 @@ The protocol registry resolves the handler by URL scheme:
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
URL["https://example.com"]:::accent6
|
||||
Parse["Parse scheme\n→ https"]:::accent7
|
||||
Normalized["Normalize\nhttps → http"]:::accent7
|
||||
Registry["Registry lookup\nprotocols[http]"]:::accent1
|
||||
Handler["HTTP protocol\nhandler"]:::accent1
|
||||
URL["https://example.com"]
|
||||
Parse["Parse scheme\n→ https"]
|
||||
Normalized["Normalize\nhttps → http"]
|
||||
Registry["Registry lookup\nprotocols[http]"]
|
||||
Handler["HTTP protocol\nhandler"]
|
||||
|
||||
URL --> Parse --> Normalized --> Registry --> Handler
|
||||
|
||||
classDef accent1 fill:#22C55E,stroke:#16A34A,color:#fff
|
||||
classDef accent6 fill:#6366F1,stroke:#4F46E5,color:#fff
|
||||
classDef accent7 fill:#64748B,stroke:#475569,color:#fff
|
||||
```
|
||||
|
||||
Scheme normalization maps:
|
||||
|
||||
Reference in New Issue
Block a user