Help us shape the future of Go! Take the 2026 Go Developer Survey

commandresult

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureFollowUpCommandOrder

func EnsureFollowUpCommandOrder(ctx context.Context) context.Context

EnsureFollowUpCommandOrder assigns an order when the context has none.

func FollowUpCommandOrderFromContext

func FollowUpCommandOrderFromContext(ctx context.Context) uint64

FollowUpCommandOrderFromContext returns the workflow command order.

func WithFollowUpCollector

func WithFollowUpCollector(ctx context.Context, collector *FollowUpCollector) context.Context

WithFollowUpCollector stores a collector in the command context.

func WithFollowUpCommandOrder

func WithFollowUpCommandOrder(ctx context.Context, order uint64) context.Context

WithFollowUpCommandOrder stores a workflow command order.

func WithServiceEventMessageCollector

func WithServiceEventMessageCollector(
	ctx context.Context,
	collector *ServiceEventMessageCollector,
) context.Context

WithServiceEventMessageCollector stores a context collector.

Types

type FollowUp

type FollowUp struct {
	ExtensionID  string
	CommandOrder uint64
	EventName    string
	Layer        string
	Text         string
}

FollowUp is one explicit contribution from a completed project post* handler.

type FollowUpCollector

type FollowUpCollector struct {
	// contains filtered or unexported fields
}

FollowUpCollector gathers extension follow-up text for one command.

func FollowUpCollectorFromContext

func FollowUpCollectorFromContext(ctx context.Context) *FollowUpCollector

FollowUpCollectorFromContext returns the collector, if present.

func NewFollowUpCollector

func NewFollowUpCollector() *FollowUpCollector

NewFollowUpCollector creates an empty command follow-up collector.

func (*FollowUpCollector) Add

func (c *FollowUpCollector) Add(item FollowUp)

Add records an explicit follow-up. Empty text retracts that extension's value for this event and layer. Callers must invoke Add only when follow_up was set.

func (*FollowUpCollector) NextCommandOrder

func (c *FollowUpCollector) NextCommandOrder() uint64

NextCommandOrder returns the next workflow command order.

func (*FollowUpCollector) Text

func (c *FollowUpCollector) Text() string

Text resolves contributions after the command. Later workflow commands win before lifecycle order is considered. Within one command, later lifecycle events win, then the last layer in lexicographic order. Empty winning text retracts the extension. Remaining texts are joined in extension ID order.

type ServiceEventMessage

type ServiceEventMessage struct {
	ExtensionID string                    `json:"extensionId"`
	ServiceName string                    `json:"service"`
	EventName   string                    `json:"event"`
	Kind        string                    `json:"kind"`
	Message     string                    `json:"message"`
	Suggestion  string                    `json:"suggestion,omitempty"`
	Links       []ServiceEventMessageLink `json:"links,omitempty"`
}

ServiceEventMessage is a structured message from a deploy handler.

type ServiceEventMessageCollector

type ServiceEventMessageCollector struct {
	// contains filtered or unexported fields
}

ServiceEventMessageCollector gathers messages for one command.

func NewServiceEventMessageCollector

func NewServiceEventMessageCollector() *ServiceEventMessageCollector

NewServiceEventMessageCollector creates an empty command collector.

func ServiceEventMessageCollectorFromContext

func ServiceEventMessageCollectorFromContext(ctx context.Context) *ServiceEventMessageCollector

ServiceEventMessageCollectorFromContext returns the collector.

func (*ServiceEventMessageCollector) Add

Add appends one handler response without interleaving its messages.

func (*ServiceEventMessageCollector) Snapshot

func (c *ServiceEventMessageCollector) Snapshot(serviceOrder []string) []ServiceEventMessage

Snapshot returns messages in deployment-table and lifecycle order.

type ServiceEventMessageLink struct {
	Title string `json:"title,omitempty"`
	URL   string `json:"url"`
}

ServiceEventMessageLink references a deploy message.

Jump to

Keyboard shortcuts

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