response

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// ui
	Spinner  spinner.Model
	Viewport viewport.Model
	Focused  bool
	// data
	Response []byte
	Error    error
}

func New

func New() *Model

func (*Model) Init

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

Init is the first function that will be called. It returns an optional initial command. To not perform an initial command return nil.

func (*Model) Update

func (model *Model) Update(_ tea.Msg) (*Model, tea.Cmd)

Update is called when a message is received. Use it to inspect messages and, in response, update the model and/or send a command.

func (*Model) View

func (model *Model) View() string

View renders the program's UI, which is just a string. The view is rendered after every Update.

Jump to

Keyboard shortcuts

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