requests

package
v0.0.0-...-73f9428 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package requests defines the models for requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Selected *request.Request
	Requests []*request.Group
	// ui
	List    list.Model
	Focused bool
	Style   lipgloss.Style
	Keymap  keymap.KeyMap
	// contains filtered or unexported fields
}

Model is the collection of requests loaded by the user and TUI components to display them.

func New

func New(dataDir string) *Model

New creates a new Model and applies the provided options.

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init sets the content of the viewport to the list of requests.

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (*Model, tea.Cmd)

Update updates the list and viewport.

func (*Model) View

func (m *Model) View() string

View returns the rendering of the viewport.

Jump to

Keyboard shortcuts

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