Documentation ¶
Index ¶
- Variables
- func AddItemToList(inputScreen InputFormScreen) error
- func BuildHelpItem(title string, keys []HelpKeyBindingSpec) string
- func BuildHelpMenu() string
- func BuildInputItem(formItem InputFormSpec) string
- func BuildInputMenu(formItems []InputFormSpec) string
- func ConvertItemWrappers(wrappers []config.ItemWrapper) []list.Item
- func ConvertListItemsToItemWrappers(items []list.Item) []config.ItemWrapper
- func HandleRemovingItem(screen ItemScreen) (tea.Model, tea.Cmd)
- func InitItems()
- type HelpKeyBindingSpec
- type HelpScreen
- type InputFormScreen
- type InputFormSpec
- type Item
- type ItemDelegate
- type ItemScreen
- type TableScreen
Constants ¶
This section is empty.
Variables ¶
var FilterbyTag = false
Controls the filtering mode
Functions ¶
func AddItemToList ¶
func AddItemToList(inputScreen InputFormScreen) error
Adds an item to the list depending on the values of the form and writes it to config.json
func BuildHelpItem ¶
func BuildHelpItem(title string, keys []HelpKeyBindingSpec) string
Builds the help menu for the given set of key bindings and the tile
func BuildHelpMenu ¶
func BuildHelpMenu() string
Builds the help menu Ascii logo text and help sections with BuildHelpItem()
func BuildInputItem ¶
func BuildInputItem(formItem InputFormSpec) string
BuildInputItem renders a single form item
func BuildInputMenu ¶
func BuildInputMenu(formItems []InputFormSpec) string
BuildInputMenu renders the entire form screen
func ConvertItemWrappers ¶
func ConvertItemWrappers(wrappers []config.ItemWrapper) []list.Item
ConverItemWrappers converts []ItemWrapper to []list.Item
func ConvertListItemsToItemWrappers ¶
func ConvertListItemsToItemWrappers(items []list.Item) []config.ItemWrapper
Convert []list.Item to []ItemWrapper
func HandleRemovingItem ¶ added in v0.1.1
func HandleRemovingItem(screen ItemScreen) (tea.Model, tea.Cmd)
Removes the selected item from the screen and from config.json
Types ¶
type HelpKeyBindingSpec ¶
Help key specification which holds a key and its description
type HelpScreen ¶
type HelpScreen struct {
// contains filtered or unexported fields
}
Help screen (model) Impliments tea.Model interface with : Init, Update , View
func InitializeHelpScreen ¶
func InitializeHelpScreen() HelpScreen
Function to init a new instance of the Help screen
type InputFormScreen ¶
type InputFormScreen struct { Forms []InputFormSpec FocusIndex int CursorMode cursor.Mode }
FormScreen Model impliments tea.Model
func InitInputFormScreen ¶
func InitInputFormScreen() InputFormScreen
Initialize the Input Form Screen with 2 forms
func (InputFormScreen) Init ¶
func (screen InputFormScreen) Init() tea.Cmd
Init function to initialize a blinking cursor
func (InputFormScreen) View ¶
func (screen InputFormScreen) View() string
View function to render the UI
type InputFormSpec ¶
type Item ¶
impliments list.Item interface : FilterValue()
func (Item) FilterValue ¶
The value the fuzzy filter , filters by
type ItemDelegate ¶
type ItemDelegate struct{}
func (ItemDelegate) Height ¶
func (delegate ItemDelegate) Height() int
type ItemScreen ¶
type ItemScreen struct {
// contains filtered or unexported fields
}
Model for the select screen
Impliments the tea.Model interface : Init() Update() View()
func InitItemScreen ¶
func InitItemScreen() ItemScreen
func (ItemScreen) Init ¶
func (screen ItemScreen) Init() tea.Cmd
type TableScreen ¶ added in v0.1.1
type TableScreen struct {
// contains filtered or unexported fields
}
func InitTableScreen ¶ added in v0.1.1
func InitTableScreen() TableScreen
func (TableScreen) Init ¶ added in v0.1.1
func (screen TableScreen) Init() tea.Cmd
func (TableScreen) View ¶ added in v0.1.1
func (screen TableScreen) View() string