Documentation ¶
Index ¶
- Variables
- func AddressParser(s string) (map[string]any, error)
- func AttributeParser(s string) (map[string]any, error)
- func CIDParser(s string) (any, error)
- func HasBuckets(ctx context.Context, db *bbolt.DB, path [][]byte) (bool, error)
- func LoadBuckets(ctx context.Context, db *bbolt.DB, path [][]byte, bufferSize int) (<-chan Item[*Bucket], error)
- func LoadRecords(ctx context.Context, db *bbolt.DB, path [][]byte, bufferSize int) (<-chan Item[*Record], error)
- func OIDParser(s string) (any, error)
- func OpenDB(path string, writable bool) (*bbolt.DB, error)
- type Bucket
- type BucketsView
- type Config
- type DetailedView
- type Filter
- type HelpPage
- type InputFieldWithHistory
- type Item
- type LoadingBar
- type Primitive
- type Record
- type RecordsView
- func (v *RecordsView) Draw(screen tcell.Screen)
- func (v *RecordsView) GetInnerRect() (int, int, int, int)
- func (v *RecordsView) InputHandler() func(event *tcell.EventKey, _ func(p tview.Primitive))
- func (v *RecordsView) Mount(ctx context.Context) error
- func (v *RecordsView) Unmount()
- func (v *RecordsView) Update(ctx context.Context) error
- type UI
- func (ui *UI) AddCompositeFilter(typ string, parser func(string) (map[string]any, error), helpHint string) error
- func (ui *UI) AddFilter(typ string, parser func(string) (any, error), helpHint string) error
- func (ui *UI) Draw(screen tcell.Screen)
- func (ui *UI) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (ui *UI) WithPrompt(prompt string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ LoadBufferSize: 100, SearchHistorySize: 100, LoadingIndicatorLag: 500 * time.Millisecond, }
Functions ¶
func HasBuckets ¶
HasBuckets checks if a bucket has nested buckets. It relies on assumption that a bucket can have either nested buckets or records but not both.
func LoadBuckets ¶
func LoadRecords ¶
Types ¶
type BucketsView ¶
func NewBucketsView ¶
func NewBucketsView(ui *UI, filter *Filter) *BucketsView
func (*BucketsView) Draw ¶
func (v *BucketsView) Draw(screen tcell.Screen)
func (*BucketsView) InputHandler ¶
func (v *BucketsView) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
func (*BucketsView) Unmount ¶
func (v *BucketsView) Unmount()
type DetailedView ¶
func NewDetailedView ¶
func NewDetailedView(detailed string) *DetailedView
func (*DetailedView) Unmount ¶
func (v *DetailedView) Unmount()
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func (*Filter) Result ¶
func (f *Filter) Result() common.FilterResult
type InputFieldWithHistory ¶
type InputFieldWithHistory struct { *tview.InputField // contains filtered or unexported fields }
func NewInputFieldWithHistory ¶
func NewInputFieldWithHistory(historyLimit int) *InputFieldWithHistory
func (*InputFieldWithHistory) AddToHistory ¶
func (f *InputFieldWithHistory) AddToHistory(s string)
func (*InputFieldWithHistory) InputHandler ¶
func (f *InputFieldWithHistory) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
type LoadingBar ¶
func NewLoadingBar ¶
func NewLoadingBar(needDrawFunc func()) *LoadingBar
func (*LoadingBar) Draw ¶
func (b *LoadingBar) Draw(screen tcell.Screen)
func (*LoadingBar) Start ¶
func (b *LoadingBar) Start(ctx context.Context)
func (*LoadingBar) Stop ¶
func (b *LoadingBar) Stop()
type RecordsView ¶
func NewRecordsView ¶
func NewRecordsView(ui *UI, bucket *Bucket, filter *Filter) *RecordsView
func (*RecordsView) Draw ¶
func (v *RecordsView) Draw(screen tcell.Screen)
func (*RecordsView) GetInnerRect ¶
func (v *RecordsView) GetInnerRect() (int, int, int, int)
func (*RecordsView) InputHandler ¶
func (v *RecordsView) InputHandler() func(event *tcell.EventKey, _ func(p tview.Primitive))
func (*RecordsView) Unmount ¶
func (v *RecordsView) Unmount()
type UI ¶
func (*UI) AddCompositeFilter ¶
func (*UI) InputHandler ¶
func (*UI) WithPrompt ¶
Click to show internal directories.
Click to hide internal directories.