resources

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package resources holds the concrete resource definitions — the only code that calls DAOs. One file per resource; wire new defs in register.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegistry

func NewRegistry() *resource.Registry

NewRegistry builds the registry of all built-in resources. Every new resource def gets its one registration line here.

Types

type AppsDef

type AppsDef struct{}

AppsDef browses Databricks Apps.

func (AppsDef) Actions

func (AppsDef) Actions() []resource.Action

Actions: `l` opens the app's runtime logs directly.

func (AppsDef) Aliases

func (AppsDef) Aliases() []string

func (AppsDef) AltWebHint

func (AppsDef) AltWebHint() string

AltWebHint labels the `O` binding in the key help.

func (AppsDef) AltWebURL

func (AppsDef) AltWebURL(_ string, _ resource.Scope, row resource.Row) (string, bool)

AltWebURL implements resource.AltWebLinker: `O` opens the deployed app itself on its own host, when it has one.

func (AppsDef) Args

func (AppsDef) Args() []string

func (AppsDef) CellClass

func (AppsDef) CellClass(col int, value string) resource.CellClass

CellClass colors the COMPUTE, STATUS, and DEPLOYMENT columns semantically.

func (AppsDef) Child

func (AppsDef) Child() string

Child is empty: Enter is handled by Opener (tabbed detail + logs).

func (AppsDef) ChildScope

func (AppsDef) ChildScope(parent resource.Scope, _ resource.Row) resource.Scope

func (AppsDef) Columns

func (AppsDef) Columns() []resource.Column

func (AppsDef) Describe

func (AppsDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)

func (AppsDef) EnterMsg

func (AppsDef) EnterMsg(c *dbx.Clients, _ resource.Scope, row resource.Row) any

EnterMsg implements resource.Opener: selecting an app opens tabs — its logs beside its metadata. Rows restored from the on-disk cache arrive with Data as a map rather than a dbx.App; appFromRow recovers the app so Enter always opens the view (the tabs then load/refresh) instead of dead-ending.

func (AppsDef) List

func (AppsDef) List(ctx context.Context, c *dbx.Clients, _ resource.Scope) ([]resource.Row, error)

func (AppsDef) Name

func (AppsDef) Name() string

func (AppsDef) PollInterval

func (AppsDef) PollInterval() time.Duration

PollInterval is 15s — apps state changes matter and the list API is not heavily rate-limited.

func (AppsDef) Tabs

func (AppsDef) Tabs() []string

Tabs implements resource.Tabber: the tab names EnterMsg produces, in order.

func (AppsDef) WebURL

func (AppsDef) WebURL(host string, _ resource.Scope, row resource.Row) (string, bool)

WebURL implements resource.WebLinker: `o` opens the app's management page in the workspace UI (row.ID is the app name).

type CatalogsDef

type CatalogsDef struct{}

CatalogsDef browses Unity Catalog catalogs.

func (CatalogsDef) Actions

func (CatalogsDef) Actions() []resource.Action

func (CatalogsDef) Aliases

func (CatalogsDef) Aliases() []string

func (CatalogsDef) Args

func (CatalogsDef) Args() []string

func (CatalogsDef) Child

func (CatalogsDef) Child() string

func (CatalogsDef) ChildScope

func (CatalogsDef) ChildScope(parent resource.Scope, row resource.Row) resource.Scope

func (CatalogsDef) Columns

func (CatalogsDef) Columns() []resource.Column

func (CatalogsDef) Describe

func (CatalogsDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)

func (CatalogsDef) List

func (CatalogsDef) Name

func (CatalogsDef) Name() string

func (CatalogsDef) PollInterval

func (CatalogsDef) PollInterval() time.Duration

func (CatalogsDef) WebURL

func (CatalogsDef) WebURL(host string, _ resource.Scope, row resource.Row) (string, bool)

WebURL implements resource.WebLinker.

type ColumnsDef

type ColumnsDef struct{}

ColumnsDef browses the columns of one table — the leaf of the Unity Catalog drill-down.

func (ColumnsDef) Actions

func (ColumnsDef) Actions() []resource.Action

