Documentation
¶
Index ¶
- func NewBlockMetaPage(state *State) *interactive.GenericPage
- func NewObjectDataPage(state *State) *interactive.GenericPage
- func NewObjectMetaPage(state *State) *interactive.GenericPage
- func Run(path string) error
- func RunBubbletea(path string) error
- func RunBubbleteaWithOptions(path string, opts *ViewOptions) error
- func RunUnified(ctx context.Context, path string, opts *ViewOptions) error
- type BlkSummary
- type BlockMetaProvider
- type ColInfo
- type ColumnExpander
- type ColumnsCommand
- type Command
- type FormatCommand
- type GotoCommand
- type HelpCommand
- type ObjSummary
- type ObjectDataHandler
- func (h *ObjectDataHandler) FilterRow(row []string, filter string) bool
- func (h *ObjectDataHandler) MatchRow(row []string, query string) bool
- func (h *ObjectDataHandler) OnBack() tea.Cmd
- func (h *ObjectDataHandler) OnCustomKey(key string) tea.Cmd
- func (h *ObjectDataHandler) OnSelect(rowIdx int) tea.Cmd
- type ObjectDataProvider
- type ObjectMetaProvider
- type ObjectUnifiedModel
- type QuitCommand
- type RenameCommand
- type SchemaCommand
- type ScrollCommand
- type SearchCommand
- type SearchMatch
- type SetCommand
- type State
- func (s *State) AllRows() ([][]string, []string, error)
- func (s *State) ClearObjectToOpen()
- func (s *State) Close()
- func (s *State) Columns() []objecttool.ColInfo
- func (s *State) CurrentRows() ([][]string, []string, error)
- func (s *State) FilteredRowCount() int64
- func (s *State) GetBlockStartRow(blockIdx uint32) int64
- func (s *State) GetObjectToOpen() string
- func (s *State) GlobalRowOffset() int64
- func (s *State) GotoBlock(blockIdx uint32) error
- func (s *State) GotoRow(globalRow int64) error
- func (s *State) NextPage() error
- func (s *State) PrevPage() error
- func (s *State) ScrollDown() error
- func (s *State) ScrollUp() error
- func (s *State) SetFormat(colIdx uint16, formatterName string) error
- func (s *State) SetRowRange(start, end int64)
- func (s *State) SwitchToBlkMeta() error
- func (s *State) SwitchToData()
- func (s *State) SwitchToObjMeta() error
- type SwitchModeCommand
- type VRowsCommand
- type VerticalCommand
- type View
- type ViewMode
- type ViewOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBlockMetaPage ¶
func NewBlockMetaPage(state *State) *interactive.GenericPage
func NewObjectDataPage ¶
func NewObjectDataPage(state *State) *interactive.GenericPage
func NewObjectMetaPage ¶
func NewObjectMetaPage(state *State) *interactive.GenericPage
func RunBubbletea ¶
RunBubbletea runs interactive interface using Bubbletea
func RunBubbleteaWithOptions ¶
func RunBubbleteaWithOptions(path string, opts *ViewOptions) error
RunBubbleteaWithOptions runs interactive interface with options
func RunUnified ¶
func RunUnified(ctx context.Context, path string, opts *ViewOptions) error
RunUnified runs the object viewer using the unified GenericPage framework
Types ¶
type BlkSummary ¶
type BlkSummary struct {
BlockID uint32
TotalOriginSize uint32
TotalCompSize uint32
CompressionRatio float64
}
BlkSummary contains summary information for a block
type BlockMetaProvider ¶
type BlockMetaProvider struct {
// contains filtered or unexported fields
}
func (*BlockMetaProvider) GetOverview ¶
func (p *BlockMetaProvider) GetOverview() string
func (*BlockMetaProvider) GetRowNums ¶
func (p *BlockMetaProvider) GetRowNums() []string
func (*BlockMetaProvider) GetRows ¶
func (p *BlockMetaProvider) GetRows() [][]string
type ColumnExpander ¶
type ColumnExpander struct {
SourceCol uint16 // Source column index to expand
NewCols []string // New column names
NewTypes []types.Type // New column types
ExpandFunc func(any) []any // Function to expand value into multiple values
}
ColumnExpander defines how to expand a column into multiple columns
type ColumnsCommand ¶
ColumnsCommand is the column filter command
type FormatCommand ¶
FormatCommand sets format
type GotoCommand ¶
GotoCommand is the goto command
type ObjSummary ¶
type ObjSummary struct {
TotalRows uint64
TotalNullCnt uint64
TotalOriginSize uint64
TotalCompSize uint64
CompressionRatio float64
}
ObjSummary contains summary information for an object
type ObjectDataHandler ¶
type ObjectDataHandler struct {
// contains filtered or unexported fields
}
func (*ObjectDataHandler) FilterRow ¶
func (h *ObjectDataHandler) FilterRow(row []string, filter string) bool
func (*ObjectDataHandler) MatchRow ¶
func (h *ObjectDataHandler) MatchRow(row []string, query string) bool
func (*ObjectDataHandler) OnBack ¶
func (h *ObjectDataHandler) OnBack() tea.Cmd
func (*ObjectDataHandler) OnCustomKey ¶
func (h *ObjectDataHandler) OnCustomKey(key string) tea.Cmd
type ObjectDataProvider ¶
type ObjectDataProvider struct {
// contains filtered or unexported fields
}
func (*ObjectDataProvider) GetOverview ¶
func (p *ObjectDataProvider) GetOverview() string
func (*ObjectDataProvider) GetRowNums ¶
func (p *ObjectDataProvider) GetRowNums() []string
func (*ObjectDataProvider) GetRows ¶
func (p *ObjectDataProvider) GetRows() [][]string
type ObjectMetaProvider ¶
type ObjectMetaProvider struct {
// contains filtered or unexported fields
}
func (*ObjectMetaProvider) GetOverview ¶
func (p *ObjectMetaProvider) GetOverview() string
func (*ObjectMetaProvider) GetRowNums ¶
func (p *ObjectMetaProvider) GetRowNums() []string
func (*ObjectMetaProvider) GetRows ¶
func (p *ObjectMetaProvider) GetRows() [][]string
type ObjectUnifiedModel ¶
type ObjectUnifiedModel struct {
// contains filtered or unexported fields
}
ObjectUnifiedModel uses GenericPage for object viewing
func NewObjectUnifiedModel ¶
func NewObjectUnifiedModel(ctx context.Context, reader *objecttool.ObjectReader, opts *ViewOptions) *ObjectUnifiedModel
NewObjectUnifiedModel creates a new unified model for object viewing
func (*ObjectUnifiedModel) ClearObjectToOpen ¶
func (m *ObjectUnifiedModel) ClearObjectToOpen()
ClearObjectToOpen clears the object to open
func (*ObjectUnifiedModel) GetObjectToOpen ¶
func (m *ObjectUnifiedModel) GetObjectToOpen() string
GetObjectToOpen returns the object path to open (if any)
func (*ObjectUnifiedModel) Init ¶
func (m *ObjectUnifiedModel) Init() tea.Cmd
func (*ObjectUnifiedModel) View ¶
func (m *ObjectUnifiedModel) View() string
type RenameCommand ¶
RenameCommand renames a column
type ScrollCommand ¶
ScrollCommand is the scroll command
type SearchCommand ¶
type SearchCommand struct {
Pattern string
}
loadHistory loads command history SearchCommand is the search command
type SearchMatch ¶
type SetCommand ¶
SetCommand sets options
type State ¶
type State struct {
// contains filtered or unexported fields
}
State represents the browsing state
func NewState ¶
func NewState(ctx context.Context, reader *objecttool.ObjectReader) *State
func (*State) ClearObjectToOpen ¶
func (s *State) ClearObjectToOpen()
ClearObjectToOpen clears the object to open
func (*State) Columns ¶
func (s *State) Columns() []objecttool.ColInfo
Columns returns column information based on current mode
func (*State) CurrentRows ¶
CurrentRows returns the current page data (formatted strings) Returns: rows, rowNumbers, error
func (*State) FilteredRowCount ¶
FilteredRowCount returns the number of rows after filtering
func (*State) GetBlockStartRow ¶
GetBlockStartRow returns the starting row number for a block
func (*State) GetObjectToOpen ¶
GetObjectToOpen returns the object path to open (if any)
func (*State) GlobalRowOffset ¶
GlobalRowOffset returns current global row offset
func (*State) SetRowRange ¶
SetRowRange sets the row range filter
func (*State) SwitchToBlkMeta ¶
func (*State) SwitchToData ¶
func (s *State) SwitchToData()
func (*State) SwitchToObjMeta ¶
type SwitchModeCommand ¶
type SwitchModeCommand struct {
Mode ViewMode
}
SwitchModeCommand switches view mode
type VRowsCommand ¶
type VRowsCommand struct {
Rows int
}
VRowsCommand sets number of rows to display in vertical mode
type VerticalCommand ¶
type VerticalCommand struct {
Enable bool
}
VerticalCommand switches vertical/table mode
type View ¶
type View struct {
// contains filtered or unexported fields
}
View is a simplified terminal view
type ViewOptions ¶
type ViewOptions struct {
StartRow int64 // Start row (0-based)
EndRow int64 // End row (inclusive, -1 means all)
ColumnNames map[uint16]string // Custom column names
ColumnFormats map[uint16]string // Custom column formats (e.g., "ts", "objectstats", "hex")
ColumnExpander *ColumnExpander // Column expander for splitting columns
ObjectNameCol int // Column index containing object name for drill-down (-1 to disable)
BaseDir string // Base directory for opening nested objects
CustomOverview func(rows [][]string) string // Custom overview function
}
ViewOptions contains options for viewing object data