models

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostList added in v0.0.2

func NewPostList(f *data.Fetcher) *postListModel

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp(userID string, client *hnapi.HNClient) (*App, error)

func (App) Init

func (a App) Init() tea.Cmd

func (App) Update

func (a App) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (App) View

func (a App) View() string

type PostModel added in v0.0.2

type PostModel struct {
	// contains filtered or unexported fields
}

func NewPost added in v0.0.2

func NewPost(postID string, previous tea.Model, fetcher *data.Fetcher) (*PostModel, error)

func (PostModel) Init added in v0.0.2

func (m PostModel) Init() tea.Cmd

func (PostModel) Update added in v0.0.2

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

func (PostModel) View added in v0.0.2

func (m PostModel) View() string

Jump to

Keyboard shortcuts

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