Documentation
¶
Overview ¶
Package connector provides the `ana connector` verb tree: list, get, create, update, delete, test, tables, examples. It is pure dispatch glue around an injected Unary RPC call (see Deps) so tests pass a fake and the package never imports internal/transport or internal/config directly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deps ¶
type Deps struct {
Unary func(ctx context.Context, path string, req, resp any) error
Endpoint func() string
}
Deps is the narrow injection boundary. Unary JSON-encodes req, POSTs it to path, and JSON-decodes the response into *resp. A concrete wiring layer adapts transport.Client to this function field; tests pass a recording fake.
Endpoint is a closure that returns the resolved API base URL (after --endpoint / profile / env precedence), used by OAuth leaves whose success notes direct users at the correct TextQL web app to complete the browser handshake. The closure form lets the wiring layer defer config-load until the OAuth verb actually runs (so non-OAuth verbs never trigger it). A nil closure or an empty return value falls back to defaultEndpoint.
Source Files
¶
- connector.go
- create.go
- create_databricks.go
- create_databricks_access_token.go
- create_databricks_client_credentials.go
- create_databricks_oauth_individual.go
- create_databricks_oauth_sso.go
- create_postgres.go
- create_snowflake.go
- create_snowflake_keypair.go
- create_snowflake_oauth_individual.go
- create_snowflake_oauth_sso.go
- create_snowflake_password.go
- delete.go
- examples.go
- get.go
- list.go
- tables.go
- test.go
- types.go
- types_databricks.go
- types_postgres.go
- types_snowflake.go
- update.go