model

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

Documentation

Overview

Package model defines the model for the entire TUI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	CurrentTarget target.Target
	CurrentView   target.View
	Keys          *keymap.KeyMap

	Help         *help.Model
	Environments *environments.Model
	EnvEditor    *enveditor.Model
	Requests     *requests.Model
	Editor       *editor.Model
	Response     *response.Model
}

func New

func New() *Model

func (*Model) Init

func (m *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 (m *Model) Update(msg tea.Msg) (tea.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 (m *Model) View() string

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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