Documentation
¶
Overview ¶
Package connectors is the single source of truth for the Airflow connector types Dexaflow knows about. The catalog is GENERATED, not hand-written: an offline step (scripts/gen_connectors.py) asks a real Apache Airflow install for the exact connection-form metadata its UI renders (via the same HookMetaService the /ui/connections/hook_meta endpoint uses) plus the pip package each conn_type ships in, and embeds it as catalog.json. Three consumers read it so they never drift: the admin connection form (internal/api), the `connectors:` sugar expansion at compile, and compile-time dependency validation (ADR 0038). Regenerate by installing more providers and re-running the script — never edit catalog.json by hand.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PackageFor ¶
PackageFor returns the pip package for a connector name — its canonical ConnectionType or any of its sugar Aliases (e.g. "gcp"). ok=false when the name is unknown OR maps to a core type with no package (nothing for `connectors:` to install), so the caller can fall back to dependencies:.
Types ¶
type Connector ¶
type Connector struct {
// ConnectionType is the Airflow conn_type, e.g. "postgres".
ConnectionType string `json:"connection_type"`
// HookName is the human label shown in the admin form, e.g. "Postgres".
HookName string `json:"hook_name"`
// HookClassName is the dotted Airflow hook class.
HookClassName string `json:"hook_class_name"`
// DefaultConnName is Airflow's conventional default connection id; empty for
// core types that declare none.
DefaultConnName string `json:"default_conn_name"`
// PipPackage is the PyPI package that provides the hook, e.g.
// "apache-airflow-providers-postgres". Empty for core conn types (generic,
// email): they appear in the form but are not resolvable by the `connectors:`
// sugar (nothing to install).
PipPackage string `json:"pip_package"`
// StandardFields is the per-field behavior for the built-in fields
// (host/login/password/port/schema/description): hidden flag, relabel title,
// and placeholder.
StandardFields map[string]any `json:"standard_fields"`
// ExtraFields is the provider-specific custom fields (the credential fields
// that live in Connection.extra), each a FlexibleForm param spec.
ExtraFields map[string]any `json:"extra_fields"`
// Aliases are extra short names the `connectors:` sugar accepts on top of
// ConnectionType. They are a Dexaflow overlay (see aliasOverlay), not part of
// Airflow's metadata, and exist only to smooth Airflow's asymmetric conn_type
// vocabulary (e.g. "gcp" for the verbose "google_cloud_platform").
Aliases []string `json:"-"`
}
Connector is one curated connector type, mirroring a catalog.json entry. The field metadata (StandardFields/ExtraFields) is the precise shape the Airflow 3.2 SPA renders via its FlexibleForm component, so the admin form can serve it verbatim.