Documentation ¶
Index ¶
- Constants
- Variables
- type HttpRequestCmd
- type Items
- func (p *Items) Add(parent, n *Items) (next *Items)
- func (m *Items) Init() tea.Cmd
- func (i *Items) Last() *Items
- func (i Items) PrintHead() string
- func (i Items) PrintTail() string
- func (i Items) PrintTree(d int) string
- func (i *Items) SelectNext()
- func (i *Items) SelectPrev()
- func (m *Items) Update(msg tea.Msg) tea.Cmd
- type MainModel
- func (m MainModel) HandleFocus() (MainModel, tea.Cmd)
- func (m *MainModel) HttpRequest()
- func (m MainModel) Init() tea.Cmd
- func (m MainModel) InitComponent(size tea.WindowSizeMsg) MainModel
- func (m MainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *MainModel) UpdateAll(msg tea.Msg) tea.Cmd
- func (m MainModel) View() string
- type ResponseBody
- type SideBar
- type TextBody
- type UpdateFocus
- type UpdateSize
- type Urlbar
Constants ¶
View Source
const ( Head = iota Tail Folder Req )
View Source
const ( Typing state = iota Focus Blur Close Open )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type HttpRequestCmd ¶
type HttpRequestCmd struct{}
type Items ¶
type Items struct { Name string Typ int Children []*Items Prev *Items Next *Items Parent *Items Selected bool }
func (*Items) SelectNext ¶
func (i *Items) SelectNext()
func (*Items) SelectPrev ¶
func (i *Items) SelectPrev()
type MainModel ¶
type MainModel struct { Viewport viewport.Model Ready bool SideBarState state Style lipgloss.Style // contains filtered or unexported fields }
func InitialModel ¶
func InitialModel() MainModel
func (*MainModel) HttpRequest ¶
func (m *MainModel) HttpRequest()
func (MainModel) InitComponent ¶
func (m MainModel) InitComponent(size tea.WindowSizeMsg) MainModel
type ResponseBody ¶
type ResponseBody struct { Viewport viewport.Model State state Parent tea.Model Style lipgloss.Style }
func MakeResponseBody ¶
func MakeResponseBody(body string, size tea.WindowSizeMsg, updateSize UpdateSize) ResponseBody
func (ResponseBody) Init ¶
func (m ResponseBody) Init() tea.Cmd
func (ResponseBody) Update ¶
func (m ResponseBody) Update(msg tea.Msg) (ResponseBody, tea.Cmd)
func (ResponseBody) View ¶
func (m ResponseBody) View() string
type SideBar ¶
type SideBar struct { Viewport viewport.Model Style lipgloss.Style State state Head Items Tail Items }
func MakeSideBar ¶
func MakeSideBar(size tea.WindowSizeMsg, updateSize UpdateSize) SideBar
type TextBody ¶
type TextBody struct { Body textinput.Model Viewport viewport.Model State state Parent tea.Model Style lipgloss.Style }
func MakeTextBody ¶
func MakeTextBody(body string, size tea.WindowSizeMsg, updateSize UpdateSize) TextBody
type UpdateFocus ¶
type UpdateFocus struct {
Name string
}
type UpdateSize ¶
type UpdateSize tea.WindowSizeMsg
Click to show internal directories.
Click to hide internal directories.