Documentation
¶
Overview ¶
Package chartsview is the read-only browser for chart releases.
The package directory is views/charts but the package is chartsview, so that the release engine it reads from keeps the plain `charts` identifier.
Index ¶
- Constants
- Variables
- func GetChartsHelpContent() []helpview.HelpCategory
- type Model
- func (m *Model) ApplySearchQuery(query string)
- func (m *Model) CapturesInput() bool
- func (m *Model) ClearSearchQuery()
- func (m *Model) FrameContent() string
- func (m *Model) FrameFooter() string
- func (m *Model) FrameHeader() string
- func (m *Model) FrameTitle() string
- func (m *Model) HasActiveFilter() bool
- func (m *Model) HasErrors() bool
- func (m *Model) HelpContent() []helpview.HelpCategory
- func (m *Model) Init() tea.Cmd
- func (m *Model) IsRowExpanded() bool
- func (m *Model) Name() string
- func (m *Model) OnEnter() tea.Cmd
- func (m *Model) OnExit() tea.Cmd
- func (m *Model) SetSize(width, height int)
- func (m *Model) SetVisible(visible bool)
- func (m *Model) ShortHelpItems() []helpbar.HelpEntry
- func (m *Model) Update(msg tea.Msg) tea.Cmd
- func (m *Model) View() string
- type PollRetryMsg
- type ReleasesLoadedMsg
- type SortField
- type SpinnerTickMsg
- type TickMsg
Constants ¶
const ViewName = "charts"
Variables ¶
var PollInterval = 5 * time.Second
PollInterval matches the other resource views. It is a var, not a const, so tests can shrink it: a tea.Tick cmd invoked synchronously blocks for the full interval, and a test that runs one to see what it scheduled would otherwise sit here for five seconds.
Functions ¶
func GetChartsHelpContent ¶
func GetChartsHelpContent() []helpview.HelpCategory
GetChartsHelpContent returns categorized help for the charts view.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func (*Model) ApplySearchQuery ¶
ApplySearchQuery sets the filter query on the release list (app-level "/").
func (*Model) CapturesInput ¶
CapturesInput reports whether the view is currently capturing all input.
func (*Model) ClearSearchQuery ¶
func (m *Model) ClearSearchQuery()
ClearSearchQuery clears the active filter.
func (*Model) FrameContent ¶
func (*Model) FrameFooter ¶
func (*Model) FrameHeader ¶
func (*Model) FrameTitle ¶
func (*Model) HasActiveFilter ¶
HasActiveFilter reports whether a filter query is active.
func (*Model) HelpContent ¶
func (m *Model) HelpContent() []helpview.HelpCategory
HelpContent implements the app's optional help-screen contract: "?" is handled centrally, and a view carrying its own screen supplies it here.
func (*Model) IsRowExpanded ¶
IsRowExpanded tells the app that esc has somewhere to go inside this view: back to the release row from a child, then collapsing the release. Without it the app's esc chain would pop straight out of the view.
Deliberately not routed through CapturesInput, which the ":" handler also consults and which would disable the command bar while a row is expanded.
func (*Model) SetVisible ¶
func (*Model) ShortHelpItems ¶
type PollRetryMsg ¶
type PollRetryMsg struct{}
PollRetryMsg signals that polling found no changes; the Update handler schedules the next tick.
type ReleasesLoadedMsg ¶
type ReleasesLoadedMsg struct {
Releases []releaseItem
// HaveIndexes reports whether there were cached repository indexes to
// compare versions against. Without them the LATEST column is empty for every
// release, which must not read as "everything is up to date".
HaveIndexes bool
Err error
}
ReleasesLoadedMsg carries a completed read of the release records.