ordinaryoutput

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: AGPL-3.0, AGPL-3.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ordinaryoutput owns construction-time policy for ordinary native receive output. It deliberately contains no persisted receive contract.

Index

Constants

View Source
const (
	// OrdinaryOutputPolicyVersion separates active operations when any ordinary
	// layout, lookup, suffix, reservation, cleanup, or shape-budget semantic changes.
	OrdinaryOutputPolicyVersion = uint8(1)

	// MaximumResultNameReservationAttemptsV1 admits collision indexes 0 through 31.
	MaximumResultNameReservationAttemptsV1 = uint32(32)
)

Variables

View Source
var (
	ErrInvalidSourceCatalogPath   = errors.New("ordinary output source catalog path is invalid")
	ErrInvalidArtifactPath        = errors.New("ordinary output artifact path is invalid")
	ErrInvalidAuthenticatedSource = errors.New("ordinary output authenticated source node is invalid")
	ErrInvalidArtifactProjector   = errors.New("ordinary output artifact path projector is invalid")
)
View Source
var DefaultShapeProbeBudgetV1 = mustShapeProbeBudget(
	32,
	128,
	32_768,
	8*1024*1024,
	catalog.MaxPathDepth,
)
View Source
var ErrInvalidShapeResolution = errors.New("ordinary output shape resolution is invalid")

Functions

This section is empty.

Types

type ArtifactPath

type ArtifactPath struct {
	// contains filtered or unexported fields
}

ArtifactPath is a logical output coordinate. It never contains the collision-adjusted physical reservation name.

func NewArtifactPath

func NewArtifactPath(value string) (ArtifactPath, error)

func (ArtifactPath) String

func (path ArtifactPath) String() string

func (ArtifactPath) Valid

func (path ArtifactPath) Valid() bool

type ArtifactPathProjection

type ArtifactPathProjection struct {
	// contains filtered or unexported fields
}

func MaterializeArtifactProjection

func MaterializeArtifactProjection(path ArtifactPath) (ArtifactPathProjection, error)

MaterializeArtifactProjection constructs one already-validated logical artifact claim. Production transfer code normally obtains this from Project; the constructor keeps executor tests explicit without exposing struct fields.

func TraverseOnlyProjection

func TraverseOnlyProjection() ArtifactPathProjection

TraverseOnlyProjection constructs the absence of destination authority for a source directory that is needed solely to authenticate selected ancestry.

func (ArtifactPathProjection) ArtifactPath

func (projection ArtifactPathProjection) ArtifactPath() (ArtifactPath, bool)

func (ArtifactPathProjection) Kind

func (ArtifactPathProjection) RejectReason

func (projection ArtifactPathProjection) RejectReason() ArtifactRejectReason

type ArtifactPathProjector

type ArtifactPathProjector struct {
	// contains filtered or unexported fields
}

ArtifactPathProjector is immutable after construction. Project has no state, I/O, or destination authority.

func NewArtifactPathProjector

func NewArtifactPathProjector(
	syntheticRoot catalog.DirectoryID,
	artifact receivecontract.ArtifactSpec,
) (ArtifactPathProjector, error)

NewArtifactPathProjector validates the canonical artifact once. There is no constructor that accepts a free-form preferred name, so receivecontract remains the only naming authority.

func (ArtifactPathProjector) Project

type ArtifactProjectionKind

type ArtifactProjectionKind uint8
const (
	ArtifactTraverseOnly ArtifactProjectionKind = iota + 1
	ArtifactMaterialize
	ArtifactReject
)

func (ArtifactProjectionKind) Valid

func (kind ArtifactProjectionKind) Valid() bool

type ArtifactRejectReason

type ArtifactRejectReason uint8
const (
	ArtifactRejectNone ArtifactRejectReason = iota
	ArtifactRejectInvalidSource
	ArtifactRejectWrongRole
	ArtifactRejectWrongKind
	ArtifactRejectWrongIdentity
	ArtifactRejectUnrelatedSource
)

func (ArtifactRejectReason) Valid

func (reason ArtifactRejectReason) Valid() bool

