minor changes

This commit is contained in:
pb 2024-04-04 16:44:46 +02:00
parent c140a742b8
commit 8cdc8e6965
2 changed files with 15 additions and 16 deletions

View File

@ -15,13 +15,21 @@ type DataNEWModel struct {
ShortDescription string `json:"short_description" required:"true" validate:"required"`
Logo string `json:"logo" required:"true" validate:"required"`
// Dtype string `json:"dtype"`
Dtype string `json:"dtype"`
Type string `json:"type,omitempty" required:"true" validate:"required" description:"Define type of data" example:"file"`
Example string `json:"example" required:"true" validate:"required" description:"base64 encoded data"`
Protocol []string `json:"protocol"` //TODO Enum type
Location string `json:"location" required:"true" validate:"required"`
}
type DataIO struct {
Counter uint `description:"Incremental number starting from 0"`
}
type DataObject struct {
ReferenceID primitive.ObjectID `json:"referenceID" description:"Data model ID"`
}
type DataModel struct {
ID string `json:"ID" bson:"_id" required:"true" validate:"required"`
DataNEWModel `bson:",inline"`
@ -34,15 +42,6 @@ func (obj DataModel) getRtype() rtype.Rtype {
func (model DataModel) getName() string {
return model.Name
}
type DataIO struct {
Counter uint `description:"Incremental number starting from 0"`
}
type DataObject struct {
ReferenceID primitive.ObjectID `json:"referenceID" description:"Data model ID"`
}
func (obj DataObject) getHost() *string {
return nil // Host is DC only attribute
}

View File

@ -32,9 +32,9 @@ type DatacenterGpuModel struct {
type DatacenterNEWModel struct {
Name string `json:"name" required:"true"`
// Type string `json:"type,omitempty" required:"true"`
Type string `json:"type,omitempty" required:"true"`
Acronym string `json:"acronym" required:"true" description:"id of the DC"`
// Hosts []string `json:"hosts" required:"true" description:"list of host:port"`
Hosts []string `json:"hosts" required:"true" description:"list of host:port"`
Description string `json:"description" required:"true"`
ShortDescription string `json:"short_description" required:"true" validate:"required"`
Logo string `json:"logo" required:"true" validate:"required"`