registrykey

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package registrykey adapts this onix deployment's own definition.RegistryLookup into a crawler.KeySource -- the generic key-lookup function catalog-core's Fetcher calls internally to verify a fetched artifact's signature. catalog-core knows nothing about onix's Subscription/status model, so the base64 decoding, usable-status check, and fault classification live here.

Shared by catalogcrawler and catalogpublisher: both need to resolve {nodeID, keyID} against the real registry and classify the result the same way (a down/rate-limited registry is transient and worth retrying; a missing/unusable/malformed key is permanent and never will be), so a future fix to that classification (a new model.Status value, a changed encoding convention) only has one place to land instead of drifting between two copies. Lives under pkg/plugin/implementation/internal specifically so plugin implementation packages still don't cross-import each other directly -- only this common, dependency-free helper is shared.

No caching is added at this layer: definition.RegistryLookup implementations (registry, dediregistry) already cache Lookup results themselves; a second, independently-expiring cache here would risk serving a revoked/rotated key past the registry plugin's own cache invalidation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolve

func Resolve(ctx context.Context, caller string, reg definition.RegistryLookup, nodeID, keyID string) (ed25519.PublicKey, error)

Resolve asks the registry for {subscriberID, keyID} and turns the answer into a usable Ed25519 key, or into a correctly classified failure.

func Source

func Source(caller string, reg definition.RegistryLookup) crawler.KeySource

Source adapts reg into a crawler.KeySource. caller labels every error this produces (e.g. "catalogcrawler", "catalogpublisher") so a log line or PublishError/CrawlError reason still says which plugin hit it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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