model

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package model provides Bubble Tea models for CLI commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CleanupModel

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

CleanupModel wraps styles.CleanupModel for standalone use.

func NewCleanupModel

func NewCleanupModel(theme *styles.Theme, historyUC *usecase.SearchHistoryUseCase) CleanupModel

NewCleanupModel creates a new cleanup command model.

func (CleanupModel) Init

func (m CleanupModel) Init() tea.Cmd

Init implements tea.Model.

func (CleanupModel) Update

func (m CleanupModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (CleanupModel) View

func (m CleanupModel) View() string

View implements tea.Model.

type DmenuModel

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

DmenuModel is the Bubble Tea model for interactive dmenu.

func NewDmenuModel

func NewDmenuModel(theme *styles.Theme, historyUC *usecase.SearchHistoryUseCase) DmenuModel

NewDmenuModel creates a new dmenu model.

func (DmenuModel) Init

func (m DmenuModel) Init() tea.Cmd

Init implements tea.Model.

func (DmenuModel) SelectedURL

func (m DmenuModel) SelectedURL() string

SelectedURL returns the URL selected by the user.

func (DmenuModel) Update

func (m DmenuModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (DmenuModel) View

func (m DmenuModel) View() string

View implements tea.Model.

type HistoryListModel

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

HistoryListModel is a simpler non-interactive model for JSON output.

func NewHistoryListModel

func NewHistoryListModel(ctx context.Context, historyUC *usecase.SearchHistoryUseCase, maxEntries int) HistoryListModel

NewHistoryListModel creates a model for list output.

func (HistoryListModel) Entries

func (m HistoryListModel) Entries() []*entity.HistoryEntry

Entries returns the loaded entries.

func (HistoryListModel) Error

func (m HistoryListModel) Error() error

Error returns any error that occurred.

func (HistoryListModel) Init

func (m HistoryListModel) Init() tea.Cmd

Init implements tea.Model.

func (HistoryListModel) Update

func (m HistoryListModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (HistoryListModel) View

func (m HistoryListModel) View() string

View implements tea.Model.

type HistoryModel

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

HistoryModel is the Bubble Tea model for interactive history browser.

func NewHistoryModel

func NewHistoryModel(ctx context.Context, theme *styles.Theme, historyUC *usecase.SearchHistoryUseCase) HistoryModel

NewHistoryModel creates a new history browser model.

func (HistoryModel) Init

func (m HistoryModel) Init() tea.Cmd

Init implements tea.Model.

func (HistoryModel) Update

func (m HistoryModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (HistoryModel) View

func (m HistoryModel) View() string

View implements tea.Model.

type PurgeModel

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

PurgeModel wraps styles.PurgeModel for standalone CLI use.

func NewPurgeModel

func NewPurgeModel(theme *styles.Theme, purgeUC *usecase.PurgeDataUseCase) PurgeModel

NewPurgeModel creates a new purge command model.

func (PurgeModel) Init

func (m PurgeModel) Init() tea.Cmd

Init implements tea.Model.

func (PurgeModel) Update

func (m PurgeModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (PurgeModel) View

func (m PurgeModel) View() string

View implements tea.Model.

type StatsModel

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

StatsModel displays history analytics.

func NewStatsModel

func NewStatsModel(theme *styles.Theme, historyUC *usecase.SearchHistoryUseCase) StatsModel

NewStatsModel creates a new stats display model.

func (StatsModel) Init

func (m StatsModel) Init() tea.Cmd

Init implements tea.Model.

func (StatsModel) Update

func (m StatsModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (StatsModel) View

func (m StatsModel) View() string

View implements tea.Model.

Jump to

Keyboard shortcuts

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