model

package
v0.0.0-...-7b17112 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 11 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 {
	SearchTerm   string
	CurrentPage  int
	TotalPages   int
	ItemsPerPage int
	Viewport     viewport.Model
	Content      []Result
	Help         help.Model
	Keys         keybinding.KeyMap
	Ready        bool
}

func InitialModel

func InitialModel(term string, limit int) (Model, error)

func (Model) FooterView

func (m Model) FooterView() string

func (Model) HeaderView

func (m Model) HeaderView() string

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() string

type Result

type Result struct {
	ID   string
	Joke string
}

Jump to

Keyboard shortcuts

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