adding inputs output struct based on argo naming for now

This commit is contained in:
mr 2025-01-24 15:33:57 +01:00
parent 97d466818a
commit 1521b8fac5
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,16 @@
package models
type Artifact struct {
Name string `json:"name" bson:"name" validate:"required"`
Path string `json:"value,omitempty" bson:"value,omitempty"`
From string `json:"from,omitempty" bson:"from,omitempty"`
}
type Param struct {
Name string `json:"name" bson:"name" validate:"required"`
Value string `json:"value,omitempty" bson:"value,omitempty"`
}
type InOutputs struct {
Params []Param `json:"parameters" bson:"parameters"`
Artifacts []Artifact `json:"artifacts" bson:"artifacts"`
}

View File

@ -4,6 +4,7 @@ import (
"slices"
"cloud.o-forge.io/core/oc-lib/config"
"cloud.o-forge.io/core/oc-lib/models/common/models"
"cloud.o-forge.io/core/oc-lib/models/common/pricing"
"cloud.o-forge.io/core/oc-lib/models/peer"
"cloud.o-forge.io/core/oc-lib/models/resources/resource_model"
@ -133,6 +134,8 @@ type ResourceInstance[T ResourcePartnerITF] struct {
Location GeoPoint `json:"location,omitempty" bson:"location,omitempty"`
Country countries.CountryCode `json:"country,omitempty" bson:"country,omitempty"`
AccessProtocol string `json:"access_protocol,omitempty" bson:"access_protocol,omitempty"`
Inputs []models.InOutputs `json:"inputs,omitempty" bson:"inputs,omitempty"`
Outputs []models.InOutputs `json:"outputs,omitempty" bson:"outputs,omitempty"`
Partnerships []T `json:"partnerships,omitempty" bson:"partnerships,omitempty"`
}