Documentation
¶
Index ¶
- Constants
- Variables
- func NormalizePythonDistributionNameV1(name string) string
- func PythonPackageRootDistributionNameV1(requirement string) (string, error)
- func PythonPackageRootRequirementsCompatibleV1(requirements []string) (bool, error)
- func ValidateBindingArtifactReferencePlatformV1(artifact RecordReferenceV1, platform string) error
- func ValidateBindingBundledComponentAgreementV1(contract, artifact []BundledComponentV1) error
- func ValidateBindingCLIExportV1(export ToolExportV1) error
- func ValidateBindingRecordReferencesV1(contract, artifact RecordReferenceV1) error
- func ValidateBindingWheelTagsForPlatformV1(tags []string, platform string) error
- func ValidatePythonInterpreterVersionV1(value string) error
- func ValidatePythonPackageRootRequirementsV1(requirements []string) error
- func ValidatePythonRequiresPythonV1(value string) error
- func ValidateRecordEnvelopeV1(record canonical.Envelope) error
- func ValidateWheelTagV1(tag string) error
- type ArtifactSourceMappingV1
- type ArtifactSourceRecordV1
- type BindingArtifactRecordV1
- type BindingContractV1
- type BindingSetSchemaV1
- type BundledComponentV1
- type IntegrationFixtureRecordV1
- type NativePackageSetV1
- type PayloadRecordV1
- type RecordEnvironmentVariableV1
- type RecordProbeV1
- type RecordReferenceV1
- type RecordRuntimeV1
- type RecordV1
- type ReleaseContractV1
- type ReleaseManifestV1
- type SelectionCombinationV1
- type SelectionDimensionV1
- type SelectionSchemaV1
- type TargetBindingV1
- type TargetIdentityV1
- type TargetRecordV1
- type TargetSelectionV1
- type TargetSupportCaseV1
- type ToolExportV1
- type ToolRecordV1
- type ValidationEvidenceV1
- type ValidationProfileRecordV1
- type WheelFilenameProjectionV1
- type WheelPlatformProjectionV1
Constants ¶
const ( WheelPlatformAnyV1 = "any" WheelPlatformLinuxV1 = "linux" WheelPlatformManylinuxV1 = "manylinux" )
const ( ToolRecordSchemaV1 = "portable-tool-v1" ReleaseManifestSchemaV1 = "portable-tool-release-manifest-v1" ReleaseContractSchemaV1 = "portable-tool-release-contract-v1" TargetRecordSchemaV1 = "portable-tool-target-v1" BindingContractSchemaV1 = "portable-tool-python-binding-v1" BindingArtifactSchemaV1 = "portable-tool-python-wheel-artifact-v1" PayloadRecordSchemaV1 = "portable-tool-payload-v1" ArtifactSourceRecordSchemaV1 = "portable-tool-artifact-source-v1" NativePackageSetSchemaV1 = "portable-tool-package-set-v1" IntegrationFixtureSchemaV1 = "portable-tool-integration-fixture-v1" ValidationProfileSchemaV1 = "portable-tool-validation-profile-v1" ValidationEvidenceSchemaV1 = "portable-tool-validation-evidence-v1" SelectedClosureIdentityV1 = "portable-tool-selected-closure-v1" RecordIdentitySchemaV1 = "portable-tool-record-v1" PayloadSymbolicLinkPolicyRejectV1 = "reject" PayloadSymbolicLinkPolicyMaterializeRegularTargetV1 = "materialize-regular-target" )
const RecordArrayMaxEntriesV1 = portableToolCatalogMaxReferencesV1
RecordArrayMaxEntriesV1 is the shared per-record array ceiling applied by strict portable-tool records and their provider-owned projections.
Variables ¶
var ErrPythonPackageRootCompatibilityUnprovenV1 = errors.New("Python package root compatibility cannot be proven for the admitted PEP 440 constraints")
ErrPythonPackageRootCompatibilityUnprovenV1 marks a valid conjunction whose nonempty intersection cannot be established by the bounded local proof.
Functions ¶
func NormalizePythonDistributionNameV1 ¶
NormalizePythonDistributionNameV1 returns the canonical PEP 503 spelling used by portable-tool binding records.
func PythonPackageRootDistributionNameV1 ¶
PythonPackageRootDistributionNameV1 extracts the immutable direct distribution identity from a binding requirement.
func PythonPackageRootRequirementsCompatibleV1 ¶
PythonPackageRootRequirementsCompatibleV1 reports whether constraints for one direct distribution have a nonempty intersection. Exact PEP 440 pins, including prerelease, local, and arbitrary equality, are checked against the complete conjunction. A valid form that the bounded interval model cannot represent fails closed unless an exact candidate proves the full conjunction.
func ValidateBindingArtifactReferencePlatformV1 ¶
func ValidateBindingArtifactReferencePlatformV1(artifact RecordReferenceV1, platform string) error
ValidateBindingArtifactReferencePlatformV1 requires a canonical binding artifact reference to name the same target as its projected wheel metadata.
func ValidateBindingBundledComponentAgreementV1 ¶
func ValidateBindingBundledComponentAgreementV1(contract, artifact []BundledComponentV1) error
ValidateBindingBundledComponentAgreementV1 requires every bundled component declared by a contract to be present with the same version and path in its selected artifact. Artifact-only inventory entries remain exact artifact metadata and are permitted.
func ValidateBindingCLIExportV1 ¶
func ValidateBindingCLIExportV1(export ToolExportV1) error
ValidateBindingCLIExportV1 applies the canonical name and absolute non-root slash-path grammar shared by binding contracts and provider projections.
func ValidateBindingRecordReferencesV1 ¶
func ValidateBindingRecordReferencesV1(contract, artifact RecordReferenceV1) error
ValidateBindingRecordReferencesV1 validates the exact contract and artifact references carried by a projected Python binding. The references must use their canonical record categories and name the same release and binding.
func ValidateBindingWheelTagsForPlatformV1 ¶
ValidateBindingWheelTagsForPlatformV1 applies the strict artifact-record platform check to every exact wheel tag without imposing provider runtime eligibility policy on the tag's Python or ABI fields.
func ValidatePythonInterpreterVersionV1 ¶
ValidatePythonInterpreterVersionV1 accepts the canonical major.minor or major.minor.patch form used by portable-tool binding records.
func ValidatePythonPackageRootRequirementsV1 ¶
ValidatePythonPackageRootRequirementsV1 requires one canonical package-root requirement per normalized distribution, matching binding-contract records.
func ValidatePythonRequiresPythonV1 ¶
ValidatePythonRequiresPythonV1 requires the canonical PEP 440 spelling used by exact binding artifact records and provider projections.
func ValidateRecordEnvelopeV1 ¶
ValidateRecordEnvelopeV1 applies the complete canonical catalog constraints for record kinds persisted in provider plans and build locks. Catalog loading and locked replay call this same implementation so a record rejected at publication cannot become acceptable after it is locked.
func ValidateWheelTagV1 ¶
ValidateWheelTagV1 validates one exact canonical three-part wheel tag. Compatibility groups in wheel filenames may use dots for expansion, but an expanded tag itself must contain exactly three nonempty components.
Types ¶
type ArtifactSourceMappingV1 ¶
type ArtifactSourceMappingV1 struct {
ArtifactSHA256 canonical.Digest `json:"artifact_sha256"`
Artifact RecordReferenceV1 `json:"artifact"`
Source RecordReferenceV1 `json:"source"`
}
type ArtifactSourceRecordV1 ¶
type BindingArtifactRecordV1 ¶
type BindingArtifactRecordV1 struct {
Schema string `json:"schema"`
ID string `json:"id"`
Binding string `json:"binding"`
Contract RecordReferenceV1 `json:"contract"`
Name string `json:"name"`
EcosystemVersion string `json:"ecosystem_version"`
Platform string `json:"platform"`
Filename string `json:"filename"`
Size string `json:"size"`
SHA256 canonical.Digest `json:"sha256"`
Resolver string `json:"resolver"`
Tags []string `json:"tags"`
RequiresPython string `json:"requires_python"`
BundledComponents []BundledComponentV1 `json:"bundled_components"`
}
type BindingContractV1 ¶
type BindingContractV1 struct {
Schema string `json:"schema"`
ID string `json:"id"`
Name string `json:"name"`
Package string `json:"package"`
Requirements []string `json:"requirements"`
SupportedPython []string `json:"supported_python"`
SupportedTags []string `json:"supported_tags"`
BundledComponents []BundledComponentV1 `json:"bundled_components"`
CLI ToolExportV1 `json:"cli"`
}
type BindingSetSchemaV1 ¶
type BindingSetSchemaV1 struct {
Options []string `json:"options"`
}
type BundledComponentV1 ¶
type IntegrationFixtureRecordV1 ¶
type IntegrationFixtureRecordV1 struct {
Schema string `json:"schema"`
ID string `json:"id"`
Name string `json:"name"`
Target TargetIdentityV1 `json:"target"`
BaseImage string `json:"base_image"`
BaseImageDigest canonical.Digest `json:"base_image_digest"`
Context string `json:"context"`
Bindings []string `json:"bindings"`
Selections map[string][]string `json:"selections"`
ValidationProfiles []RecordReferenceV1 `json:"validation_profiles"`
}
type NativePackageSetV1 ¶
type PayloadRecordV1 ¶
type PayloadRecordV1 struct {
Schema string `json:"schema"`
ID string `json:"id"`
Name string `json:"name"`
Revision string `json:"revision"`
UpstreamVersion string `json:"upstream_version"`
Platform string `json:"platform"`
LogicalPath string `json:"logical_path"`
Kind string `json:"kind"`
Size string `json:"size"`
SHA256 canonical.Digest `json:"sha256"`
Resolver string `json:"resolver"`
Entries string `json:"entries"`
UnpackedSize string `json:"unpacked_size"`
InstallDirectory string `json:"install_directory"`
ArchiveRoot string `json:"archive_root"`
SymbolicLinkPolicy string `json:"symbolic_link_policy"`
Executables []string `json:"executables"`
}
type RecordProbeV1 ¶
type RecordReferenceV1 ¶
type RecordRuntimeV1 ¶
type RecordRuntimeV1 struct {
InstallRoot string `json:"install_root"`
Environment []RecordEnvironmentVariableV1 `json:"environment"`
}
type RecordV1 ¶
type RecordV1 interface {
// contains filtered or unexported methods
}
RecordV1 is the closed set of canonical portable-tool record contracts. The unexported marker prevents consumers from extending the versioned schema set independently.
type ReleaseContractV1 ¶
type ReleaseContractV1 struct {
Schema string `json:"schema"`
ID string `json:"id"`
Contexts []string `json:"contexts"`
SupportedReploy string `json:"supported_reploy"`
Binding BindingSetSchemaV1 `json:"binding"`
Selections SelectionSchemaV1 `json:"selections"`
Runtime *RecordRuntimeV1 `json:"runtime,omitempty"`
Exports []ToolExportV1 `json:"exports"`
ResolverPrimitives []string `json:"resolver_primitives"`
CompatibilityConstraints []string `json:"compatibility_constraints"`
}
type ReleaseManifestV1 ¶
type ReleaseManifestV1 struct {
Schema string `json:"schema"`
ID string `json:"id"`
Tool string `json:"tool"`
Version string `json:"version"`
Aliases []string `json:"aliases"`
Revision string `json:"revision"`
Contract RecordReferenceV1 `json:"contract"`
Targets []RecordReferenceV1 `json:"targets"`
ArtifactSources []ArtifactSourceMappingV1 `json:"artifact_sources"`
Provenance []string `json:"provenance"`
ValidationProfiles []RecordReferenceV1 `json:"validation_profiles"`
}
type SelectionCombinationV1 ¶
type SelectionDimensionV1 ¶
type SelectionSchemaV1 ¶
type SelectionSchemaV1 struct {
Dimensions []SelectionDimensionV1 `json:"dimensions"`
Combinations []SelectionCombinationV1 `json:"combinations"`
}
type TargetBindingV1 ¶
type TargetBindingV1 struct {
Name string `json:"name"`
Contract RecordReferenceV1 `json:"contract"`
Artifacts []RecordReferenceV1 `json:"artifacts"`
Payloads []RecordReferenceV1 `json:"payloads"`
PackageSets []RecordReferenceV1 `json:"package_sets"`
Exports []ToolExportV1 `json:"exports"`
ValidationProfiles []RecordReferenceV1 `json:"validation_profiles"`
}
type TargetIdentityV1 ¶
type TargetRecordV1 ¶
type TargetRecordV1 struct {
Schema string `json:"schema"`
ID string `json:"id"`
Target TargetIdentityV1 `json:"target"`
SupportCases []TargetSupportCaseV1 `json:"support_cases"`
PackageSets []RecordReferenceV1 `json:"package_sets"`
Bindings []TargetBindingV1 `json:"bindings"`
Payloads []RecordReferenceV1 `json:"payloads"`
Selections []TargetSelectionV1 `json:"selections"`
Exports []ToolExportV1 `json:"exports"`
IntegrationFixtures []RecordReferenceV1 `json:"integration_fixtures"`
ValidationProfiles []RecordReferenceV1 `json:"validation_profiles"`
}
type TargetSelectionV1 ¶
type TargetSelectionV1 struct {
Dimension string `json:"dimension"`
Value string `json:"value"`
Payloads []RecordReferenceV1 `json:"payloads"`
PackageSets []RecordReferenceV1 `json:"package_sets"`
Exports []ToolExportV1 `json:"exports"`
ValidationProfiles []RecordReferenceV1 `json:"validation_profiles"`
}
type TargetSupportCaseV1 ¶
type ToolExportV1 ¶
type ToolRecordV1 ¶
type ToolRecordV1 struct {
Schema string `json:"schema"`
ID string `json:"id"`
Name string `json:"name"`
VersionScheme string `json:"version_scheme"`
DefaultVersion string `json:"default_version,omitempty"`
Summary string `json:"summary"`
Upstream string `json:"upstream"`
Source string `json:"source"`
License string `json:"license"`
Documentation string `json:"documentation"`
Releases []RecordReferenceV1 `json:"releases"`
}
type ValidationEvidenceV1 ¶
type ValidationEvidenceV1 struct {
Schema string `json:"schema"`
Tool string `json:"tool"`
Version string `json:"version"`
Revision string `json:"revision"`
ManifestDigest canonical.Digest `json:"manifest_digest"`
SelectedClosureDigest canonical.Digest `json:"selected_closure_digest"`
Context string `json:"context"`
Target TargetIdentityV1 `json:"target"`
BaseImageDigest canonical.Digest `json:"base_image_digest"`
Bindings []string `json:"bindings"`
Selections map[string][]string `json:"selections"`
Fixture string `json:"fixture"`
ValidatorVersion string `json:"validator_version"`
Result string `json:"result"`
ValidatorOutputDigest canonical.Digest `json:"validator_output_digest"`
}
type ValidationProfileRecordV1 ¶
type ValidationProfileRecordV1 struct {
Schema string `json:"schema"`
ID string `json:"id"`
Tool string `json:"tool"`
Version string `json:"version"`
Probes []RecordProbeV1 `json:"probes"`
}
type WheelFilenameProjectionV1 ¶
WheelFilenameProjectionV1 is the canonical identity and expanded compatibility-tag projection of one wheel filename.
func ProjectWheelFilenameV1 ¶
func ProjectWheelFilenameV1(filename string) (WheelFilenameProjectionV1, error)
ProjectWheelFilenameV1 parses one canonical wheel filename without reading the wheel or applying runtime eligibility policy.
type WheelPlatformProjectionV1 ¶
type WheelPlatformProjectionV1 struct {
Kind string
Architecture string
MinimumGlibcMajor string
MinimumGlibcMinor string
}
WheelPlatformProjectionV1 is the single portable-tool wheel platform policy projection. It deliberately contains only the policy facts needed by record validation and provider runtime guards; pip remains the runtime compatibility authority.
func ProjectWheelPlatformForTargetV1 ¶
func ProjectWheelPlatformForTargetV1(tag, target string) (WheelPlatformProjectionV1, error)
ProjectWheelPlatformForTargetV1 additionally proves that a projected architecture belongs to the selected Linux target. The any policy is architecture independent.
func ProjectWheelPlatformV1 ¶
func ProjectWheelPlatformV1(tag string) (WheelPlatformProjectionV1, error)
ProjectWheelPlatformV1 validates and projects one canonical wheel platform tag. Unsupported policy aliases, numeric versions, architectures, and floors are rejected so all consumers share this one fail-closed table.