Documentation ¶
Index ¶
- Constants
- type ColumnsController
- func (cc *ColumnsController) AddColumn(afterIndex int) tea.Msg
- func (c *ColumnsController) AttributesWithPrefix(prefix string) []string
- func (cc *ColumnsController) Columns() *columns.Columns
- func (cc *ColumnsController) DeleteColumn(afterIndex int) tea.Msg
- func (cc *ColumnsController) SetColumnsToResultSet() tea.Msg
- func (cc *ColumnsController) ShiftColumnLeft(idx int) tea.Msg
- func (cc *ColumnsController) ShiftColumnRight(idx int) tea.Msg
- func (cc *ColumnsController) ToggleVisible(idx int) tea.Msg
- type ColumnsUpdated
- type CustomKeyBindingSource
- type ExportController
- type ExportOptions
- type HideColumnOverlay
- type HideRelatedItemsOverlay
- type JobBuilder
- type JobsController
- type KeyBindingController
- type MarkOp
- type MoveLeftmostDisplayedColumnInTableViewBy
- type NewResultSet
- type PromptForTableMsg
- type RelatedItemSupplier
- type ResultSetUpdated
- type ScriptController
- func (sc *ScriptController) CustomKeyCommand(key string) tea.Cmd
- func (sc *ScriptController) Init()
- func (sc *ScriptController) LoadScript(filename string) tea.Msg
- func (sc *ScriptController) LookupBinding(theKey string) string
- func (sc *ScriptController) LookupCommand(name string) commandctrl.Command
- func (c *ScriptController) LookupRelatedItems(idx int) (res tea.Msg)
- func (sc *ScriptController) Rebind(bindingName string, newKey string) error
- func (sc *ScriptController) RunScript(filename string) tea.Msg
- func (sc *ScriptController) SetMessageSender(sendMsg func(msg tea.Msg))
- func (sc *ScriptController) UnbindKey(key string)
- type SetSelectedColumnInColSelector
- type SetTableItemView
- type SettingsController
- type SettingsProvider
- type SettingsUpdated
- type ShowColumnOverlay
- type ShowRelatedItemsOverlay
- type State
- type TableReadController
- func (c *TableReadController) CopyItemToClipboard(idx int) tea.Msg
- func (c *TableReadController) Filter() tea.Msg
- func (c *TableReadController) Init() tea.Msg
- func (c *TableReadController) ListTables(quitIfNoTable bool) tea.Msg
- func (c *TableReadController) Mark(op MarkOp, where string) tea.Msg
- func (c *TableReadController) NextPage() tea.Msg
- func (c *TableReadController) PromptForQuery() tea.Msg
- func (c *TableReadController) Rescan() tea.Msg
- func (c *TableReadController) ScanTable(name string) tea.Msg
- func (c *TableReadController) ViewBack() tea.Msg
- func (c *TableReadController) ViewForward() tea.Msg
- type TableReadService
- type TableWriteController
- func (twc *TableWriteController) CloneItem(idx int) tea.Msg
- func (twc *TableWriteController) DeleteAttribute(idx int, key string) tea.Msg
- func (twc *TableWriteController) DeleteMarked() tea.Msg
- func (twc *TableWriteController) NewItem() tea.Msg
- func (twc *TableWriteController) NoisyTouchItem(idx int) tea.Msg
- func (twc *TableWriteController) PutItems() tea.Msg
- func (twc *TableWriteController) SetAttributeValue(idx int, itemType models.ItemType, key string) tea.Msg
- func (twc *TableWriteController) ToggleMark(idx int) tea.Msg
- func (twc *TableWriteController) TouchItem(idx int) tea.Msg
- type UIStateProvider
Constants ¶
View Source
const (
BusEventSettingsUpdated = "settings.updated"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnsController ¶
type ColumnsController struct {
// contains filtered or unexported fields
}
func NewColumnsController ¶
func NewColumnsController(eventBus *bus.Bus) *ColumnsController
func (*ColumnsController) AddColumn ¶
func (cc *ColumnsController) AddColumn(afterIndex int) tea.Msg
func (*ColumnsController) AttributesWithPrefix ¶ added in v0.4.0
func (c *ColumnsController) AttributesWithPrefix(prefix string) []string
func (*ColumnsController) Columns ¶
func (cc *ColumnsController) Columns() *columns.Columns
func (*ColumnsController) DeleteColumn ¶
func (cc *ColumnsController) DeleteColumn(afterIndex int) tea.Msg
func (*ColumnsController) SetColumnsToResultSet ¶
func (cc *ColumnsController) SetColumnsToResultSet() tea.Msg
func (*ColumnsController) ShiftColumnLeft ¶
func (cc *ColumnsController) ShiftColumnLeft(idx int) tea.Msg
func (*ColumnsController) ShiftColumnRight ¶
func (cc *ColumnsController) ShiftColumnRight(idx int) tea.Msg
func (*ColumnsController) ToggleVisible ¶
func (cc *ColumnsController) ToggleVisible(idx int) tea.Msg
type ColumnsUpdated ¶
type ColumnsUpdated struct { }
type CustomKeyBindingSource ¶
type ExportController ¶
type ExportController struct {
// contains filtered or unexported fields
}
func NewExportController ¶
func NewExportController( state *State, tableService TableReadService, jobsController *JobsController, columns *ColumnsController, pasteboardProvider services.PasteboardProvider, ) *ExportController
func (*ExportController) ExportCSV ¶
func (c *ExportController) ExportCSV(filename string, opts ExportOptions) tea.Msg
func (*ExportController) ExportCSVToClipboard ¶ added in v0.4.0
func (c *ExportController) ExportCSVToClipboard() tea.Msg
func (*ExportController) ExportToWriter ¶ added in v0.4.0
TODO: this really needs to be a service!
type ExportOptions ¶ added in v0.3.0
type ExportOptions struct { // AllResults returns all results from the table AllResults bool }
type HideColumnOverlay ¶
type HideColumnOverlay struct{}
type HideRelatedItemsOverlay ¶ added in v0.4.0
type HideRelatedItemsOverlay struct{}
type JobBuilder ¶
type JobBuilder[T any] struct { // contains filtered or unexported fields }
func NewJob ¶
func NewJob[T any](jc *JobsController, description string, job func(ctx context.Context) (T, error)) JobBuilder[T]
func (JobBuilder[T]) OnDone ¶
func (jb JobBuilder[T]) OnDone(fn func(res T) tea.Msg) JobBuilder[T]
func (JobBuilder[T]) OnEither ¶
func (jb JobBuilder[T]) OnEither(fn func(res T, err error) tea.Msg) JobBuilder[T]
func (JobBuilder[T]) OnErr ¶
func (jb JobBuilder[T]) OnErr(fn func(err error) tea.Msg) JobBuilder[T]
func (JobBuilder[T]) Submit ¶
func (jb JobBuilder[T]) Submit() tea.Msg
type JobsController ¶
type JobsController struct {
// contains filtered or unexported fields
}
func NewJobsController ¶
func (*JobsController) CancelRunningJob ¶
func (js *JobsController) CancelRunningJob(ifNoJobsRunning func() tea.Msg) tea.Msg
func (*JobsController) SetMessageSender ¶
func (js *JobsController) SetMessageSender(msgSender func(msg tea.Msg))
type KeyBindingController ¶
type KeyBindingController struct {
// contains filtered or unexported fields
}
func NewKeyBindingController ¶
func NewKeyBindingController(service *keybindings.Service, customBindingSource CustomKeyBindingSource) *KeyBindingController
func (*KeyBindingController) LookupCustomBinding ¶
func (kb *KeyBindingController) LookupCustomBinding(key string) tea.Cmd
type MoveLeftmostDisplayedColumnInTableViewBy ¶
type MoveLeftmostDisplayedColumnInTableViewBy int
type NewResultSet ¶
func (NewResultSet) ModeMessage ¶
func (rs NewResultSet) ModeMessage() string
func (NewResultSet) RightModeMessage ¶ added in v0.4.0
func (rs NewResultSet) RightModeMessage() string
func (NewResultSet) StatusMessage ¶
func (rs NewResultSet) StatusMessage() string
type PromptForTableMsg ¶
type RelatedItemSupplier ¶ added in v0.4.0
type ResultSetUpdated ¶
type ResultSetUpdated struct {
// contains filtered or unexported fields
}
func (ResultSetUpdated) StatusMessage ¶
func (rs ResultSetUpdated) StatusMessage() string
type ScriptController ¶
type ScriptController struct {
// contains filtered or unexported fields
}
func NewScriptController ¶
func NewScriptController( scriptManager *scriptmanager.Service, tableReadController *TableReadController, jobController *JobsController, settingsController *SettingsController, eventBus *bus.Bus, ) *ScriptController
func (*ScriptController) CustomKeyCommand ¶
func (sc *ScriptController) CustomKeyCommand(key string) tea.Cmd
func (*ScriptController) Init ¶
func (sc *ScriptController) Init()
func (*ScriptController) LoadScript ¶
func (sc *ScriptController) LoadScript(filename string) tea.Msg
func (*ScriptController) LookupBinding ¶
func (sc *ScriptController) LookupBinding(theKey string) string
func (*ScriptController) LookupCommand ¶
func (sc *ScriptController) LookupCommand(name string) commandctrl.Command
func (*ScriptController) LookupRelatedItems ¶ added in v0.4.0
func (c *ScriptController) LookupRelatedItems(idx int) (res tea.Msg)
func (*ScriptController) Rebind ¶
func (sc *ScriptController) Rebind(bindingName string, newKey string) error
func (*ScriptController) SetMessageSender ¶
func (sc *ScriptController) SetMessageSender(sendMsg func(msg tea.Msg))
func (*ScriptController) UnbindKey ¶
func (sc *ScriptController) UnbindKey(key string)
type SetSelectedColumnInColSelector ¶
type SetSelectedColumnInColSelector int
type SetTableItemView ¶
type SetTableItemView struct {
ViewIndex int
}
type SettingsController ¶
type SettingsController struct {
// contains filtered or unexported fields
}
func NewSettingsController ¶
func NewSettingsController(sp SettingsProvider, bus *bus.Bus) *SettingsController
func (*SettingsController) IsReadOnly ¶
func (sc *SettingsController) IsReadOnly() bool
func (*SettingsController) SetSetting ¶
func (sc *SettingsController) SetSetting(name string, value string) tea.Msg
type SettingsProvider ¶
type SettingsUpdated ¶
type SettingsUpdated struct { }
type ShowColumnOverlay ¶
type ShowColumnOverlay struct{}
type ShowRelatedItemsOverlay ¶ added in v0.4.0
type ShowRelatedItemsOverlay struct { Items []relitems.RelatedItem OnSelected func(item relitems.RelatedItem) tea.Msg }
type TableReadController ¶
type TableReadController struct {
// contains filtered or unexported fields
}
func NewTableReadController ¶
func NewTableReadController( state *State, tableService TableReadService, workspaceService *viewsnapshot.ViewSnapshotService, itemRendererService *itemrenderer.Service, jobController *JobsController, inputHistoryService *inputhistory.Service, eventBus *bus.Bus, pasteboardProvider services.PasteboardProvider, relatedItemSupplier RelatedItemSupplier, tableName string, ) *TableReadController
func (*TableReadController) CopyItemToClipboard ¶
func (c *TableReadController) CopyItemToClipboard(idx int) tea.Msg
func (*TableReadController) Filter ¶
func (c *TableReadController) Filter() tea.Msg
func (*TableReadController) Init ¶
func (c *TableReadController) Init() tea.Msg
Init does an initial scan of the table. If no table is specified, it prompts for a table, then does a scan.
func (*TableReadController) ListTables ¶
func (c *TableReadController) ListTables(quitIfNoTable bool) tea.Msg
func (*TableReadController) Mark ¶
func (c *TableReadController) Mark(op MarkOp, where string) tea.Msg
func (*TableReadController) NextPage ¶
func (c *TableReadController) NextPage() tea.Msg
func (*TableReadController) PromptForQuery ¶
func (c *TableReadController) PromptForQuery() tea.Msg
func (*TableReadController) Rescan ¶
func (c *TableReadController) Rescan() tea.Msg
func (*TableReadController) ScanTable ¶
func (c *TableReadController) ScanTable(name string) tea.Msg
func (*TableReadController) ViewBack ¶
func (c *TableReadController) ViewBack() tea.Msg
func (*TableReadController) ViewForward ¶
func (c *TableReadController) ViewForward() tea.Msg
type TableReadService ¶
type TableReadService interface { ListTables(background context.Context) ([]string, error) Describe(ctx context.Context, table string) (*models.TableInfo, error) Scan(ctx context.Context, tableInfo *models.TableInfo) (*models.ResultSet, error) Filter(resultSet *models.ResultSet, filter string) *models.ResultSet ScanOrQuery(ctx context.Context, tableInfo *models.TableInfo, query models.Queryable, exclusiveStartKey map[string]types.AttributeValue) (*models.ResultSet, error) NextPage(ctx context.Context, resultSet *models.ResultSet) (*models.ResultSet, error) }
type TableWriteController ¶
type TableWriteController struct {
// contains filtered or unexported fields
}
func NewTableWriteController ¶
func NewTableWriteController( state *State, tableService *tables.Service, jobController *JobsController, tableReadControllers *TableReadController, settingProvider SettingsProvider, ) *TableWriteController
func (*TableWriteController) CloneItem ¶ added in v0.4.0
func (twc *TableWriteController) CloneItem(idx int) tea.Msg
func (*TableWriteController) DeleteAttribute ¶
func (twc *TableWriteController) DeleteAttribute(idx int, key string) tea.Msg
func (*TableWriteController) DeleteMarked ¶
func (twc *TableWriteController) DeleteMarked() tea.Msg
func (*TableWriteController) NewItem ¶
func (twc *TableWriteController) NewItem() tea.Msg
func (*TableWriteController) NoisyTouchItem ¶
func (twc *TableWriteController) NoisyTouchItem(idx int) tea.Msg
func (*TableWriteController) PutItems ¶
func (twc *TableWriteController) PutItems() tea.Msg
func (*TableWriteController) SetAttributeValue ¶
func (*TableWriteController) ToggleMark ¶
func (twc *TableWriteController) ToggleMark(idx int) tea.Msg
type UIStateProvider ¶
type UIStateProvider interface {
SelectedRowIndex() int
}
Click to show internal directories.
Click to hide internal directories.