Documentation
¶
Overview ¶
Package registry is the single source of truth for provider self-description. Each pkg/providers/<x>/ registers its Spec at init() time; runner/catalog and other consumers read aggregated views from here.
Dependency direction is intentional and load-bearing:
- registry imports only standard library + utils
- pkg/providers/<x>/ imports registry (one-way, via init())
- runner/catalog and runner/{console,headless} import registry
Anything that needs to know "which provider" must live above registry; the package itself is provider-agnostic.
Index ¶
- func Capabilities(name string) []string
- func DefaultConfig(name string) (map[string]string, bool)
- func Names() []string
- func OptionDescription(name string) string
- func OptionNames() []string
- func Register(name string, spec Spec)
- func SensitiveOption(name string) bool
- func SupportsCapability(provider, capability string) bool
- type Option
- type Spec
- type Suggestion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capabilities ¶
Capabilities returns a copy of the provider's declared capability list.
func DefaultConfig ¶
DefaultConfig builds a config map of option name -> default value.
func Names ¶
func Names() []string
Names returns all registered provider names sorted alphabetically.
func OptionDescription ¶
OptionDescription returns the rendered description (with default / optional hints) for an option name aggregated across all registered providers, plus the two payload-level pseudo-options (payload, metadata). Returns "" when the option is unknown.
func OptionNames ¶
func OptionNames() []string
OptionNames returns every option name known to the registry sorted alphabetically, including payload-level pseudo-options.
func Register ¶
Register stores spec for the named provider. Re-registering the same name overwrites; intended to be called from init() so the order across providers does not matter.
func SensitiveOption ¶
SensitiveOption reports whether any registered provider marks this option name as sensitive (e.g. a secret that should not be logged or echoed).
func SupportsCapability ¶
SupportsCapability reports whether the named provider declares the given capability.
Types ¶
type Spec ¶
type Spec struct {
Options []Option
Regions []Suggestion
Capabilities []string
}
Spec is the full self-description of a provider: its config options, region suggestions, and the capability identifiers it claims to support. Capability strings line up with runner/catalog payload capabilities ("cloudlist" / "iam" / "bucket" / "event" / "vm" / "database").
type Suggestion ¶
Suggestion is a single autocomplete entry (text + helper description) used for region pickers and similar UI surfaces.
func Regions ¶
func Regions(name string) []Suggestion
Regions returns a copy of the provider's region suggestions.