Documentation
¶
Index ¶
- Constants
- type GroupBucket
- type GroupHeaderRow
- type GroupedRepos
- 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) GroupCounts() map[string]int
- 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) SetGroupBy(groupBy string)
- func (m *Model) SetIsLoading(v bool)
- 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 RepoRow
- type ReposFetchFailedMsg
- type ReposFetchedMsg
Constants ¶
View Source
const ( Uncategorized = "Uncategorized" Untagged = "Untagged" )
View Source
const ( GroupAll = "all" GroupLanguage = "language" GroupCategory = "category" GroupTag = "tag" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupBucket ¶
type GroupBucket struct {
Count int
Repos []*store.Repository
}
type GroupHeaderRow ¶
type GroupHeaderRow struct {
Title string
}
func (GroupHeaderRow) GetColumns ¶
func (r GroupHeaderRow) GetColumns() []string
func (GroupHeaderRow) GetId ¶
func (r GroupHeaderRow) GetId() string
func (GroupHeaderRow) GetTitle ¶
func (r GroupHeaderRow) GetTitle() string
func (GroupHeaderRow) GetUrl ¶
func (r GroupHeaderRow) GetUrl() string
type GroupedRepos ¶
type GroupedRepos struct {
// contains filtered or unexported fields
}
func GroupByCategory ¶
func GroupByCategory(repos []*store.Repository) GroupedRepos
func GroupByLanguage ¶
func GroupByLanguage(repos []*store.Repository) GroupedRepos
func GroupByTag ¶
func GroupByTag(repos []*store.Repository) GroupedRepos
func (GroupedRepos) BucketCount ¶
func (g GroupedRepos) BucketCount(key string) int
func (GroupedRepos) Get ¶
func (g GroupedRepos) Get(key string) []*store.Repository
func (GroupedRepos) GroupCount ¶
func (g GroupedRepos) GroupCount() int
func (GroupedRepos) KeysSorted ¶
func (g GroupedRepos) KeysSorted() []string
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func NewModel ¶
func NewModel(id int, ctx *tuicontext.ProgramContext, cfg section.SectionConfig, groupBy 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) GroupCounts ¶
func (*Model) IsSearchFocused ¶
func (*Model) ResetFilters ¶
func (m *Model) ResetFilters()
func (*Model) SetGroupBy ¶ added in v0.1.0
func (*Model) SetIsLoading ¶
func (*Model) UpdateProgramContext ¶
func (m *Model) UpdateProgramContext(ctx *tuicontext.ProgramContext)
type ReposFetchFailedMsg ¶
type ReposFetchedMsg ¶
type ReposFetchedMsg struct {
SectionID int
Repos []*store.Repository
}
Click to show internal directories.
Click to hide internal directories.