controllers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewResultSet

type NewResultSet struct {
	ResultSet *models.ResultSet
	// contains filtered or unexported fields
}

func (NewResultSet) ModeMessage

func (rs NewResultSet) ModeMessage() string

func (NewResultSet) StatusMessage

func (rs NewResultSet) StatusMessage() string

type PromptForTableMsg

type PromptForTableMsg struct {
	Tables     []string
	OnSelected func(tableName string) tea.Cmd
}

type ResultSetUpdated

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

func (ResultSetUpdated) StatusMessage

func (rs ResultSetUpdated) StatusMessage() string

type SetReadWrite

type SetReadWrite struct {
	NewValue bool
}

type State

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

func NewState

func NewState() *State

func (*State) Filter

func (s *State) Filter() string

func (*State) ResultSet

func (s *State) ResultSet() *models.ResultSet

type TableReadController

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

func NewTableReadController

func NewTableReadController(state *State, tableService TableReadService, tableName string) *TableReadController

func (*TableReadController) ExportCSV

func (c *TableReadController) ExportCSV(filename string) tea.Cmd

func (*TableReadController) Filter

func (c *TableReadController) Filter() tea.Cmd

func (*TableReadController) Init

func (c *TableReadController) Init() tea.Cmd

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() tea.Cmd

func (*TableReadController) PromptForQuery

func (c *TableReadController) PromptForQuery() tea.Cmd

func (*TableReadController) Rescan

func (c *TableReadController) Rescan() tea.Cmd

func (*TableReadController) ScanTable

func (c *TableReadController) ScanTable(name string) tea.Cmd

func (*TableReadController) Unmark

func (c *TableReadController) Unmark() tea.Cmd

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) (*models.ResultSet, error)
}

type TableWriteController

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

func NewTableWriteController

func NewTableWriteController(state *State, tableService *tables.Service, tableReadControllers *TableReadController) *TableWriteController

func (*TableWriteController) DeleteAttribute

func (twc *TableWriteController) DeleteAttribute(idx int, key string) tea.Cmd

func (*TableWriteController) DeleteMarked

func (twc *TableWriteController) DeleteMarked() tea.Cmd

func (*TableWriteController) NewItem

func (twc *TableWriteController) NewItem() tea.Cmd

func (*TableWriteController) NoisyTouchItem

func (twc *TableWriteController) NoisyTouchItem(idx int) tea.Cmd

func (*TableWriteController) PutItem

func (twc *TableWriteController) PutItem(idx int) tea.Cmd

func (*TableWriteController) PutItems

func (twc *TableWriteController) PutItems() tea.Cmd

func (*TableWriteController) SetAttributeValue

func (twc *TableWriteController) SetAttributeValue(idx int, itemType models.ItemType, key string) tea.Cmd

func (*TableWriteController) ToggleMark

func (twc *TableWriteController) ToggleMark(idx int) tea.Cmd

func (*TableWriteController) TouchItem

func (twc *TableWriteController) TouchItem(idx int) tea.Cmd

Jump to

Keyboard shortcuts

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