event

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 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 added in v0.4.1

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

func ParseCLINotificationType added in v0.4.1

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

func ParseCLIReportType added in v0.4.1

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

Types

type ErrBadPayload added in v0.4.1

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

func (*ErrBadPayload) Error added in v0.4.1

func (e *ErrBadPayload) Error() string

type ManualStagedProgress added in v0.4.1

type ManualStagedProgress struct {
	progress.Stage
	progress.Manual
}

type Task added in v0.2.0

type Task struct {
	Title   Title
	Context string
}

func ParseTaskType added in v0.4.1

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

type Title added in v0.4.1

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