type AuthenticatedSourceNode

type AuthenticatedSourceNode struct {
	// contains filtered or unexported fields
}

AuthenticatedSourceNode keeps sender identity and source ancestry independent from the projected artifact coordinate.

func NewAuthenticatedDirectorySourceNode

func NewAuthenticatedDirectorySourceNode(
	directory catalog.DirectoryID,
	sourcePath SourceCatalogPath,
	role SourceNodeRole,
) (AuthenticatedSourceNode, error)

func NewAuthenticatedFileSourceNode

func NewAuthenticatedFileSourceNode(
	file catalog.FileID,
	sourcePath SourceCatalogPath,
	role SourceNodeRole,
) (AuthenticatedSourceNode, error)

func (AuthenticatedSourceNode) Kind

func (AuthenticatedSourceNode) NodeID

func (node AuthenticatedSourceNode) NodeID() catalog.NodeID

func (AuthenticatedSourceNode) Role

func (AuthenticatedSourceNode) SourcePath

func (node AuthenticatedSourceNode) SourcePath() SourceCatalogPath

type OpaqueSelectionTarget

type OpaqueSelectionTarget struct {
	// contains filtered or unexported fields
}

func NewOpaqueDirectoryTarget

func NewOpaqueDirectoryTarget(
	directory catalog.DirectoryID,
	selected bool,
) (OpaqueSelectionTarget, error)

func NewOpaqueFileTarget

func NewOpaqueFileTarget(file catalog.FileID, selected bool) (OpaqueSelectionTarget, error)

func (OpaqueSelectionTarget) Kind

func (target OpaqueSelectionTarget) Kind() catalog.NodeKind

func (OpaqueSelectionTarget) NodeID

func (target OpaqueSelectionTarget) NodeID() catalog.NodeID

func (OpaqueSelectionTarget) Selected

func (target OpaqueSelectionTarget) Selected() bool

type Selection

type Selection struct {
	// contains filtered or unexported fields
}

func NewCatalogPathSelection

func NewCatalogPathSelection(
	share catalog.ShareInstance,
	syntheticRoot catalog.DirectoryID,
	digest [32]byte,
	targets []string,
) (Selection, error)

func NewOpaqueNodeSelection

func NewOpaqueNodeSelection(
	share catalog.ShareInstance,
	syntheticRoot catalog.DirectoryID,
	digest [32]byte,
	defaultSelected bool,
	targets []OpaqueSelectionTarget,
) (Selection, error)

func NewWholeShareSelection

func NewWholeShareSelection(
	share catalog.ShareInstance,
	syntheticRoot catalog.DirectoryID,
	digest [32]byte,
) (Selection, error)

func (Selection) Digest

func (selection Selection) Digest() [32]byte

type SelectionMode

type SelectionMode uint8

SelectionMode is deliberately local: the parent transfer package lowers its closed canonical selection state into this immutable proof input.

const (
	SelectionWholeShare SelectionMode = iota + 1
	SelectionCatalogPaths
	SelectionOpaqueNodes
)

type ShapeCatalog

type ShapeCatalog interface {
	OpenDirectoryPages(context.Context, catalog.DirectoryID) (catalog.DirectoryPageCursor, error)
}

type ShapeDecision

type ShapeDecision struct {
	// contains filtered or unexported fields
}

ShapeDecision contains only the immutable scalar result of construction-time proof. No generation, page, target list, manifest, or content fact survives.

func NewCompleteDirectoryShape

func NewCompleteDirectoryShape(
	directory catalog.DirectoryID,
	sourcePath string,
) (ShapeDecision, error)

func NewPartialDirectoryShape

func NewPartialDirectoryShape(
	directory catalog.DirectoryID,
	sourcePath string,
) (ShapeDecision, error)

func NewSingleFileShape

func NewSingleFileShape(file catalog.FileID, sourcePath string) (ShapeDecision, error)

func NewSyntheticSelectionShape

func NewSyntheticSelectionShape(reason ShapeFallbackReason) (ShapeDecision, error)

func ResolveShape

