event

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	// ToolInstallationStartedEvent is a partybus event that occurs when a single tool installation has begun
	ToolInstallationStartedEvent partybus.EventType = typePrefix + "-tool-installation-started"

	// ToolUpdateVersionStartedEvent is a partybus event that occurs when a single tool version update has begun (for the update command)
	ToolUpdateVersionStartedEvent partybus.EventType = typePrefix + "-tool-update-version-started"

	// TaskStartedEvent is a generic, monitorable partybus event that occurs when a task has begun
	TaskStartedEvent partybus.EventType = typePrefix + "-task"

	// CLIInstallCmdStarted is a partybus event that occurs when the install CLI command has begun
	CLIInstallCmdStarted partybus.EventType = cliTypePrefix + "-install-cmd-started"

	// CLIUpdateCmdStarted is a partybus event that occurs when the install CLI command has begun
	CLIUpdateCmdStarted partybus.EventType = cliTypePrefix + "-update-cmd-started"

	// CLIReport is a partybus event that occurs when an analysis result is ready for final presentation to stdout
	CLIReport partybus.EventType = cliTypePrefix + "-report"

	// CLINotification is a partybus event that occurs when auxiliary information is ready for presentation to stderr
	CLINotification partybus.EventType = cliTypePrefix + "-notification"
)

Variables

This section is empty.

Functions

func ParseCLINotification

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

func ParseCLIReport

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

func ParseInstallCmdStarted

func ParseInstallCmdStarted(e partybus.Event) ([]string, progress.StagedProgressable, error)

func ParseUpdateLockCmdStarted

func ParseUpdateLockCmdStarted(e partybus.Event) ([]string, progress.StagedProgressable, 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.AtomicStage
	*progress.Manual
}

type Task

type Task struct {
	Title   Title
	Context string
}

func ParseTaskStarted

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

type Title

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

type Tool

type Tool interface {
	Name() string
	Version() string
}

func ParseToolInstallationStarted

func ParseToolInstallationStarted(e partybus.Event) (Tool, progress.StagedProgressable, error)

type ToolUpdate

type ToolUpdate interface {
	Tool
	Updated() string
}

func ParseToolUpdateVersionStarted

func ParseToolUpdateVersionStarted(e partybus.Event) (ToolUpdate, progress.Monitorable, error)

Jump to

Keyboard shortcuts

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