Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigTemplate ¶
func DefaultConfigTemplate() []byte
DefaultConfigTemplate returns the shared gomplate template for generating config.yaml. This covers the standard watcher config used extensions.
func ResolveConfigTemplate ¶
ResolveConfigTemplate returns the bundle's custom template if set, otherwise the shared default. Extensions with custom config fields can override the default by setting Bundle.ConfigTemplate.
Types ¶
type Bundle ¶
type Bundle struct {
// Service identifies the extension (e.g. "dta", "dvp", "test_consumer").
// An empty string means this is the generic/fallback event-listener.
Service string
// WasmBinary is the pre-compiled WASM binary, populated via //go:embed.
WasmBinary []byte
// ConfigTemplate is an optional gomplate template for generating config.yaml.
// When nil, ResolveConfigTemplate falls back to the shared default template.
// Set this only when an extension needs custom config fields beyond the
// standard event-listener structure.
ConfigTemplate []byte
// Contracts lists the on-chain contracts this extension interacts with.
// Nil for the generic bundle (user provides ABI at deploy time).
Contracts []Contract
// Events lists the subscribable events this extension supports.
// Nil for the generic bundle (user provides events at deploy time).
Events []Event
}
Bundle is the deployment artifact for an extension watcher workflow. Extensions produce these; Courier consumes them.
func (*Bundle) FindTriggerContract ¶
FindTriggerContract returns the Contract that emits the given event, or nil if not found.
type Contract ¶
type Contract struct {
// Name is the logical contract identifier (e.g. "DTARequestManagement").
Name string
// ABI is the full ABI JSON string (or subset of event signatures) for the contract.
ABI string
}
Contract describes a contract the watcher needs access to.
type Event ¶
type Event struct {
// Name is the Solidity event name (e.g. "SubscriptionRequested").
Name string
// TriggerContract is the Contract.Name that emits this event.
TriggerContract string
// Description is a human-readable summary of the event.
Description string
// ParamsSchema is the JSON Schema for decoded Solidity event parameters (chain_event.params).
ParamsSchema json.RawMessage
// DataSchema is the JSON Schema for enrichment/reference data, or nil if no enrichment.
DataSchema json.RawMessage
}
Event describes a subscribable event.
Click to show internal directories.
Click to hide internal directories.