From 951f6e9e177b08c1b2c09d06df9e6ab794076607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Jerman?= Date: Wed, 29 Sep 2021 14:25:57 +0200 Subject: [PATCH] Add context role support for workflows --- automation/types/workflow.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/automation/types/workflow.go b/automation/types/workflow.go index e9eb557f5..055aef912 100644 --- a/automation/types/workflow.go +++ b/automation/types/workflow.go @@ -105,6 +105,21 @@ func (r Workflow) CheckDeferred() bool { return r.Steps.HasDeferred() } +func (r Workflow) Dict() map[string]interface{} { + return map[string]interface{}{ + "ID": r.ID, + "workflowID": r.ID, + "labels": r.Labels, + "ownedBy": r.OwnedBy, + "createdAt": r.CreatedAt, + "createdBy": r.CreatedBy, + "updatedAt": r.UpdatedAt, + "updatedBy": r.UpdatedBy, + "deletedAt": r.DeletedAt, + "deletedBy": r.DeletedBy, + } +} + func (vv *WorkflowMeta) Scan(value interface{}) error { //lint:ignore S1034 This typecast is intentional, we need to get []byte out of a []uint8 switch value.(type) {