util

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ColumnPipelineStatus = "pipelineStatus"
View Source
const ColumnPipelineTriggerMode = "pipelineTriggerMode"

Variables

View Source
var PipelineDefinitionStatusMap = map[apistructs.PipelineStatus]apistructs.PipelineStatus{
	apistructs.PipelineStatusAnalyzed:        apistructs.PipelineStatusAnalyzed,
	apistructs.PipelineStatusBorn:            apistructs.PipelineStatusAnalyzed,
	apistructs.PipelineStatusCreated:         apistructs.PipelineStatusAnalyzed,
	apistructs.PipelineStatusMark:            apistructs.PipelineStatusAnalyzed,
	apistructs.PipelineStatusQueue:           apistructs.PipelineStatusAnalyzed,
	apistructs.PipelineStatusInitializing:    apistructs.PipelineStatusAnalyzed,
	apistructs.PipelineStatusRunning:         apistructs.PipelineStatusRunning,
	apistructs.PipelineStatusCanceling:       apistructs.PipelineStatusCanceling,
	apistructs.PipelineStatusSuccess:         apistructs.PipelineStatusSuccess,
	apistructs.PipelineStatusFailed:          apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusAnalyzeFailed:   apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusPaused:          apistructs.PipelineStatusRunning,
	apistructs.PipelineStatusCreateError:     apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusStartError:      apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusTimeout:         apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusStopByUser:      apistructs.PipelineStatusStopByUser,
	apistructs.PipelineStatusNoNeedBySystem:  apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusCancelByRemote:  apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusError:           apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusUnknown:         apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusDBError:         apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusLostConn:        apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusDisabled:        apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusWaitApproval:    apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusApprovalSuccess: apistructs.PipelineStatusFailed,
	apistructs.PipelineStatusApprovalFail:    apistructs.PipelineStatusFailed,
}
View Source
var PipelineDefinitionStatusMapList = func() map[apistructs.PipelineStatus][]apistructs.PipelineStatus {
	var mapList = map[apistructs.PipelineStatus][]apistructs.PipelineStatus{}
	for k, v := range PipelineDefinitionStatusMap {
		if mapList[v] == nil {
			mapList[v] = []apistructs.PipelineStatus{}
		}
		mapList[v] = append(mapList[v], k)
	}
	return mapList
}()

Functions

func DisplayStatusText

func DisplayStatusText(ctx context.Context, status string) string

func DisplayTriggerModeText

func DisplayTriggerModeText(ctx context.Context, triggerMode string) string

func IsDeepEqual

func IsDeepEqual(objA, objB interface{}) (bool, error)

IsDeepEqual return true if objA and objB is deep equal. Used for unit testing.

func TransferStatus

func TransferStatus(status string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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