func ResolveShape(
	ctx context.Context,
	source ShapeCatalog,
	selection Selection,
	budget ShapeProbeBudget,
) (ShapeDecision, error)

func (ShapeDecision) DirectoryID

func (decision ShapeDecision) DirectoryID() catalog.DirectoryID

func (ShapeDecision) FallbackReason

func (decision ShapeDecision) FallbackReason() ShapeFallbackReason

func (ShapeDecision) FileID

func (decision ShapeDecision) FileID() catalog.FileID

func (ShapeDecision) Kind

func (decision ShapeDecision) Kind() ShapeKind

func (ShapeDecision) PreferredName

func (decision ShapeDecision) PreferredName() string

func (ShapeDecision) SourcePath

func (decision ShapeDecision) SourcePath() string

func (ShapeDecision) Valid

func (decision ShapeDecision) Valid() bool

type ShapeFallbackReason

type ShapeFallbackReason uint8
const (
	ShapeFallbackNone ShapeFallbackReason = iota
	ShapeFallbackMultipleRoots
	ShapeFallbackSyntheticNearestAncestor
	ShapeFallbackOpaqueAncestryUnprovable
	ShapeFallbackPageBudget
	ShapeFallbackEntryBudget
	ShapeFallbackMetadataBudget
	ShapeFallbackDepthBudget
	ShapeFallbackDirectoryRequestBudget
	ShapeFallbackUnsupportedRuleProof
	ShapeFallbackUnresolvedTarget
	ShapeFallbackIncompleteGeneration
)

func (ShapeFallbackReason) Valid

func (reason ShapeFallbackReason) Valid() bool

type ShapeKind

type ShapeKind uint8
const (
	ShapeSingleFile ShapeKind = iota + 1
	ShapeCompleteDirectory
	ShapePartialDirectory
	ShapeSyntheticSelection
)

func (ShapeKind) Valid

func (kind ShapeKind) Valid() bool

type ShapeProbeBudget

type ShapeProbeBudget struct {
	// contains filtered or unexported fields
}

ShapeProbeBudget bounds authenticated metadata work before shape resolution freezes the synthetic ordinary-output fallback.

func NewShapeProbeBudget

func NewShapeProbeBudget(
	directoryRequests uint32,
	authenticatedPages uint32,
	entries uint32,
	authenticatedMetadata uint64,
	depth uint32,
) (ShapeProbeBudget, bool)

func (ShapeProbeBudget) AuthenticatedMetadataBytes

func (budget ShapeProbeBudget) AuthenticatedMetadataBytes() uint64

func (ShapeProbeBudget) AuthenticatedPages

func (budget ShapeProbeBudget) AuthenticatedPages() uint32

func (ShapeProbeBudget) Depth

func (budget ShapeProbeBudget) Depth() uint32

func (ShapeProbeBudget) DirectoryRequests

func (budget ShapeProbeBudget) DirectoryRequests() uint32

func (ShapeProbeBudget) Entries

func (budget ShapeProbeBudget) Entries() uint32

func (ShapeProbeBudget) Valid

func (budget ShapeProbeBudget) Valid() bool

type SourceCatalogPath

type SourceCatalogPath struct {
	// contains filtered or unexported fields
}

SourceCatalogPath is an authenticated sender-side coordinate. The synthetic root is represented only by EmptySourceCatalogPath.

func EmptySourceCatalogPath

func EmptySourceCatalogPath() SourceCatalogPath

func NewSourceCatalogPath

func NewSourceCatalogPath(value string) (SourceCatalogPath, error)

func (SourceCatalogPath) IsRoot

func (path SourceCatalogPath) IsRoot() bool

func (SourceCatalogPath) String

func (path SourceCatalogPath) String() string

func (SourceCatalogPath) Valid

func (path SourceCatalogPath) Valid() bool

type SourceNodeRole

type SourceNodeRole uint8
const (
	SourceNodeSelected SourceNodeRole = iota + 1
	SourceNodeConnectsSelection
)

func (SourceNodeRole) Valid

func (role SourceNodeRole) Valid() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL