equals func on exec + draft container subobject

This commit is contained in:
mr
2024-09-26 15:52:35 +02:00
parent 279090889f
commit 3d58416d9b
2 changed files with 12 additions and 0 deletions

View File

@@ -85,6 +85,10 @@ type WorkflowExecution struct {
WorkflowID string `json:"workflow_id" bson:"workflow_id,omitempty"` // WorkflowID is the ID of the workflow
}
func (wfa *WorkflowExecution) Equals(we *WorkflowExecution) bool {
return wfa.UUID == we.UUID && wfa.ExecDate.Equal(*we.ExecDate) && wfa.WorkflowID == we.WorkflowID
}
// tool to transform the argo status to a state
func (wfa *WorkflowExecution) ArgoStatusToState(status string) *WorkflowExecution {
status = strings.ToLower(status)