profile

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package profile provides the `ana profile` verb tree: list, add, use, remove, and show. API keys on app.textql.com are org-scoped, so users who work across multiple TextQL orgs keep one profile per org and flip between them with `ana profile use`.

Unlike internal/auth — which declares its own narrow Config type so the auth package never depends on internal/config — the profile verb is INHERENTLY about the whole config structure: listing profiles, switching the active pointer, etc. Deps therefore speaks config.Config directly and this package imports internal/config. That is the intentional design, not an accidental coupling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(deps Deps) *cli.Group

New returns the `profile` verb group.

Types

type Deps

type Deps struct {
	LoadCfg    func() (config.Config, error)
	SaveCfg    func(config.Config) error
	ConfigPath func() (string, error)
}

Deps is the injected boundary. The wiring layer in cmd/ana supplies closures backed by config.Load/Save and config.DefaultPath; tests supply the same closures pointed at a t.TempDir() file so the actual round-trip is exercised end-to-end.

Jump to

Keyboard shortcuts

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