Documentation
¶
Overview ¶
Package adapter provides the embedded adapter registry and lookup functions.
The registry is a static YAML file embedded in the ox binary via go:embed. It lists all known adapters (bundled and external) with their metadata, capabilities, and source repositories. Phase 1 is embedded-only; future phases will fetch updates from sageox/ox-adapters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterEntry ¶
type AdapterEntry struct {
Name string `yaml:"name" json:"name"`
DisplayName string `yaml:"display_name" json:"display_name"`
Description string `yaml:"description" json:"description"`
Type string `yaml:"type" json:"type"` // session, vcs, indexer
Bundled bool `yaml:"bundled" json:"bundled"`
Binary string `yaml:"binary" json:"binary"`
Repo string `yaml:"repo" json:"repo"`
Capabilities []string `yaml:"capabilities" json:"capabilities"`
DetectCmds []string `yaml:"detect_commands,omitempty" json:"detect_commands,omitempty"`
}
AdapterEntry describes a known adapter in the registry.
func (*AdapterEntry) GitHubRepo ¶
func (e *AdapterEntry) GitHubRepo() string
GitHubRepo returns the full github.com URL for an adapter entry.
type CommunityEntry ¶
type CommunityEntry struct {
Name string `yaml:"name" json:"name"`
DisplayName string `yaml:"display_name" json:"display_name"`
Description string `yaml:"description" json:"description"`
Repo string `yaml:"repo" json:"repo"`
Capabilities []string `yaml:"capabilities,omitempty" json:"capabilities,omitempty"`
}
CommunityEntry describes a community-contributed adapter.
type Registry ¶
type Registry struct {
SchemaVersion int `yaml:"schema_version" json:"schema_version"`
Adapters []AdapterEntry `yaml:"adapters" json:"adapters"`
Community []CommunityEntry `yaml:"community,omitempty" json:"community,omitempty"`
}
Registry is the top-level adapter registry structure.
func LoadEmbeddedRegistry ¶
LoadEmbeddedRegistry parses the embedded registry YAML and returns the registry. This is the Phase 1 registry source.
func (*Registry) BundledAdapters ¶
func (r *Registry) BundledAdapters() []AdapterEntry
BundledAdapters returns only adapters that ship with the ox binary.
func (*Registry) ExternalAdapters ¶
func (r *Registry) ExternalAdapters() []AdapterEntry
ExternalAdapters returns only adapters that must be installed separately.
func (*Registry) Lookup ¶
func (r *Registry) Lookup(name string) *AdapterEntry
Lookup finds an adapter entry by name. Returns nil if not found.