Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Projection ¶
type Projection struct {
Ref string
Digest string
Resources []contract.ResourceVersion
Content []ResourceContent
Feedback []contract.Decision // pull channel (Invariant #8)
}
func Build ¶
func Build(s *store.Store, refs []contract.ResourceRef, forActor contract.ActorID) Projection
Build materializes a read-only view over refs for forActor. The context digest folds, per resource in a stable order, Kind:ID:Version AND the canonical field bytes (D8/S10) — so a content tamper that preserves the version is still detectable (a digest covering only Kind:ID:Version would miss it).
func ScopedView ¶
func ScopedView(s *store.Store, sub contract.Subscription) Projection
ScopedView builds the server-enforced, scoped projection for a subscription (S9): ONLY sub.Refs are materialized, so an out-of-scope resource can never cross the wire. Identity (forActor) is the subscription's actor — the server passes the AUTHENTICATED principal here, never a client-named scope. (PrivacyTier is reserved for a future per-resource tier filter; today the ref set IS the scope.)
type ResourceContent ¶
type ResourceContent struct {
Ref contract.ResourceRef `json:"ref"`
Version contract.Version `json:"version"`
Fields map[string]any `json:"fields"`
}
ResourceContent carries the scoped fields for a materialized resource. It is populated from the same refs used for Resources, so content and versions share one server-enforced scope.