connector

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 7 Imported by: 0

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

func New

func New(deps Deps) *cli.Group

New returns the `connector` verb group. The returned *cli.Group is safe to register under any name in the root verb table.

Types

type Deps

type Deps struct {
	Unary    func(ctx context.Context, path string, req, resp any) error
	Endpoint 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 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. Empty is tolerated — resolveEndpoint falls back to defaultEndpoint.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL