From 330768490a61d5a7cba3a7e860d719be4e54db82 Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 29 Jan 2025 11:01:35 +0100 Subject: [PATCH] adding inputs output struct based on argo naming for now^C --- models/common/models/inoutputs.go | 3 ++- models/workflow/graph/link.go | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/models/common/models/inoutputs.go b/models/common/models/inoutputs.go index e1bb27e..ad499d6 100644 --- a/models/common/models/inoutputs.go +++ b/models/common/models/inoutputs.go @@ -7,7 +7,8 @@ type Artifact struct { } type Param struct { - Attr string `json:"attr" bson:"attr" validate:"required"` + Name string `json:"name" bson:"name" validate:"required"` + Attr string `json:"attr,omitempty" bson:"attr,omitempty"` Value string `json:"value,omitempty" bson:"value,omitempty"` Origin string `json:"origin,omitempty" bson:"origin,omitempty"` Readonly bool `json:"readonly" bson:"readonly" default:"true"` diff --git a/models/workflow/graph/link.go b/models/workflow/graph/link.go index a6acc27..bffe2e7 100644 --- a/models/workflow/graph/link.go +++ b/models/workflow/graph/link.go @@ -1,10 +1,17 @@ package graph +type StorageProcessingGraphLink struct { + Write bool `json:"write" bson:"write"` + Source string `json:"source" bson:"source"` + Destination string `json:"destination" bson:"destination"` +} + // GraphLink is a struct that represents a link between two items in a graph type GraphLink struct { - Source Position `bson:"source" json:"source" validate:"required"` // Source is the source graphical position of the link - Destination Position `bson:"destination" json:"destination" validate:"required"` // Destination is the destination graphical position of the link - Style *GraphLinkStyle `bson:"style,omitempty" json:"style,omitempty"` // Style is the graphical style of the link + Source Position `bson:"source" json:"source" validate:"required"` // Source is the source graphical position of the link + Destination Position `bson:"destination" json:"destination" validate:"required"` // Destination is the destination graphical position of the link + Style *GraphLinkStyle `bson:"style,omitempty" json:"style,omitempty"` // Style is the graphical style of the link + StorageLinkInfo *StorageProcessingGraphLink `bson:"storage_link_info,omitempty" json:"storage_link_info,omitempty"` // StorageLinkInfo is the storage link info } // tool function to check if a link is a link between a compute and a resource