func (ColumnsDef) Aliases

func (ColumnsDef) Aliases() []string

func (ColumnsDef) Args

func (ColumnsDef) Args() []string

func (ColumnsDef) Child

func (ColumnsDef) Child() string

func (ColumnsDef) ChildScope

func (ColumnsDef) ChildScope(parent resource.Scope, _ resource.Row) resource.Scope

func (ColumnsDef) Columns

func (ColumnsDef) Columns() []resource.Column

func (ColumnsDef) Describe

func (ColumnsDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)

func (ColumnsDef) List

func (ColumnsDef) List(ctx context.Context, c *dbx.Clients, scope resource.Scope) ([]resource.Row, error)

func (ColumnsDef) Name

func (ColumnsDef) Name() string

func (ColumnsDef) PollInterval

func (ColumnsDef) PollInterval() time.Duration

func (ColumnsDef) WebURL

func (ColumnsDef) WebURL(host string, scope resource.Scope, _ resource.Row) (string, bool)

WebURL implements resource.WebLinker. Columns have no page of their own, so `o` opens the parent table in the Catalog Explorer.

type JobsDef

type JobsDef struct{}

JobsDef browses Databricks jobs.

func (JobsDef) Actions

func (JobsDef) Actions() []resource.Action

func (JobsDef) Aliases

func (JobsDef) Aliases() []string

func (JobsDef) Args

func (JobsDef) Args() []string

func (JobsDef) CellClass

func (JobsDef) CellClass(col int, value string) resource.CellClass

CellClass implements resource.Styler: the STATUS column carries the last run's verdict color.

func (JobsDef) Child

func (JobsDef) Child() string

func (JobsDef) ChildScope

func (JobsDef) ChildScope(parent resource.Scope, row resource.Row) resource.Scope

func (JobsDef) Columns

func (JobsDef) Columns() []resource.Column

func (JobsDef) Describe

func (JobsDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)

func (JobsDef) List

func (JobsDef) List(ctx context.Context, c *dbx.Clients, _ resource.Scope) ([]resource.Row, error)

func (JobsDef) Name

func (JobsDef) Name() string

func (JobsDef) PollInterval

func (JobsDef) PollInterval() time.Duration

PollInterval is 30s — the jobs list API is rate-limited to 20/s.

func (JobsDef) RowName

func (JobsDef) RowName(row resource.Row) string

RowName implements resource.RowNamer: jobs are addressed by name on the CLI even though their Row.ID is the numeric id. Reads the NAME cell so it works on cache-restored rows too; falls back to the id when the cell is absent.

func (JobsDef) RowTags

func (JobsDef) RowTags(row resource.Row) []string

RowTags implements resource.Tagger from the job's custom tags, rendered "key=value" (bare "key" when the value is empty), sorted.

func (JobsDef) WebURL

func (JobsDef) WebURL(host string, _ resource.Scope, row resource.Row) (string, bool)

WebURL implements resource.WebLinker.

type PipelinesDef

type PipelinesDef struct{}

PipelinesDef browses Lakeflow/DLT pipelines.

func (PipelinesDef) Actions

func (PipelinesDef) Actions() []resource.Action

func (PipelinesDef) Aliases

func (PipelinesDef) Aliases() []string

func (PipelinesDef) Args

func (PipelinesDef) Args() []string

func (PipelinesDef) CellClass

func (PipelinesDef) CellClass(col int, value string) resource.CellClass

CellClass colors the STATE and HEALTH columns semantically.

func (PipelinesDef) Child

func (PipelinesDef) Child() string

func (PipelinesDef) ChildScope

func (PipelinesDef) ChildScope(parent resource.Scope, row resource.Row) resource.Scope

func (PipelinesDef) Columns

func (PipelinesDef) Columns() []resource.Column

func (PipelinesDef) Describe

func (PipelinesDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)

func (PipelinesDef) List

func (PipelinesDef) Name

func (PipelinesDef) Name() string

func (PipelinesDef) PollInterval

func (PipelinesDef) PollInterval() time.Duration

func (PipelinesDef) WebURL

