Documentation
¶
Index ¶
- Constants
- func StringPeriod(s string) string
- func TrendingToStoreRepo(tr *discovery.TrendingRepo) *store.Repository
- type Model
- func (m *Model) CurrRow() section.RowData
- func (m *Model) CurrRowIndex() int
- func (m *Model) FetchNextPageSectionRows() []tea.Cmd
- func (m *Model) FirstItem()
- func (m *Model) GetConfig() section.SectionConfig
- func (m *Model) GetId() int
- func (m *Model) GetIsLoading() bool
- func (m *Model) GetTotalCount() int
- func (m *Model) GetType() string
- func (m *Model) IsSearchFocused() bool
- func (m *Model) LastItem()
- func (m *Model) NextRow() section.RowData
- func (m *Model) NumRows() int
- func (m *Model) Pager() string
- func (m *Model) PrevRow()
- func (m *Model) ResetFilters()
- func (m *Model) ResetRows()
- func (m *Model) SetIsLoading(v bool)
- func (m *Model) SetPeriod(period string)
- func (m *Model) SetSize(w, h int)
- func (m *Model) Update(msg tea.Msg) (section.Section, tea.Cmd)
- func (m *Model) UpdateProgramContext(ctx *tuicontext.ProgramContext)
- func (m *Model) View() string
- type TrendingFetchedMsg
- type TrendingRow
Constants ¶
View Source
const ( PeriodDaily = "daily" PeriodWeekly = "weekly" PeriodMonthly = "monthly" )
Variables ¶
This section is empty.
Functions ¶
func StringPeriod ¶
func TrendingToStoreRepo ¶
func TrendingToStoreRepo(tr *discovery.TrendingRepo) *store.Repository
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func NewModel ¶
func NewModel(id int, ctx *tuicontext.ProgramContext, cfg section.SectionConfig, period string) *Model
func (*Model) CurrRowIndex ¶
func (*Model) FetchNextPageSectionRows ¶
func (*Model) GetConfig ¶
func (m *Model) GetConfig() section.SectionConfig
func (*Model) GetIsLoading ¶
func (*Model) GetTotalCount ¶
func (*Model) IsSearchFocused ¶
func (*Model) ResetFilters ¶
func (m *Model) ResetFilters()
func (*Model) SetIsLoading ¶
func (*Model) UpdateProgramContext ¶
func (m *Model) UpdateProgramContext(ctx *tuicontext.ProgramContext)
type TrendingFetchedMsg ¶
type TrendingFetchedMsg struct {
SectionID int
Repos []*discovery.TrendingRepo
Err error
}
type TrendingRow ¶
type TrendingRow struct {
Repo *discovery.TrendingRepo
}
func (TrendingRow) GetColumns ¶
func (r TrendingRow) GetColumns() []string
func (TrendingRow) GetId ¶
func (r TrendingRow) GetId() string
func (TrendingRow) GetTitle ¶
func (r TrendingRow) GetTitle() string
func (TrendingRow) GetUrl ¶
func (r TrendingRow) GetUrl() string
Click to show internal directories.
Click to hide internal directories.