posts

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 10 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, stor storage.ObjectStorage) 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