Documentation
¶
Overview ¶
SPDX-License-Identifier: Apache-2.0 The door is a generated view. It is never the source of truth, and never hand-edited.
Index ¶
- Variables
- func Auto(ws *store.Workspace) bool
- func Door(ws *store.Workspace) string
- func DoorFrom(s jsonx.Obj) string
- func Drift(ws *store.Workspace, text string) (drift bool, found, want string)
- func Snapshot(ws *store.Workspace) jsonx.Obj
- func StateKey(ws *store.Workspace) string
- func StateKeyOf(s jsonx.Obj) string
- func StatusText(ws *store.Workspace, mine string, wide bool) string
Constants ¶
This section is empty.
Variables ¶
var StateKeyRE = regexp.MustCompile(`state:([0-9a-f]{12})`)
StateKeyRE finds the recorded state hash inside a generated view.
Functions ¶
func Auto ¶
Auto keeps the door fresh after anything that changes state. A stale view must never fail a real operation, so failures are swallowed.
func DoorFrom ¶ added in v0.2.2
DoorFrom renders one snapshot into one document: body and stamp always agree.
func StateKey ¶
StateKey hashes everything that matters with wall-clock noise removed, so that --check answers "is this view stale?" and not "did a second pass?".
func StateKeyOf ¶ added in v0.2.2
StateKeyOf hashes an already-taken snapshot. Taking a second snapshot for the hash lets a claim appear between the two, and then the stamp certifies a body that was never rendered: --check passes on a door that is already wrong.
Types ¶
This section is empty.