"gerrit.o-ran-sc.org/r/aiml-fw/awmf/modelmgmtservice/logging"
"gerrit.o-ran-sc.org/r/aiml-fw/awmf/modelmgmtservice/models"
"github.com/gin-gonic/gin"
+ "github.com/google/uuid"
+
)
type MmeApiHandler struct {
return
}
+ id := uuid.New()
+ modelInfo.Id = id.String()
+
// TODO: validate the object
if err := m.iDB.Create(modelInfo); err != nil {
logging.INFO("model is saved.")
- cont.JSON(http.StatusCreated, gin.H{})
+ cont.JSON(http.StatusCreated, gin.H{
+ "modelInfo": modelInfo,
+ })
// logging.INFO("Creating model...")
// bodyBytes, _ := io.ReadAll(cont.Request.Body)
github.com/stretchr/testify v1.8.3
gorm.io/driver/postgres v1.5.9
gorm.io/gorm v1.25.12
+ github.com/google/uuid v1.6.0
+
)
require (
gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8=
gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
+github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
+github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=