app

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialResolver added in v0.15.0

type CredentialResolver interface {
	CredentialFor(tenantID string) (azcore.TokenCredential, error)
}

CredentialResolver resolves a token credential for a given tenant ID. Implemented by the parent Model so tabs don't construct credentials themselves. The returned credential is shared across calls for the same tenant — do not cache or wrap it.

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the top-level Bubble Tea model that manages tabs.

func NewModel

func NewModel(blobSvc *blob.Service, sbSvc *servicebus.Service, kvSvc *keyvault.Service, cfg ui.Config, db *cache.DB, km keymap.Keymap) Model

NewModel creates the parent tabbed model. If db is non-nil, a persistent SQLite cache is used; otherwise in-memory.

func (*Model) CredentialFor added in v0.15.0

func (m *Model) CredentialFor(tenantID string) (azcore.TokenCredential, error)

CredentialFor implements CredentialResolver — tabs call this through their CredResolver field to get a credential scoped to the active subscription's tenant. Backed by credCache so repeat calls (across tabs and across SetSubscription invocations) reuse the same credential instance.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update runs the inner dispatcher and then persists the active subscription if it changed. Wrapping at this single point catches every state transition (key, mouse, tab switch, child-emitted msg) without scattering write calls through the dispatcher body.

func (Model) View

func (m Model) View() tea.View

type Tab

type Tab struct {
	ID    int
	Kind  TabKind
	Label string
	Model tea.Model
}

Tab represents a single tab in the application.

Label, when non-empty, overrides the default Kind.String() name shown in the tab bar. Used for connection-string / Azurite tabs whose name (e.g. "Azurite (local)") communicates more than the bare TabKind.

type TabKind

type TabKind int

TabKind identifies which type of explorer a tab contains.

const (
	TabBlob TabKind = iota
	TabServiceBus
	TabKeyVault
	TabDashboard
)

func TabKindFromString

func TabKindFromString(s string) (TabKind, bool)

TabKindFromString parses a config-supplied tab kind name into a TabKind. Recognized values (case-insensitive): "blob", "servicebus", "keyvault", "dashboard". Returns ok=false on anything else so the caller can warn.

func (TabKind) Icon added in v0.14.0

func (k TabKind) Icon(icons ui.Icons) string

Icon returns the glyph used in the tab bar to identify a kind, drawn from the supplied icon set. The icon set is config-driven — see ui.NewIcons — so terminal-safe Unicode (default) and Nerd Fonts both work via the same code path.

func (TabKind) String

func (k TabKind) String() string

Jump to

Keyboard shortcuts

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