event

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package event provides event types for all events that the library published onto the event bus. By convention, for each event defined here there should be a corresponding event parser defined in the parsers/ child package.

Index

Constants

View Source
const (
	TaskType partybus.EventType = typePrefix + "-task"

	// CLIExitType is a partybus event indicating the main process is to exit
	CLIExitType         partybus.EventType = cliTypePrefix + "-exit-event"
	CLIReportType       partybus.EventType = cliTypePrefix + "-report"
	CLINotificationType partybus.EventType = cliTypePrefix + "-notification"
	CLIInputPromptType  partybus.EventType = cliTypePrefix + "-input-prompt"
)

Variables

This section is empty.

Functions

func ParseCLIInputPromptType

func ParseCLIInputPromptType(e partybus.Event) (bubbly.PromptWriter, error)

func ParseCLINotificationType

func ParseCLINotificationType(e partybus.Event) (string, string, error)

func ParseCLIReportType

func ParseCLIReportType(e partybus.Event) (string, string, error)

Types

type ErrBadPayload

type ErrBadPayload struct {
	Type  partybus.EventType
	Field string
	Value interface{}
}

func (*ErrBadPayload) Error

func (e *ErrBadPayload) Error() string

type ManualStagedProgress

type ManualStagedProgress struct {
	progress.Stage
	progress.Manual
}

type Task

type Task struct {
	Title   Title
	Context string
}

func ParseTaskType

func ParseTaskType(e partybus.Event) (*Task, progress.StagedProgressable, error)

type Title

type Title struct {
	Default      string
	WhileRunning string
	OnSuccess    string
	OnFail       string
}

Jump to

Keyboard shortcuts

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