Documentation
¶
Index ¶
- func GetTextInputs() []textinput.Model
- func NewList(items []list.Item, delegate list.ItemDelegate, title string) list.Model
- func RenderInputFields(inputs []textinput.Model, apiDetails string, focusIndex int, width int, ...) string
- func RenderList(list list.Model) string
- type DetailItem
- type DetailsItemDelegate
- type ItemDelegate
- type ListItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTextInputs ¶
GetTextInputs returns two textinput.Model. The first model is meant for a URL. The second model is meant for a token.
func NewList ¶
NewList returns a list given items, delegate and title. Furthermore, the status bar and filtering are disabled. It also sets styles for the title, pagination and help.
func RenderInputFields ¶
func RenderInputFields(inputs []textinput.Model, apiDetails string, focusIndex int, width int, height int) string
RenderInputFields renders the input fields created by GetTextInputs.
func RenderList ¶
RenderList renders a list in the list style with a max width set by list.Width().
Types ¶
type DetailItem ¶
DetailItem is a list.Item and contains the user and token name of a remote.
func (DetailItem) FilterValue ¶
func (d DetailItem) FilterValue() string
FilterValue is required for DetailItem to be a list.Item.
type DetailsItemDelegate ¶
type DetailsItemDelegate struct{}
DetailsItemDelegate is a list.ItemDelegate for DetailItem.
func (DetailsItemDelegate) Height ¶
func (d DetailsItemDelegate) Height() int
Height is required for selectItemDelegate to be a list.ItemDelegate.
func (DetailsItemDelegate) Render ¶
Render is required for selectItemDelegate to be a list.ItemDelegate.
func (DetailsItemDelegate) Spacing ¶
func (d DetailsItemDelegate) Spacing() int
Spacing is required for selectItemDelegate to be a list.ItemDelegate.
type ItemDelegate ¶
type ItemDelegate struct{}
ItemDelegate is a list.ItemDelegate for ListItem.
func (ItemDelegate) Height ¶
func (d ItemDelegate) Height() int
Height is required for selectItemDelegate to be a list.ItemDelegate.
func (ItemDelegate) Spacing ¶
func (d ItemDelegate) Spacing() int
Spacing is required for selectItemDelegate to be a list.ItemDelegate.
type ListItem ¶
type ListItem struct {
Remote *configuration.Remote
}
ListItem is a list.Item and contains a *configuration.Remote.
func (ListItem) FilterValue ¶
FilterValue is required for ListItem to be a list.Item.