Documentation
¶
Overview ¶
Package clankcli provides the root cobra command for the clank binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PreviewLink ¶
type PreviewLink struct {
GatewayURL string
Alts []string
HostKey string
PreviewURL string
SessionID string
LocalPath string
Backend string
Name string
WorktreeID string
}
PreviewLink is the payload carried by the QR.
- GatewayURL (+ Alts): where the phone reaches the daemon's bridge — the candidate set it remembers and probes on every reconnect.
- HostKey: the laptop's identity public key. The phone pins it and verifies every probe answer against it, so a remembered address that got reassigned can't impersonate the laptop.
- PreviewURL: the dev server to open.
- SessionID: optional legacy field retained so older links remain readable.
- LocalPath + Backend: when there's no SessionID, the phone creates the session itself on the first message — same call it makes for cloud worktrees, with LocalPath instead of WorktreeID.
- WorktreeID: the preview key (folder slug) — lets the phone poll the dev server's status/logs through the gateway while Metro boots, instead of hitting a not-yet-listening port raw.
func ParsePreviewLink ¶
func ParsePreviewLink(s string) (PreviewLink, error)
ParsePreviewLink is the inverse of Encode. It exists mainly so a Go test can assert the round-trip the mobile parser must also satisfy.
func (PreviewLink) Encode ¶
func (l PreviewLink) Encode() (string, error)
Encode renders the link as a clank://link URL. GatewayURL and HostKey are required — a link that names no gateway, or one the phone couldn't verify a probe against, is a programmer error, not a partial-but-usable payload.
Source Files
¶
- clankcli.go
- connect.go
- connect_firstrun.go
- connect_run.go
- fix.go
- github.go
- github_pull_request.go
- github_pull_request_hosted.go
- login.go
- logout.go
- pair.go
- pairing_loop.go
- please.go
- preview.go
- preview_attach.go
- preview_attach_run.go
- preview_attach_session.go
- preview_launch.go
- preview_link.go
- preview_logs.go
- preview_qr.go
- preview_ready.go
- preview_run.go
- preview_setup.go
- preview_setup_finish.go
- preview_setup_session.go
- preview_watch.go
- preview_web.go
- remote.go
- remote_target.go
- session_create.go
- spawn_daemon.go
- spawn_daemon_unix.go
- style.go
- terminal.go
- version.go
Click to show internal directories.
Click to hide internal directories.