ui

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SmallSkipAmount  = 5
	MediumSkipAmount = 25
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NextPanel added in v0.2.0

type NextPanel struct{}

type NodeDetailsModel

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

func CreateNodeDetailsModel

func CreateNodeDetailsModel(selectedNode *internal.MessageNode) NodeDetailsModel

func (NodeDetailsModel) Init

func (m NodeDetailsModel) Init() tea.Cmd

func (NodeDetailsModel) Update

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

func (NodeDetailsModel) View

func (m NodeDetailsModel) View() string

func (NodeDetailsModel) ViewPayload

func (m NodeDetailsModel) ViewPayload() string

type NodeModel

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

func CreateNodeModel

func CreateNodeModel(node *internal.MessageNode) NodeModel

func (NodeModel) Init

func (m NodeModel) Init() tea.Cmd

func (NodeModel) RenderNodes

func (m NodeModel) RenderNodes() string

func (NodeModel) RenderRootNode

func (m NodeModel) RenderRootNode() string

func (NodeModel) Update

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

func (NodeModel) View

func (m NodeModel) View() string

type NodePublishModel

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

func CreateNodePublishModel

func CreateNodePublishModel(selectedNode *internal.MessageNode) NodePublishModel

func (NodePublishModel) Init

func (m NodePublishModel) Init() tea.Cmd

func (NodePublishModel) Update

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

func (NodePublishModel) View

func (m NodePublishModel) View() string

type PublishMessage

type PublishMessage struct {
	Topic    string
	Payload  []byte
	QoS      byte
	Retained bool
}

type SelectedPanel added in v0.2.0

type SelectedPanel int
const (
	Tree SelectedPanel = iota
	Details
	Publish
)

type SelectedPanelChanged added in v0.2.0

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

type SetSelectedNode

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

type TickMsg

type TickMsg time.Time

type TreeModel

type TreeModel struct {
	Url           *url.URL
	Subscriptions []string
	// contains filtered or unexported fields
}

func CreateTreeModel

func CreateTreeModel(ctx context.Context, url *url.URL, subscriptions []string, mqttClient mqtt.Client, incomingMessages <-chan mqtt.Message) TreeModel

func (TreeModel) Init

func (m TreeModel) Init() tea.Cmd

func (TreeModel) Update

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

func (TreeModel) View

func (m TreeModel) View() string

type ViewContent added in v0.2.0

type ViewContent struct {
	Content string
}

type ViewState added in v0.2.0

type ViewState int
const (
	TreeState ViewState = iota
	DetailsState
)

Jump to

Keyboard shortcuts

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