Documentation
¶
Overview ¶
Package actorscope derives the object-storage prefixes an actor's transfers may touch from the actor record, with the access each needs. It knows no storage provider: a provider's credential exchange turns the grants into whatever scoped credential its storage supports.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Grant ¶
type Grant struct {
Prefix resources.StoragePrefix
Access Access
}
Grant is one prefix and the access allowed under it. Prefix is the actor's own prefix or a tag's prefix, as the control plane built it, so a provider derives its bucket and path with the same code the rest of Substrate uses.
func FromActor ¶
FromActor derives the grants from status.snapshots. Every snapshot the control plane writes for the actor carries a URI the control plane built, so the storage location and the tag prefixes come from those URIs, parsed with the same code that built them, and the actor's own prefix is built with the helper the control plane places snapshots with.
- Every durable URI names the storage location it sits under. For each location seen, the actor gets ReadWrite on its own prefix there, <location>/atespaces/<atespace>/actors/<uid>. So the grant exists from the first generation on, before the actor has uploaded anything, and a repointed actor keeps both locations.
- Each TAG-owned generation with a COMPLETED durable URI grants ReadOnly on the tag's prefix. That is the golden or tag the actor was created from, listed until the actor's own first snapshot completes.
The status is taken as ate-api-server wrote it. An owner this code does not know is an error, so a new kind is never silently dropped. Local-only generations have no URI and contribute nothing.