Documentation
¶
Index ¶
- type BecknConstantsConfig
- type Config
- type Manager
- func (m *Manager) Cache(ctx context.Context, cfg *Config) (definition.Cache, error)
- func (m *Manager) CatalogBlobStore(ctx context.Context, cfg *Config) (definition.CatalogBlobStore, error)
- func (m *Manager) CatalogPublisher(ctx context.Context, km definition.KeyManager, ...) (definition.CatalogPublisher, error)
- func (m *Manager) Crawler(ctx context.Context, registry definition.RegistryLookup, cfg *Config) (definition.Crawler, error)
- func (m *Manager) DeDiRegistry(ctx context.Context, cache definition.Cache, cfg *Config) (definition.RegistryLookup, error)
- func (m *Manager) Decryptor(ctx context.Context, cfg *Config) (definition.Decrypter, error)
- func (m *Manager) Encryptor(ctx context.Context, cfg *Config) (definition.Encrypter, error)
- func (m *Manager) KeyManager(ctx context.Context, rClient definition.RegistryLookup, cfg *Config) (definition.KeyManager, error)
- func (m *Manager) ManifestLoader(ctx context.Context, cache definition.Cache, ...) (definition.ManifestLoader, error)
- func (m *Manager) Middleware(ctx context.Context, cfg *Config) (func(http.Handler) http.Handler, error)
- func (m *Manager) OtelSetup(ctx context.Context, cfg *Config) (*telemetry.Provider, error)
- func (m *Manager) PayloadStore(ctx context.Context, cache definition.Cache, namespace string, cfg *Config) (definition.PayloadStore, error)
- func (m *Manager) PolicyChecker(ctx context.Context, manifestLoader definition.ManifestLoader, cfg *Config) (definition.PolicyChecker, error)
- func (m *Manager) Publisher(ctx context.Context, cfg *Config) (definition.Publisher, error)
- func (m *Manager) RegisterBecknConstantsGauge(ctx context.Context) error
- func (m *Manager) Registry(ctx context.Context, cache definition.Cache, cfg *Config) (definition.RegistryLookup, error)
- func (m *Manager) Router(ctx context.Context, cfg *Config) (definition.Router, error)
- func (m *Manager) SchemaValidator(ctx context.Context, cfg *Config) (definition.SchemaValidator, error)
- func (m *Manager) SchemaVersionMediator(ctx context.Context, manifestLoader definition.ManifestLoader, cfg *Config) (definition.SchemaVersionMediator, error)
- func (m *Manager) SignValidator(ctx context.Context, cfg *Config) (definition.SignValidator, error)
- func (m *Manager) Signer(ctx context.Context, cfg *Config) (definition.Signer, error)
- func (m *Manager) SimpleKeyManager(ctx context.Context, rClient definition.RegistryLookup, cfg *Config) (definition.KeyManager, error)
- func (m *Manager) Step(ctx context.Context, cfg *Config) (definition.Step, error)
- func (m *Manager) TransportWrapper(ctx context.Context, cfg *Config) (definition.TransportWrapper, error)
- func (m *Manager) Validator(ctx context.Context, cfg *Config) (definition.SchemaValidator, error)
- type ManagerConfig
- type PublisherCfg
- type ValidatorCfg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BecknConstantsConfig ¶ added in v1.7.1
type BecknConstantsConfig struct {
DisableRemoteRefresh bool `yaml:"disableRemoteRefresh"`
}
BecknConstantsConfig controls the beckn constants loader inside the manager.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is responsible for managing dynamically loaded plugins.
func NewManager ¶
func NewManager(ctx context.Context, cfg *ManagerConfig) (*Manager, func(), error)
NewManager initializes a new Manager instance by loading plugins from the specified configuration.
func (*Manager) Cache ¶
Cache returns a Cache instance based on the provided configuration. It registers a cleanup function for resource management.
func (*Manager) CatalogBlobStore ¶ added in v1.9.0
func (m *Manager) CatalogBlobStore(ctx context.Context, cfg *Config) (definition.CatalogBlobStore, error)
CatalogBlobStore returns a CatalogBlobStore instance based on the provided configuration.
func (*Manager) CatalogPublisher ¶ added in v1.9.0
func (m *Manager) CatalogPublisher(ctx context.Context, km definition.KeyManager, blobStore definition.CatalogBlobStore, registry definition.RegistryLookup, cfg *Config) (definition.CatalogPublisher, error)
CatalogPublisher returns a CatalogPublisher instance based on the provided configuration. It reuses the loaded provider. If registry also implements RegistryMetadataLookup (as dediregistry does), it is passed through too, for the catalog-index link check -- narrowed here rather than by the caller, since it's a generic interface check, not a catalogPublisher- specific business rule (same reasoning as Manager.Crawler's identical narrowing). Whether it's actually required (only when the plugin's own "checkCatalogIndexLink" config is set) is validated inside the plugin's own New, which is the only place that already knows that config key.
func (*Manager) Crawler ¶ added in v1.9.0
func (m *Manager) Crawler(ctx context.Context, registry definition.RegistryLookup, cfg *Config) (definition.Crawler, error)
Crawler returns a Crawler instance based on the provided configuration. registry is the crawler's key-distribution channel (every fetched index entry/file's self-signature is verified against it) -- required, per definition.CrawlerProvider's own contract. If registry also implements RegistryMetadataLookup (as dediregistry does), it is passed through too, for network-scoped discovery -- narrowed here rather than by the caller, since it's a generic interface check, not a crawler-specific business rule. Whether it's actually required (only when the plugin's own "networks" config is set) is validated inside the plugin's own New, which is the only place that already knows that config key.
func (*Manager) DeDiRegistry ¶
func (m *Manager) DeDiRegistry(ctx context.Context, cache definition.Cache, cfg *Config) (definition.RegistryLookup, error)
DeDiRegistry returns a RegistryLookup instance based on the provided configuration. It reuses the loaded provider.
func (*Manager) Decryptor ¶
Decryptor returns a Decrypter instance based on the provided configuration. It registers a cleanup function for resource management.
func (*Manager) Encryptor ¶
Encryptor returns an Encrypter instance based on the provided configuration. It registers a cleanup function for resource management.
func (*Manager) KeyManager ¶
func (m *Manager) KeyManager(ctx context.Context, rClient definition.RegistryLookup, cfg *Config) (definition.KeyManager, error)
KeyManager returns a KeyManager instance based on the provided configuration. It reuses the loaded provider.
func (*Manager) ManifestLoader ¶ added in v1.6.0
func (m *Manager) ManifestLoader(ctx context.Context, cache definition.Cache, lookup definition.RegistryMetadataLookup, cfg *Config) (definition.ManifestLoader, error)
ManifestLoader returns a ManifestLoader instance based on the provided configuration.
func (*Manager) Middleware ¶
func (m *Manager) Middleware(ctx context.Context, cfg *Config) (func(http.Handler) http.Handler, error)
Middleware returns an HTTP middleware function based on the provided configuration.
func (*Manager) OtelSetup ¶ added in v1.3.0
OtelSetup initializes OpenTelemetry via a dedicated plugin. The plugin is expected to return a telemetry Provider that the core application can use for instrumentation.
func (*Manager) PayloadStore ¶ added in v1.7.0
func (m *Manager) PayloadStore(ctx context.Context, cache definition.Cache, namespace string, cfg *Config) (definition.PayloadStore, error)
PayloadStore returns a PayloadStore instance backed by the provided cache. namespace should be the module name of the owning handler to scope all cache keys.
func (*Manager) PolicyChecker ¶ added in v1.5.0
func (m *Manager) PolicyChecker(ctx context.Context, manifestLoader definition.ManifestLoader, cfg *Config) (definition.PolicyChecker, error)
PolicyChecker returns a PolicyChecker instance based on the provided configuration. It registers a cleanup function for resource management.
func (*Manager) Publisher ¶
Publisher returns a Publisher instance based on the provided configuration. It reuses the loaded provider and registers a cleanup function.
func (*Manager) RegisterBecknConstantsGauge ¶ added in v1.7.1
RegisterBecknConstantsGauge registers the beckn_constants_info observable gauge using all non-canonical constant values detected so far. Call once after all modules are initialised.
func (*Manager) Registry ¶
func (m *Manager) Registry(ctx context.Context, cache definition.Cache, cfg *Config) (definition.RegistryLookup, error)
Registry returns a RegistryLookup instance based on the provided configuration. It registers a cleanup function for resource management.
func (*Manager) Router ¶
Router returns a Router instance based on the provided configuration. It registers a cleanup function for resource management.
func (*Manager) SchemaValidator ¶
func (m *Manager) SchemaValidator(ctx context.Context, cfg *Config) (definition.SchemaValidator, error)
SchemaValidator returns a SchemaValidator instance based on the provided configuration. It registers a cleanup function for resource management.
func (*Manager) SchemaVersionMediator ¶ added in v1.8.0
func (m *Manager) SchemaVersionMediator(ctx context.Context, manifestLoader definition.ManifestLoader, cfg *Config) (definition.SchemaVersionMediator, error)
SchemaVersionMediator returns a SchemaVersionMediator instance based on the provided configuration.
func (*Manager) SignValidator ¶
func (m *Manager) SignValidator(ctx context.Context, cfg *Config) (definition.SignValidator, error)
SignValidator returns a SignValidator instance based on the provided configuration. It registers a cleanup function for resource management.
func (*Manager) Signer ¶
Signer returns a Signer instance based on the provided configuration. It registers a cleanup function for resource management.
func (*Manager) SimpleKeyManager ¶
func (m *Manager) SimpleKeyManager(ctx context.Context, rClient definition.RegistryLookup, cfg *Config) (definition.KeyManager, error)
SimpleKeyManager returns a KeyManager instance based on the provided configuration. It reuses the loaded provider.
func (*Manager) TransportWrapper ¶ added in v1.3.0
func (m *Manager) TransportWrapper(ctx context.Context, cfg *Config) (definition.TransportWrapper, error)
TransportWrapper returns a TransportWrapper instance based on the provided configuration.
func (*Manager) Validator ¶
func (m *Manager) Validator(ctx context.Context, cfg *Config) (definition.SchemaValidator, error)
Validator implements handler.PluginManager.
type ManagerConfig ¶
type ManagerConfig struct {
Root string `yaml:"root"`
RemoteRoot string `yaml:"remoteRoot"`
BecknConstants *BecknConstantsConfig `yaml:"becknConstants,omitempty"`
}
type PublisherCfg ¶
type ValidatorCfg ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
implementation
|
|
|
cache/cmd
command
|
|
|
catalogcrawler
Package catalogcrawler is the onix plugin wiring for the decentralized- catalog crawl: it parses plugin config, builds the four concrete pieces crawlmanager.Params needs (a Postgres Store, a registry+static Source, an HTTP-push-to-Discovery Sink, and a ticker-driven Scheduler), and satisfies definition.Crawler by delegating to the Scheduler's lifecycle.
|
Package catalogcrawler is the onix plugin wiring for the decentralized- catalog crawl: it parses plugin config, builds the four concrete pieces crawlmanager.Params needs (a Postgres Store, a registry+static Source, an HTTP-push-to-Discovery Sink, and a ticker-driven Scheduler), and satisfies definition.Crawler by delegating to the Scheduler's lifecycle. |
|
catalogcrawler/cmd
command
|
|
|
catalogcrawler/internal/sink
Package sink implements crawlmanager.Sink: an HTTP push to a Discovery service.
|
Package sink implements crawlmanager.Sink: an HTTP push to a Discovery service. |
|
catalogcrawler/internal/source
Package source implements crawlmanager.Source: a fixed config list, and a registry-backed lookup (registry.go/dediquery.go).
|
Package source implements crawlmanager.Source: a fixed config list, and a registry-backed lookup (registry.go/dediquery.go). |
|
catalogcrawler/internal/store
Package store is catalogcrawler's Postgres-backed crawlmanager.Store: the crawler_index/crawler_queue/crawler_catalog schema and queries ported from the catalog-crawler prototype's own store package (working, reused as-is -- see migrations/).
|
Package store is catalogcrawler's Postgres-backed crawlmanager.Store: the crawler_index/crawler_queue/crawler_catalog schema and queries ported from the catalog-crawler prototype's own store package (working, reused as-is -- see migrations/). |
|
catalogpublisher
Package catalogpublisher implements definition.CatalogPublisher by standing up pkg/catalog/publisher's RFC NFH-014 publish logic as an onix plugin: it resolves the signing keyset via KeyManager (fresh every call, so a key rotation is picked up immediately) and its own config, and converts between definition's own types and pkg/catalog/publisher's/ pkg/catalog/store's.
|
Package catalogpublisher implements definition.CatalogPublisher by standing up pkg/catalog/publisher's RFC NFH-014 publish logic as an onix plugin: it resolves the signing keyset via KeyManager (fresh every call, so a key rotation is picked up immediately) and its own config, and converts between definition's own types and pkg/catalog/publisher's/ pkg/catalog/store's. |
|
catalogpublisher/cmd
command
|
|
|
decrypter/cmd
command
|
|
|
dediregistry/cmd
command
|
|
|
encrypter/cmd
command
|
|
|
internal/registrykey
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.
|
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. |
|
keymanager/cmd
command
|
|
|
localcatalogblobstore
Package localcatalogblobstore is a filesystem-backed definition.CatalogBlobStore: Get/Put over paths rooted at a local directory.
|
Package localcatalogblobstore is a filesystem-backed definition.CatalogBlobStore: Get/Put over paths rooted at a local directory. |
|
localcatalogblobstore/cmd
command
|
|
|
manifestloader/cmd
command
|
|
|
opapolicychecker/cmd
command
Package main provides the plugin entry point for the OPA Policy Checker plugin.
|
Package main provides the plugin entry point for the OPA Policy Checker plugin. |
|
otelsetup/cmd
command
|
|
|
payloadstore/cmd
command
|
|
|
publisher/cmd
command
|
|
|
registry/cmd
command
|
|
|
reqmapper/cmd
command
|
|
|
reqpreprocessor/cmd
command
|
|
|
router/cmd
command
|
|
|
schemav2validator/cmd
command
|
|
|
schemavalidator/cmd
command
|
|
|
schemaversionmediator
Package schemaversionmediator implements the SchemaVersionMediator plugin.
|
Package schemaversionmediator implements the SchemaVersionMediator plugin. |
|
schemaversionmediator/cmd
command
Package main provides the plugin entry point for the SchemaVersionMediator plugin.
|
Package main provides the plugin entry point for the SchemaVersionMediator plugin. |
|
signer/cmd
command
|
|
|
signvalidator/cmd
command
|
|
|
simplekeymanager/cmd
command
|
|
|
vcvalidator
Package vcvalidator provides a processing Step that validates W3C Verifiable Credentials embedded in a beckn request body.
|
Package vcvalidator provides a processing Step that validates W3C Verifiable Credentials embedded in a beckn request body. |
|
vcvalidator/cmd
command
Package main provides the plugin entry point for the VC Validator processing step.
|
Package main provides the plugin entry point for the VC Validator processing step. |