func (PipelinesDef) WebURL(host string, _ resource.Scope, row resource.Row) (string, bool)

WebURL implements resource.WebLinker.

type RunsDef

type RunsDef struct{}

RunsDef browses the runs of one job.

func (RunsDef) Actions

func (RunsDef) Actions() []resource.Action

Actions: `l` opens the run's logs without drilling into tasks — it picks the first failed task, falling back to the first task (the common single-task-job case just works).

func (RunsDef) Aliases

func (RunsDef) Aliases() []string

func (RunsDef) Args

func (RunsDef) Args() []string

func (RunsDef) CellClass

func (RunsDef) CellClass(col int, value string) resource.CellClass

CellClass colors the STATE and RESULT columns semantically.

func (RunsDef) Child

func (RunsDef) Child() string

func (RunsDef) ChildScope

func (RunsDef) ChildScope(parent resource.Scope, row resource.Row) resource.Scope

func (RunsDef) Columns

func (RunsDef) Columns() []resource.Column

func (RunsDef) Describe

func (RunsDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)

func (RunsDef) List

func (RunsDef) List(ctx context.Context, c *dbx.Clients, scope resource.Scope) ([]resource.Row, error)

func (RunsDef) Name

func (RunsDef) Name() string

func (RunsDef) PollInterval

func (RunsDef) PollInterval() time.Duration

func (RunsDef) WebURL

func (RunsDef) WebURL(host string, scope resource.Scope, row resource.Row) (string, bool)

WebURL implements resource.WebLinker.

type SchemasDef

type SchemasDef struct{}

SchemasDef browses schemas within a catalog.

func (SchemasDef) Actions

func (SchemasDef) Actions() []resource.Action

func (SchemasDef) Aliases

func (SchemasDef) Aliases() []string

func (SchemasDef) Args

func (SchemasDef) Args() []string

func (SchemasDef) Child

func (SchemasDef) Child() string

func (SchemasDef) ChildScope

func (SchemasDef) ChildScope(parent resource.Scope, row resource.Row) resource.Scope

func (SchemasDef) Columns

func (SchemasDef) Columns() []resource.Column

func (SchemasDef) Describe

func (SchemasDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)

func (SchemasDef) List

func (SchemasDef) List(ctx context.Context, c *dbx.Clients, scope resource.Scope) ([]resource.Row, error)

func (SchemasDef) Name

func (SchemasDef) Name() string

func (SchemasDef) PollInterval

func (SchemasDef) PollInterval() time.Duration

func (SchemasDef) WebURL

func (SchemasDef) WebURL(host string, scope resource.Scope, row resource.Row) (string, bool)

WebURL implements resource.WebLinker.

type TablesDef

type TablesDef struct{}

TablesDef browses tables within a schema.

func (TablesDef) Actions

func (TablesDef) Actions() []resource.Action

func (TablesDef) Aliases

func (TablesDef) Aliases() []string

func (TablesDef) Args

func (TablesDef) Args() []string

func (TablesDef) Child

func (TablesDef) Child() string

func (TablesDef) ChildScope

func (TablesDef) ChildScope(parent resource.Scope, row resource.Row) resource.Scope

func (TablesDef) Columns

func (TablesDef) Columns() []resource.Column

func (TablesDef) Describe

func (TablesDef) Describe(ctx context.Context, c *dbx.Clients, scope resource.Scope, row resource.Row) (any, error)

Describe fetches the full table detail (columns, properties).

func (TablesDef) EnterMsg

func (TablesDef) EnterMsg(c *dbx.Clients, scope resource.Scope, row resource.Row) any

EnterMsg implements resource.Opener: Enter opens the tabbed table view (columns │ data │ details) instead of a plain child drill-down.

func (TablesDef) List

func (TablesDef) List(ctx context.Context, c *dbx.Clients, scope resource.Scope) ([]resource.Row, error)

func (TablesDef) Name

func (TablesDef) Name() string

func (TablesDef) PollInterval

func (TablesDef) PollInterval() time.Duration

func (TablesDef) Tabs

func (TablesDef) Tabs() []string

