Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventDispatcher ¶
type EventDispatcher struct {
// contains filtered or unexported fields
}
func NewEventDispatcher ¶
func NewEventDispatcher() *EventDispatcher
func (*EventDispatcher) AddHandler ¶
func (d *EventDispatcher) AddHandler(t partybus.EventType, fn EventHandlerFn)
func (*EventDispatcher) AddHandlers ¶
func (d *EventDispatcher) AddHandlers(handlers map[partybus.EventType]EventHandlerFn)
func (EventDispatcher) RespondsTo ¶
func (d EventDispatcher) RespondsTo() []partybus.EventType
type EventHandler ¶
type EventHandler interface {
partybus.Responder
// Handle optionally generates new models and commands in response to the given event. It might be that the event
// has an effect on the system, but the model is managed by a sub-component, in which case no new model would be
// returned but the Init() call on the managed model would return commands that should be executed in the context
// of the application lifecycle.
Handle(partybus.Event) ([]tea.Model, tea.Cmd)
}
type HandleWaiter ¶
type HandleWaiter interface {
Wait()
}
type HandlerCollection ¶
type HandlerCollection struct {
// contains filtered or unexported fields
}
func NewHandlerCollection ¶
func NewHandlerCollection(handlers ...EventHandler) *HandlerCollection
func (*HandlerCollection) Append ¶
func (h *HandlerCollection) Append(handlers ...EventHandler)
func (HandlerCollection) OnMessage ¶
func (h HandlerCollection) OnMessage(msg tea.Msg)
func (HandlerCollection) RespondsTo ¶
func (h HandlerCollection) RespondsTo() []partybus.EventType
func (HandlerCollection) Wait ¶
func (h HandlerCollection) Wait()
type MessageListener ¶
type PromptWriter ¶
type Prompter ¶
type Prompter struct {
// contains filtered or unexported fields
}
func NewPrompter ¶
func (Prompter) IsSensitive ¶
func (Prompter) PromptMessage ¶
type VisibleModel ¶
Click to show internal directories.
Click to hide internal directories.