output

package
v1.1.2155 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *slog.Logger

Logger is the global logger for the SHAR CLI.

View Source
var Stream io.Writer = os.Stdout

Stream contains the output stream. By default, this os.Stdout, however, for testing it can be set to a byte buffer for instance.

Functions

This section is empty.

Types

type ExecutionOutput added in v1.1.1331

type ExecutionOutput struct {
	ExecutionId string
	Process     []ProcessInstanceOutput
}

ExecutionOutput is the output format for an execution.

type Json added in v1.0.351

type Json struct {
	Cmd *cobra.Command
}

Json contains the output methods for returning json CLI responses

func (*Json) Output added in v1.1.1841

func (c *Json) Output(content any)

Output outputs the content in json format

func (*Json) OutputDumpExecutionHistory added in v1.1.1772

func (c *Json) OutputDumpExecutionHistory(history []*model.ProcessHistoryEntry)

OutputDumpExecutionHistory outputs an execution's history

func (*Json) OutputDumpProcessInstance added in v1.1.1772

func (c *Json) OutputDumpProcessInstance(history []*model.ProcessHistoryEntry)

OutputDumpProcessInstance outputs a process instance's history

func (*Json) OutputExecutionStatus added in v1.0.645

func (c *Json) OutputExecutionStatus(executionID string, processes map[string][]*model.ProcessHistoryEntry)

OutputExecutionStatus outputs an execution status to console

func (*Json) OutputUserTasks added in v1.1.2151

func (c *Json) OutputUserTasks(userTasks []*client.UserTaskInstance)

OutputUserTasks outputs a list of user tasks

func (*Json) SetCmd added in v1.1.1331

func (c *Json) SetCmd(command *cobra.Command)

SetCmd sets the active command on the output processor

type Outputter added in v1.1.1841

type Outputter interface {
	SetCmd(command *cobra.Command)
	OutputExecutionStatus(executionID string, states map[string][]*model.ProcessHistoryEntry)
	OutputDumpProcessInstance(history []*model.ProcessHistoryEntry)
	OutputDumpExecutionHistory(history []*model.ProcessHistoryEntry)
	OutputUserTasks(userTasks []*client.UserTaskInstance)
	Output(any)
}

Outputter represents the output method

var Current Outputter

Current is the currently selected output method.

type ProcessInstanceOutput added in v1.1.1349

type ProcessInstanceOutput struct {
	ProcessId         string                    `json:"processId,omitempty"`
	ProcessInstanceId string                    `json:"processInstanceId,omitempty"`
	WorkflowName      string                    `json:"workflowName,omitempty"`
	WorkflowId        string                    `json:"workflowId,omitempty"`
	ExecutionId       string                    `json:"executionId,omitempty"`
	State             []ProcessStatusListOutput `json:"state,omitempty"`
}

ProcessInstanceOutput is the output format for displaying processes

type ProcessStatusListOutput added in v1.1.1349

type ProcessStatusListOutput struct {
	ItemType          string   `json:"itemType,omitempty"`
	ElementId         string   `json:"elementId,omitempty"`
	ElementName       string   `json:"elementName,omitempty"`
	CancellationState string   `json:"cancellationState,omitempty"`
	UnixTimeNano      int64    `json:"unixTimeNano,omitempty"`
	Execute           string   `json:"execute,omitempty"`
	Id                []string `json:"id,omitempty"`
	Compensating      bool     `json:"compensating,omitempty"`
	PreviousActivity  string   `json:"previousActivity,omitempty"` // PreviousActivity - the ID of the last activity
	PreviousElement   string   `json:"previousElement,omitempty"`  // PreviousElement - the ID of the last element.
}

ProcessStatusListOutput is the output format for displaying activities and tasks in a process.

type Text added in v1.0.351

type Text struct {
	Cmd *cobra.Command
}

Text provides a client output implementation for console Text provides a client output implementation for console

func (*Text) Output added in v1.1.1841

func (c *Text) Output(data any)

Output outputs the data in text format

func (*Text) OutputDumpExecutionHistory added in v1.1.1772

func (c *Text) OutputDumpExecutionHistory(history []*model.ProcessHistoryEntry)

OutputDumpExecutionHistory outputs an execution's history

func (*Text) OutputDumpProcessInstance added in v1.1.1772

func (c *Text) OutputDumpProcessInstance(history []*model.ProcessHistoryEntry)

OutputDumpProcessInstance outputs a process instance's history

func (*Text) OutputExecutionStatus added in v1.0.645

func (c *Text) OutputExecutionStatus(executionID string, states map[string][]*model.ProcessHistoryEntry)

OutputExecutionStatus outputs an execution status

func (*Text) OutputUserTasks added in v1.1.2151

func (c *Text) OutputUserTasks(userTasks []*client.UserTaskInstance)

OutputUserTasks outputs a list of user tasks

func (*Text) SetCmd added in v1.1.1331

func (c *Text) SetCmd(command *cobra.Command)

SetCmd sets the active command on the output processor

Jump to

Keyboard shortcuts

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