Tabs implements resource.Tabber: the tab names EnterMsg produces, in order.

func (TablesDef) WebURL

func (TablesDef) WebURL(host string, scope resource.Scope, row resource.Row) (string, bool)

WebURL implements resource.WebLinker.

type TaskRunsDef

type TaskRunsDef struct{}

TaskRunsDef browses the task-level runs within one job run — the leaf of the jobs drill-down.

func (TaskRunsDef) Actions

func (TaskRunsDef) Actions() []resource.Action

func (TaskRunsDef) Aliases

func (TaskRunsDef) Aliases() []string

func (TaskRunsDef) Args

func (TaskRunsDef) Args() []string

func (TaskRunsDef) CellClass

func (TaskRunsDef) CellClass(col int, value string) resource.CellClass

CellClass colors the STATE and RESULT columns semantically.

func (TaskRunsDef) Child

func (TaskRunsDef) Child() string

func (TaskRunsDef) ChildScope

func (TaskRunsDef) ChildScope(parent resource.Scope, _ resource.Row) resource.Scope

func (TaskRunsDef) Columns

func (TaskRunsDef) Columns() []resource.Column

func (TaskRunsDef) Describe

func (TaskRunsDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)

func (TaskRunsDef) EnterMsg

func (TaskRunsDef) EnterMsg(c *dbx.Clients, scope resource.Scope, row resource.Row) any

EnterMsg implements resource.Opener: selecting a task run opens tabs — its logs beside its metadata — instead of bare describe.

func (TaskRunsDef) List

func (TaskRunsDef) List(ctx context.Context, c *dbx.Clients, scope resource.Scope) ([]resource.Row, error)

func (TaskRunsDef) Name

func (TaskRunsDef) Name() string

func (TaskRunsDef) PollInterval

func (TaskRunsDef) PollInterval() time.Duration

func (TaskRunsDef) Tabs

func (TaskRunsDef) Tabs() []string

Tabs implements resource.Tabber: the tab names EnterMsg produces, in order.

func (TaskRunsDef) WebURL

func (TaskRunsDef) WebURL(host string, scope resource.Scope, _ resource.Row) (string, bool)

WebURL implements resource.WebLinker. Task runs share their parent run's page, so `o` opens that run.

type UpdatesDef

type UpdatesDef struct{}

UpdatesDef browses the updates (executions) of one pipeline — the leaf of the pipelines drill-down.

func (UpdatesDef) Actions

func (UpdatesDef) Actions() []resource.Action

func (UpdatesDef) Aliases

func (UpdatesDef) Aliases() []string

func (UpdatesDef) Args

func (UpdatesDef) Args() []string

func (UpdatesDef) CellClass

func (UpdatesDef) CellClass(col int, value string) resource.CellClass

CellClass colors the STATE column semantically.

func (UpdatesDef) Child

func (UpdatesDef) Child() string

func (UpdatesDef) ChildScope

func (UpdatesDef) ChildScope(parent resource.Scope, _ resource.Row) resource.Scope

func (UpdatesDef) Columns

func (UpdatesDef) Columns() []resource.Column

func (UpdatesDef) Describe

func (UpdatesDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)

func (UpdatesDef) EnterMsg

func (UpdatesDef) EnterMsg(c *dbx.Clients, scope resource.Scope, row resource.Row) any

EnterMsg implements resource.Opener: selecting an update opens tabs — the pipeline event log beside the update's metadata.

func (UpdatesDef) List

func (UpdatesDef) List(ctx context.Context, c *dbx.Clients, scope resource.Scope) ([]resource.Row, error)

func (UpdatesDef) Name

func (UpdatesDef) Name() string

func (UpdatesDef) PollInterval

func (UpdatesDef) PollInterval() time.Duration

func (UpdatesDef) Tabs

func (UpdatesDef) Tabs() []string

Tabs implements resource.Tabber: the tab names EnterMsg produces, in order.

func (UpdatesDef) WebURL

func (UpdatesDef) WebURL(host string, scope resource.Scope, row resource.Row) (string, bool)

WebURL implements resource.WebLinker.

Jump to

Keyboard shortcuts

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