Versions in this module Expand all Collapse all v0 v0.1.13 Oct 11, 2026 Changes in this version + const SourceDraft + const SourcePublished + const SourceWorkspace + var ErrChanged = errors.New("workspace: changed since it was read") + var Missing any = missing + func IsMissing(v any) bool + func NewID() string + type Change struct + Path Path + Value any + type Conflict struct + ID string + Path Path + Pinned bool + Ref Ref + Source Source + Theirs any + TheirsGone bool + type Item struct + Value any + type LogEntry struct + At time.Time + By string + Items []Ref + Note string + Op string + Version int64 + type MemoryStore struct + func NewMemoryStore(now func() time.Time) *MemoryStore + func (m *MemoryStore) PutWorkspace(_ context.Context, w Workspace, expected int64, entry LogEntry) (Workspace, error) + func (m *MemoryStore) Workspace(_ context.Context, username string) (Workspace, bool, error) + func (m *MemoryStore) WorkspaceLog(_ context.Context, username string, limit int) ([]LogEntry, error) + type Note struct + By string + Source string + Text string + type Open struct + Mine any + TheirsValue any + type Path []Step + func (p Path) Pattern() string + func (p Path) String() string + type Ref struct + Key string + Kind string + type Schema struct + Lists map[string]string + Unset map[string]bool + func (s Schema) Canonical(v any) string + func (s Schema) Carry(pending, found []Conflict, now, base Snapshot, source *Source) []Conflict + func (s Schema) Diff(a, b any) []Change + func (s Schema) GetAt(root any, path Path) any + func (s Schema) Merge(base, local, next any, path Path) (any, []ValueConflict) + func (s Schema) OpenConflicts(now, base Snapshot, cs []Conflict) []Open + func (s Schema) Replay(old, local, next Snapshot, source Source, pinned bool) (Snapshot, []Conflict) + func (s Schema) Resolve(now, base Snapshot, cs []Conflict, id string, theirs bool) (Snapshot, []Conflict, bool) + func (s Schema) Same(a, b any) bool + func (s Schema) SetAt(root any, path Path, value any) any + func (s Schema) View(now, base Snapshot, c Conflict) (Open, bool) + func (sc Schema) Changes(a, b Snapshot) []Ref + type Snapshot []Item + func (s Snapshot) Apply(values map[Ref]any, order []Ref) Snapshot + func (s Snapshot) Get(ref Ref) any + func (s Snapshot) Index() map[Ref]int + func (s Snapshot) With(ref Ref, value any) Snapshot + type Source struct + By string + ID string + Kind string + type Step struct + Element string + Field string + type Store interface + PutWorkspace func(ctx context.Context, w Workspace, expected int64, entry LogEntry) (Workspace, error) + Workspace func(ctx context.Context, username string) (Workspace, bool, error) + WorkspaceLog func(ctx context.Context, username string, limit int) ([]LogEntry, error) + type ValueConflict struct + Mine any + Path Path + Theirs any + type Workspace struct + Base int64 + Checkpoint int64 + CheckpointAt int64 + Conflicts []Conflict + Items Snapshot + Notes []Note + Taken []int64 + UpdatedAt time.Time + UpdatedBy string + Username string + Version int64