msgs

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsyncHandler

func AsyncHandler(activityChan <-chan AsyncMsg) tea.Cmd

AsyncHandler returns a AsyncMsg from the activityChan.

func HandleCacheExplanationMsg

func HandleCacheExplanationMsg(commandID uuid.UUID, explanation string) tea.Cmd

HandleNewCommandMsg returns a new CacheExplanationMsg.

func HandleEvictCachedExplanationMsg

func HandleEvictCachedExplanationMsg(commandID uuid.UUID) tea.Cmd

HandleEvictCachedExplanationMsg returns a new EvictCachedExplanationMsg.

func HandleExecuteMsg

func HandleExecuteMsg(cmd string) tea.Cmd

HandleExecuteMsg returns a new ExecuteCommandMsg

func HandleNewCommandMsg

func HandleNewCommandMsg(cmd command.Command) tea.Cmd

HandleNewCommandMsg returns a new NewCommandMsg.

func HandleRequestExplanationMsg

func HandleRequestExplanationMsg(cmd command.Command) tea.Cmd

HandleRequestExplanationMsg returns a new RequestExplanationMsg.

func HandleSetExplanationMsg

func HandleSetExplanationMsg(commandID uuid.UUID, explanation string, cache bool) tea.Cmd

HandleNewCommandMsg returns a new SetExplanationMsg.

func HandleUpdateCommandMsg

func HandleUpdateCommandMsg(cmd command.Command) tea.Cmd

HandleUpdateCommandMsg returns a new UpdateCommandMsg.

func PublishAsyncMsg

func PublishAsyncMsg(activityChan chan AsyncMsg, cmd tea.Cmd)

PublishAsyncMsg sends a tea.Msg through the activityChan.

Types

type AsyncMsg

type AsyncMsg struct {
	Msg tea.Msg
}

AsyncMsg wraps the tea.Msg that are going to be handle asynchronously.

type CacheExplanationMsg

type CacheExplanationMsg struct {
	CommandID   uuid.UUID
	Explanation string
}

CacheExplanationMsg is the event triggered for caching the command explanation

type EvictCachedExplanationMsg

type EvictCachedExplanationMsg struct {
	CommandID uuid.UUID
}

EvictCachedExplanationMsg is the event triggered for deleting the cached command explanation

type ExecuteCommandMsg

type ExecuteCommandMsg struct {
	Command string
}

ExecuteCommandMsg is the event triggered for executing a command

type NewCommandMsg

type NewCommandMsg struct {
	Command command.Command
}

NewCommandMsg is the event triggered for creating a new command.

type RequestExplanationMsg

type RequestExplanationMsg struct {
	Command command.Command
}

RequestExplanationMsg is the event triggered when the command explanation is requested.

type SetExplanationMsg

type SetExplanationMsg struct {
	CommandID   uuid.UUID
	Explanation string
	Cache       bool
}

SetExplanationMsg is the event triggered for setting the command explanation

type UpdateCommandMsg

type UpdateCommandMsg struct {
	Command command.Command
}

UpdateCommandMsg is the event triggered for editing a command.

Jump to

Keyboard shortcuts

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