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 ¶
- func NewRegistry() *resource.Registry
- type AppsDef
- func (AppsDef) Actions() []resource.Action
- func (AppsDef) Aliases() []string
- func (AppsDef) AltWebHint() string
- func (AppsDef) AltWebURL(_ string, _ resource.Scope, row resource.Row) (string, bool)
- func (AppsDef) Args() []string
- func (AppsDef) CellClass(col int, value string) resource.CellClass
- func (AppsDef) Child() string
- func (AppsDef) ChildScope(parent resource.Scope, _ resource.Row) resource.Scope
- func (AppsDef) Columns() []resource.Column
- func (AppsDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)
- func (AppsDef) EnterMsg(c *dbx.Clients, _ resource.Scope, row resource.Row) any
- func (AppsDef) List(ctx context.Context, c *dbx.Clients, _ resource.Scope) ([]resource.Row, error)
- func (AppsDef) Name() string
- func (AppsDef) PollInterval() time.Duration
- func (AppsDef) Tabs() []string
- func (AppsDef) WebURL(host string, _ resource.Scope, row resource.Row) (string, bool)
- type CatalogsDef
- func (CatalogsDef) Actions() []resource.Action
- func (CatalogsDef) Aliases() []string
- func (CatalogsDef) Args() []string
- func (CatalogsDef) Child() string
- func (CatalogsDef) ChildScope(parent resource.Scope, row resource.Row) resource.Scope
- func (CatalogsDef) Columns() []resource.Column
- func (CatalogsDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)
- func (CatalogsDef) List(ctx context.Context, c *dbx.Clients, _ resource.Scope) ([]resource.Row, error)
- func (CatalogsDef) Name() string
- func (CatalogsDef) PollInterval() time.Duration
- func (CatalogsDef) WebURL(host string, _ resource.Scope, row resource.Row) (string, bool)
- type ColumnsDef
- func (ColumnsDef) Actions() []resource.Action
- func (ColumnsDef) Aliases() []string
- func (ColumnsDef) Args() []string
- func (ColumnsDef) Child() string
- func (ColumnsDef) ChildScope(parent resource.Scope, _ resource.Row) resource.Scope
- func (ColumnsDef) Columns() []resource.Column
- func (ColumnsDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)
- func (ColumnsDef) List(ctx context.Context, c *dbx.Clients, scope resource.Scope) ([]resource.Row, error)
- func (ColumnsDef) Name() string
- func (ColumnsDef) PollInterval() time.Duration
- func (ColumnsDef) WebURL(host string, scope resource.Scope, _ resource.Row) (string, bool)
- type JobsDef
- func (JobsDef) Actions() []resource.Action
- func (JobsDef) Aliases() []string
- func (JobsDef) Args() []string
- func (JobsDef) CellClass(col int, value string) resource.CellClass
- func (JobsDef) Child() string
- func (JobsDef) ChildScope(parent resource.Scope, row resource.Row) resource.Scope
- func (JobsDef) Columns() []resource.Column
- func (JobsDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)
- func (JobsDef) List(ctx context.Context, c *dbx.Clients, _ resource.Scope) ([]resource.Row, error)
- func (JobsDef) Name() string
- func (JobsDef) PollInterval() time.Duration
- func (JobsDef) RowName(row resource.Row) string
- func (JobsDef) RowTags(row resource.Row) []string
- func (JobsDef) WebURL(host string, _ resource.Scope, row resource.Row) (string, bool)
- type PipelinesDef
- func (PipelinesDef) Actions() []resource.Action
- func (PipelinesDef) Aliases() []string
- func (PipelinesDef) Args() []string
- func (PipelinesDef) CellClass(col int, value string) resource.CellClass
- func (PipelinesDef) Child() string
- func (PipelinesDef) ChildScope(parent resource.Scope, row resource.Row) resource.Scope
- func (PipelinesDef) Columns() []resource.Column
- func (PipelinesDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)
- func (PipelinesDef) List(ctx context.Context, c *dbx.Clients, _ resource.Scope) ([]resource.Row, error)
- func (PipelinesDef) Name() string
- func (PipelinesDef) PollInterval() time.Duration
- func (PipelinesDef) WebURL(host string, _ resource.Scope, row resource.Row) (string, bool)
- type RunsDef
- func (RunsDef) Actions() []resource.Action
- func (RunsDef) Aliases() []string
- func (RunsDef) Args() []string
- func (RunsDef) CellClass(col int, value string) resource.CellClass
- func (RunsDef) Child() string
- func (RunsDef) ChildScope(parent resource.Scope, row resource.Row) resource.Scope
- func (RunsDef) Columns() []resource.Column
- func (RunsDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)
- func (RunsDef) List(ctx context.Context, c *dbx.Clients, scope resource.Scope) ([]resource.Row, error)
- func (RunsDef) Name() string
- func (RunsDef) PollInterval() time.Duration
- func (RunsDef) WebURL(host string, scope resource.Scope, row resource.Row) (string, bool)
- type SchemasDef
- func (SchemasDef) Actions() []resource.Action
- func (SchemasDef) Aliases() []string
- func (SchemasDef) Args() []string
- func (SchemasDef) Child() string
- func (SchemasDef) ChildScope(parent resource.Scope, row resource.Row) resource.Scope
- func (SchemasDef) Columns() []resource.Column
- func (SchemasDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)
- func (SchemasDef) List(ctx context.Context, c *dbx.Clients, scope resource.Scope) ([]resource.Row, error)
- func (SchemasDef) Name() string
- func (SchemasDef) PollInterval() time.Duration
- func (SchemasDef) WebURL(host string, scope resource.Scope, row resource.Row) (string, bool)
- type TablesDef
- func (TablesDef) Actions() []resource.Action
- func (TablesDef) Aliases() []string
- func (TablesDef) Args() []string
- func (TablesDef) Child() string
- func (TablesDef) ChildScope(parent resource.Scope, row resource.Row) resource.Scope
- func (TablesDef) Columns() []resource.Column
- func (TablesDef) Describe(ctx context.Context, c *dbx.Clients, scope resource.Scope, row resource.Row) (any, error)
- func (TablesDef) EnterMsg(c *dbx.Clients, scope resource.Scope, row resource.Row) any
- func (TablesDef) List(ctx context.Context, c *dbx.Clients, scope resource.Scope) ([]resource.Row, error)
- func (TablesDef) Name() string
- func (TablesDef) PollInterval() time.Duration
- func (TablesDef) Tabs() []string
- func (TablesDef) WebURL(host string, scope resource.Scope, row resource.Row) (string, bool)
- type TaskRunsDef
- func (TaskRunsDef) Actions() []resource.Action
- func (TaskRunsDef) Aliases() []string
- func (TaskRunsDef) Args() []string
- func (TaskRunsDef) CellClass(col int, value string) resource.CellClass
- func (TaskRunsDef) Child() string
- func (TaskRunsDef) ChildScope(parent resource.Scope, _ resource.Row) resource.Scope
- func (TaskRunsDef) Columns() []resource.Column
- func (TaskRunsDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)
- func (TaskRunsDef) EnterMsg(c *dbx.Clients, scope resource.Scope, row resource.Row) any
- func (TaskRunsDef) List(ctx context.Context, c *dbx.Clients, scope resource.Scope) ([]resource.Row, error)
- func (TaskRunsDef) Name() string
- func (TaskRunsDef) PollInterval() time.Duration
- func (TaskRunsDef) Tabs() []string
- func (TaskRunsDef) WebURL(host string, scope resource.Scope, _ resource.Row) (string, bool)
- type UpdatesDef
- func (UpdatesDef) Actions() []resource.Action
- func (UpdatesDef) Aliases() []string
- func (UpdatesDef) Args() []string
- func (UpdatesDef) CellClass(col int, value string) resource.CellClass
- func (UpdatesDef) Child() string
- func (UpdatesDef) ChildScope(parent resource.Scope, _ resource.Row) resource.Scope
- func (UpdatesDef) Columns() []resource.Column
- func (UpdatesDef) Describe(_ context.Context, _ *dbx.Clients, _ resource.Scope, row resource.Row) (any, error)
- func (UpdatesDef) EnterMsg(c *dbx.Clients, scope resource.Scope, row resource.Row) any
- func (UpdatesDef) List(ctx context.Context, c *dbx.Clients, scope resource.Scope) ([]resource.Row, error)
- func (UpdatesDef) Name() string
- func (UpdatesDef) PollInterval() time.Duration
- func (UpdatesDef) Tabs() []string
- func (UpdatesDef) WebURL(host string, scope resource.Scope, row resource.Row) (string, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRegistry ¶
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) AltWebHint ¶
AltWebHint labels the `O` binding in the key help.
func (AppsDef) AltWebURL ¶
AltWebURL implements resource.AltWebLinker: `O` opens the deployed app itself on its own host, when it has one.
func (AppsDef) CellClass ¶
CellClass colors the COMPUTE, STATUS, and DEPLOYMENT columns semantically.
func (AppsDef) ChildScope ¶
func (AppsDef) EnterMsg ¶
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) PollInterval ¶
PollInterval is 15s — apps state changes matter and the list API is not heavily rate-limited.
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) Columns ¶
func (CatalogsDef) Columns() []resource.Column
func (CatalogsDef) Name ¶
func (CatalogsDef) Name() string
func (CatalogsDef) PollInterval ¶
func (CatalogsDef) PollInterval() time.Duration
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) Columns ¶
func (ColumnsDef) Columns() []resource.Column
func (ColumnsDef) Name ¶
func (ColumnsDef) Name() string
func (ColumnsDef) PollInterval ¶
func (ColumnsDef) PollInterval() time.Duration
type JobsDef ¶
type JobsDef struct{}
JobsDef browses Databricks jobs.
func (JobsDef) CellClass ¶
CellClass implements resource.Styler: the STATUS column carries the last run's verdict color.
func (JobsDef) ChildScope ¶
func (JobsDef) PollInterval ¶
PollInterval is 30s — the jobs list API is rate-limited to 20/s.
func (JobsDef) RowName ¶
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.
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) Columns ¶
func (PipelinesDef) Columns() []resource.Column
func (PipelinesDef) Name ¶
func (PipelinesDef) Name() string
func (PipelinesDef) PollInterval ¶
func (PipelinesDef) PollInterval() time.Duration
type RunsDef ¶
type RunsDef struct{}
RunsDef browses the runs of one job.
func (RunsDef) Actions ¶
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) ChildScope ¶
func (RunsDef) PollInterval ¶
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) Columns ¶
func (SchemasDef) Columns() []resource.Column
func (SchemasDef) Name ¶
func (SchemasDef) Name() string
func (SchemasDef) PollInterval ¶
func (SchemasDef) PollInterval() time.Duration
type TablesDef ¶
type TablesDef struct{}
TablesDef browses tables within a schema.
func (TablesDef) ChildScope ¶
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 ¶
EnterMsg implements resource.Opener: Enter opens the tabbed table view (columns │ data │ details) instead of a plain child drill-down.
func (TablesDef) PollInterval ¶
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) Columns ¶
func (TaskRunsDef) Columns() []resource.Column
func (TaskRunsDef) EnterMsg ¶
EnterMsg implements resource.Opener: selecting a task run opens tabs — its logs beside its metadata — instead of bare describe.
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.
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) Columns ¶
func (UpdatesDef) Columns() []resource.Column
func (UpdatesDef) EnterMsg ¶
EnterMsg implements resource.Opener: selecting an update opens tabs — the pipeline event log beside the update's metadata.
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.