func getEventAttributes()

in tools/cli/utils.go [336:463]


func getEventAttributes(e *types.HistoryEvent) interface{} {
	var data interface{}
	switch e.GetEventType() {
	case types.EventTypeWorkflowExecutionStarted:
		data = e.WorkflowExecutionStartedEventAttributes

	case types.EventTypeWorkflowExecutionCompleted:
		data = e.WorkflowExecutionCompletedEventAttributes

	case types.EventTypeWorkflowExecutionFailed:
		data = e.WorkflowExecutionFailedEventAttributes

	case types.EventTypeWorkflowExecutionTimedOut:
		data = e.WorkflowExecutionTimedOutEventAttributes

	case types.EventTypeDecisionTaskScheduled:
		data = e.DecisionTaskScheduledEventAttributes

	case types.EventTypeDecisionTaskStarted:
		data = e.DecisionTaskStartedEventAttributes

	case types.EventTypeDecisionTaskCompleted:
		data = e.DecisionTaskCompletedEventAttributes

	case types.EventTypeDecisionTaskTimedOut:
		data = e.DecisionTaskTimedOutEventAttributes

	case types.EventTypeActivityTaskScheduled:
		data = e.ActivityTaskScheduledEventAttributes

	case types.EventTypeActivityTaskStarted:
		data = e.ActivityTaskStartedEventAttributes

	case types.EventTypeActivityTaskCompleted:
		data = e.ActivityTaskCompletedEventAttributes

	case types.EventTypeActivityTaskFailed:
		data = e.ActivityTaskFailedEventAttributes

	case types.EventTypeActivityTaskTimedOut:
		data = e.ActivityTaskTimedOutEventAttributes

	case types.EventTypeActivityTaskCancelRequested:
		data = e.ActivityTaskCancelRequestedEventAttributes

	case types.EventTypeRequestCancelActivityTaskFailed:
		data = e.RequestCancelActivityTaskFailedEventAttributes

	case types.EventTypeActivityTaskCanceled:
		data = e.ActivityTaskCanceledEventAttributes

	case types.EventTypeTimerStarted:
		data = e.TimerStartedEventAttributes

	case types.EventTypeTimerFired:
		data = e.TimerFiredEventAttributes

	case types.EventTypeCancelTimerFailed:
		data = e.CancelTimerFailedEventAttributes

	case types.EventTypeTimerCanceled:
		data = e.TimerCanceledEventAttributes

	case types.EventTypeWorkflowExecutionCancelRequested:
		data = e.WorkflowExecutionCancelRequestedEventAttributes

	case types.EventTypeWorkflowExecutionCanceled:
		data = e.WorkflowExecutionCanceledEventAttributes

	case types.EventTypeRequestCancelExternalWorkflowExecutionInitiated:
		data = e.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes

	case types.EventTypeRequestCancelExternalWorkflowExecutionFailed:
		data = e.RequestCancelExternalWorkflowExecutionFailedEventAttributes

	case types.EventTypeExternalWorkflowExecutionCancelRequested:
		data = e.ExternalWorkflowExecutionCancelRequestedEventAttributes

	case types.EventTypeMarkerRecorded:
		data = e.MarkerRecordedEventAttributes

	case types.EventTypeWorkflowExecutionSignaled:
		data = e.WorkflowExecutionSignaledEventAttributes

	case types.EventTypeWorkflowExecutionTerminated:
		data = e.WorkflowExecutionTerminatedEventAttributes

	case types.EventTypeWorkflowExecutionContinuedAsNew:
		data = e.WorkflowExecutionContinuedAsNewEventAttributes

	case types.EventTypeStartChildWorkflowExecutionInitiated:
		data = e.StartChildWorkflowExecutionInitiatedEventAttributes

	case types.EventTypeStartChildWorkflowExecutionFailed:
		data = e.StartChildWorkflowExecutionFailedEventAttributes

	case types.EventTypeChildWorkflowExecutionStarted:
		data = e.ChildWorkflowExecutionStartedEventAttributes

	case types.EventTypeChildWorkflowExecutionCompleted:
		data = e.ChildWorkflowExecutionCompletedEventAttributes

	case types.EventTypeChildWorkflowExecutionFailed:
		data = e.ChildWorkflowExecutionFailedEventAttributes

	case types.EventTypeChildWorkflowExecutionCanceled:
		data = e.ChildWorkflowExecutionCanceledEventAttributes

	case types.EventTypeChildWorkflowExecutionTimedOut:
		data = e.ChildWorkflowExecutionTimedOutEventAttributes

	case types.EventTypeChildWorkflowExecutionTerminated:
		data = e.ChildWorkflowExecutionTerminatedEventAttributes

	case types.EventTypeSignalExternalWorkflowExecutionInitiated:
		data = e.SignalExternalWorkflowExecutionInitiatedEventAttributes

	case types.EventTypeSignalExternalWorkflowExecutionFailed:
		data = e.SignalExternalWorkflowExecutionFailedEventAttributes

	case types.EventTypeExternalWorkflowExecutionSignaled:
		data = e.ExternalWorkflowExecutionSignaledEventAttributes

	default:
		data = e
	}
	return data
}