Documentation
¶
Index ¶
- Constants
- func CreateActionListView() list.Model
- func CreatePlanetListView(cfg *configs.ZerotierSwitcherProfile) list.Model
- func CreateRemarkInput(placeholder string, textLimit int) textinput.Model
- func RenderActionListItem(pItem PlanetItem, deleteAble bool) []list.Item
- func RenderPlanetListItem(planets []configs.ZerotierPlanetFile) []list.Item
- type ActionItem
- type AppViewModel
- type PlanetItem
Constants ¶
View Source
const MaxAutoJoinNetworkLength = 64
View Source
const MaxRemarkLength = 64
Variables ¶
This section is empty.
Functions ¶
func CreateActionListView ¶
func CreatePlanetListView ¶
func CreatePlanetListView(cfg *configs.ZerotierSwitcherProfile) list.Model
func RenderActionListItem ¶
func RenderActionListItem(pItem PlanetItem, deleteAble bool) []list.Item
func RenderPlanetListItem ¶
func RenderPlanetListItem(planets []configs.ZerotierPlanetFile) []list.Item
Types ¶
type ActionItem ¶
func (ActionItem) Description ¶
func (i ActionItem) Description() string
func (ActionItem) FilterValue ¶
func (i ActionItem) FilterValue() string
func (ActionItem) Title ¶
func (i ActionItem) Title() string
type AppViewModel ¶
type AppViewModel struct {
IsRunAsRoot bool
Program *tea.Program
// contains filtered or unexported fields
}
func CreateAppView ¶
func CreateAppView(cfg *configs.ZerotierSwitcherProfile) (*AppViewModel, error)
func (AppViewModel) Init ¶
func (m AppViewModel) Init() tea.Cmd
func (AppViewModel) View ¶
func (m AppViewModel) View() string
type PlanetItem ¶
type PlanetItem struct {
Planet *configs.ZerotierPlanetFile
Id string
Name string
Desc string
IsCurrent bool
}
func (PlanetItem) Description ¶
func (i PlanetItem) Description() string
func (PlanetItem) FilterValue ¶
func (i PlanetItem) FilterValue() string
func (PlanetItem) Title ¶
func (i PlanetItem) Title() string
Click to show internal directories.
Click to hide internal directories.