posts

package
v0.0.0-...-699415a Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadPosts

func LoadPosts(m Model) tea.Cmd

Types

type Model

type Model struct {
	Exit bool
	Quit bool
	// contains filtered or unexported fields
}

Model is the Tea state model for this user interface.

func NewModel

func NewModel(cfg *config.ConfigCms, urls config.ConfigURL, dbpool db.DB, user *db.User) Model

NewModel creates a new model with defaults.

func (Model) Init

func (m Model) Init() tea.Cmd

Init is the Tea initialization function.

func (Model) Update

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

Update is the tea update function which handles incoming messages.

func (*Model) UpdatePaging

func (m *Model) UpdatePaging(msg tea.Msg)

UpdatePaging runs an update against the underlying pagination model as well as performing some related tasks on this model.

func (Model) View

func (m Model) View() string

View renders the current UI into a string.

type PostLoader

type PostLoader struct {
	Posts []*db.Post
}

Jump to

Keyboard shortcuts

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