fd

package
v0.0.0-...-34b0660 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitAppCmd

func ExitAppCmd(selected string) tea.Cmd

func SaveLocationsCmd

func SaveLocationsCmd(locations map[string]string) tea.Cmd

func SaveSelectedCmd

func SaveSelectedCmd(selected string) tea.Cmd

Types

type AddScreen

type AddScreen struct {
	// contains filtered or unexported fields
}

func NewAddScreen

func NewAddScreen(current string, locations map[string]string) AddScreen

func (AddScreen) Init

func (this AddScreen) Init() tea.Cmd

func (AddScreen) Update

func (this AddScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (AddScreen) View

func (this AddScreen) View() string

type App

type App struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp(viewService ViewService, locationService *LocationService) *App

func (*App) AddLocation

func (this *App) AddLocation(arg string)

func (*App) ViewUserInterface

func (this *App) ViewUserInterface()

type DeleteScreen

type DeleteScreen struct {
	// contains filtered or unexported fields
}

func NewDeleteScreen

func NewDeleteScreen(locations map[string]string) DeleteScreen

func (DeleteScreen) Init

func (this DeleteScreen) Init() tea.Cmd

func (DeleteScreen) Update

func (this DeleteScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (DeleteScreen) View

func (this DeleteScreen) View() string

type ExitAppMsg

type ExitAppMsg struct {
	// contains filtered or unexported fields
}

type LocationService

type LocationService struct {
	// contains filtered or unexported fields
}

func NewLocationService

func NewLocationService() *LocationService

func (*LocationService) CurrentLocation

func (this *LocationService) CurrentLocation() (string, error)

func (*LocationService) ReadSavedLocations

func (this *LocationService) ReadSavedLocations() (map[string]string, error)

func (*LocationService) SaveLocations

func (this *LocationService) SaveLocations(locations map[string]string) error

func (*LocationService) SaveSelectedLocation

func (this *LocationService) SaveSelectedLocation(selected string) error

type SaveLocationsMsg

type SaveLocationsMsg struct {
	// contains filtered or unexported fields
}

type SaveSelectedMsg

type SaveSelectedMsg struct {
	// contains filtered or unexported fields
}

type Screen

type Screen interface {
	Init() tea.Cmd
	Update(msg tea.Msg) (tea.Model, tea.Cmd)
	View() string
}

type SelectScreen

type SelectScreen struct {
	// contains filtered or unexported fields
}

func NewSelectScreen

func NewSelectScreen(locations map[string]string) SelectScreen

func (SelectScreen) Init

func (this SelectScreen) Init() tea.Cmd

func (SelectScreen) Update

func (this SelectScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (SelectScreen) View

func (this SelectScreen) View() string

type ViewService

type ViewService struct {
	// contains filtered or unexported fields
}

func NewViewService

func NewViewService(locationService *LocationService) ViewService

func (ViewService) Init

func (this ViewService) Init() tea.Cmd

func (ViewService) Update

func (this ViewService) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (ViewService) View

func (this ViewService) View() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL