Migrate PlantUML
This commit is contained in:
@@ -102,26 +102,6 @@ func (o *ComputeController) Get() {
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title PostPlantUML
|
||||
// @Description parse plantuml text and return the formed compute resources
|
||||
// @Param body body string true "PlantUML text content"
|
||||
// @Success 200 {compute} models.compute
|
||||
// @Failure 406 {string} string "Bad request"
|
||||
// @router /plantuml [post]
|
||||
func (o *ComputeController) PostPlantUML() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
body := o.Ctx.Input.CopyBody(1000000)
|
||||
req := &tools.APIRequest{Username: user, PeerID: peerID, Groups: groups}
|
||||
wf, err := parsePlantUMLText(body, req)
|
||||
if err != nil {
|
||||
o.Data["json"] = map[string]interface{}{"data": nil, "code": 406, "error": err.Error()}
|
||||
o.ServeJSON()
|
||||
return
|
||||
}
|
||||
o.Data["json"] = map[string]interface{}{"data": wf.ComputeResources, "code": 200, "error": nil}
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title Delete
|
||||
// @Description delete the compute
|
||||
// @Param id path string true "The id you want to delete"
|
||||
|
||||
@@ -103,26 +103,6 @@ func (o *DataController) Get() {
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title PostPlantUML
|
||||
// @Description parse plantuml text and return the formed data resources
|
||||
// @Param body body string true "PlantUML text content"
|
||||
// @Success 200 {data} models.data
|
||||
// @Failure 406 {string} string "Bad request"
|
||||
// @router /plantuml [post]
|
||||
func (o *DataController) PostPlantUML() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
body := o.Ctx.Input.CopyBody(1000000)
|
||||
req := &tools.APIRequest{Username: user, PeerID: peerID, Groups: groups}
|
||||
wf, err := parsePlantUMLText(body, req)
|
||||
if err != nil {
|
||||
o.Data["json"] = map[string]interface{}{"data": nil, "code": 406, "error": err.Error()}
|
||||
o.ServeJSON()
|
||||
return
|
||||
}
|
||||
o.Data["json"] = map[string]interface{}{"data": wf.DataResources, "code": 200, "error": nil}
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title Delete
|
||||
// @Description delete the data
|
||||
// @Param id path string true "The id you want to delete"
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"oc-catalog/infrastructure"
|
||||
"strings"
|
||||
|
||||
oclib "cloud.o-forge.io/core/oc-lib"
|
||||
w "cloud.o-forge.io/core/oc-lib/models/workflow"
|
||||
@@ -42,6 +41,7 @@ func (o *GeneralController) GetAll() {
|
||||
Username: user,
|
||||
PeerID: peerID,
|
||||
Groups: groups,
|
||||
Admin: true,
|
||||
}
|
||||
newWorkflow, err = newWorkflow.ExtractFromPlantUML(file, req)
|
||||
if err != nil {
|
||||
@@ -63,40 +63,6 @@ func (o *GeneralController) GetAll() {
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// stringReadCloser wraps a strings.Reader to satisfy the multipart.File interface.
|
||||
type stringReadCloser struct {
|
||||
*strings.Reader
|
||||
}
|
||||
|
||||
func (s *stringReadCloser) Close() error { return nil }
|
||||
|
||||
// parsePlantUMLText parses a raw PlantUML text body and returns the resulting Workflow.
|
||||
func parsePlantUMLText(body []byte, req *tools.APIRequest) (*w.Workflow, error) {
|
||||
newWorkflow := &w.Workflow{}
|
||||
reader := &stringReadCloser{strings.NewReader(string(body))}
|
||||
return newWorkflow.ExtractFromPlantUML(reader, req)
|
||||
}
|
||||
|
||||
// @Title PostPlantUML
|
||||
// @Description parse plantuml text and return the formed workflow object
|
||||
// @Param body body string true "PlantUML text content"
|
||||
// @Success 200 {object} models.workflow
|
||||
// @Failure 406 {string} string "Bad request"
|
||||
// @router /plantuml [post]
|
||||
func (o *GeneralController) PostPlantUML() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
body := o.Ctx.Input.CopyBody(1000000)
|
||||
req := &tools.APIRequest{Username: user, PeerID: peerID, Groups: groups}
|
||||
wf, err := parsePlantUMLText(body, req)
|
||||
if err != nil {
|
||||
o.Data["json"] = map[string]interface{}{"data": nil, "code": 406, "error": err.Error()}
|
||||
o.ServeJSON()
|
||||
return
|
||||
}
|
||||
o.Data["json"] = map[string]interface{}{"data": wf, "code": 200, "error": nil}
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
func Websocket(ctx context.Context, user string, groups []string, dataType int, r http.ResponseWriter, w *http.Request) {
|
||||
websocket.Handler(func(ws *websocket.Conn) {
|
||||
done := make(chan struct{})
|
||||
|
||||
@@ -104,26 +104,6 @@ func (o *ProcessingController) Get() {
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title PostPlantUML
|
||||
// @Description parse plantuml text and return the formed processing resources
|
||||
// @Param body body string true "PlantUML text content"
|
||||
// @Success 200 {processing} models.processing
|
||||
// @Failure 406 {string} string "Bad request"
|
||||
// @router /plantuml [post]
|
||||
func (o *ProcessingController) PostPlantUML() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
body := o.Ctx.Input.CopyBody(1000000)
|
||||
req := &tools.APIRequest{Username: user, PeerID: peerID, Groups: groups}
|
||||
wf, err := parsePlantUMLText(body, req)
|
||||
if err != nil {
|
||||
o.Data["json"] = map[string]interface{}{"data": nil, "code": 406, "error": err.Error()}
|
||||
o.ServeJSON()
|
||||
return
|
||||
}
|
||||
o.Data["json"] = map[string]interface{}{"data": wf.ProcessingResources, "code": 200, "error": nil}
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title Delete
|
||||
// @Description delete the processing
|
||||
// @Param id path string true "The id you want to delete"
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"fmt"
|
||||
|
||||
oclib "cloud.o-forge.io/core/oc-lib"
|
||||
"cloud.o-forge.io/core/oc-lib/tools"
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
@@ -62,36 +61,6 @@ func (o *ResourceController) Search() {
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title PostPlantUML
|
||||
// @Description parse plantuml text and return all formed resource objects
|
||||
// @Param body body string true "PlantUML text content"
|
||||
// @Success 200 {resource} models.resource
|
||||
// @Failure 406 {string} string "Bad request"
|
||||
// @router /plantuml [post]
|
||||
func (o *ResourceController) PostPlantUML() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
body := o.Ctx.Input.CopyBody(1000000)
|
||||
req := &tools.APIRequest{Username: user, PeerID: peerID, Groups: groups}
|
||||
wf, err := parsePlantUMLText(body, req)
|
||||
if err != nil {
|
||||
o.Data["json"] = map[string]interface{}{"data": nil, "code": 406, "error": err.Error()}
|
||||
o.ServeJSON()
|
||||
return
|
||||
}
|
||||
o.Data["json"] = map[string]interface{}{
|
||||
"data": map[string]interface{}{
|
||||
"compute": wf.ComputeResources,
|
||||
"data": wf.DataResources,
|
||||
"storage": wf.StorageResources,
|
||||
"processing": wf.ProcessingResources,
|
||||
"workflow": wf.WorkflowResources,
|
||||
},
|
||||
"code": 200,
|
||||
"error": nil,
|
||||
}
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title Get
|
||||
// @Description find resource by id
|
||||
// @Param id path string true "the id you want to get"
|
||||
|
||||
@@ -102,26 +102,6 @@ func (o *StorageController) Get() {
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title PostPlantUML
|
||||
// @Description parse plantuml text and return the formed storage resources
|
||||
// @Param body body string true "PlantUML text content"
|
||||
// @Success 200 {storage} models.storage
|
||||
// @Failure 406 {string} string "Bad request"
|
||||
// @router /plantuml [post]
|
||||
func (o *StorageController) PostPlantUML() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
body := o.Ctx.Input.CopyBody(1000000)
|
||||
req := &tools.APIRequest{Username: user, PeerID: peerID, Groups: groups}
|
||||
wf, err := parsePlantUMLText(body, req)
|
||||
if err != nil {
|
||||
o.Data["json"] = map[string]interface{}{"data": nil, "code": 406, "error": err.Error()}
|
||||
o.ServeJSON()
|
||||
return
|
||||
}
|
||||
o.Data["json"] = map[string]interface{}{"data": wf.StorageResources, "code": 200, "error": nil}
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title Delete
|
||||
// @Description delete the storage
|
||||
// @Param id path string true "The id you want to delete"
|
||||
|
||||
@@ -102,26 +102,6 @@ func (o *WorkflowController) Get() {
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title PostPlantUML
|
||||
// @Description parse plantuml text and return the formed workflow object
|
||||
// @Param body body string true "PlantUML text content"
|
||||
// @Success 200 {workflow} models.workflow
|
||||
// @Failure 406 {string} string "Bad request"
|
||||
// @router /plantuml [post]
|
||||
func (o *WorkflowController) PostPlantUML() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
body := o.Ctx.Input.CopyBody(1000000)
|
||||
req := &tools.APIRequest{Username: user, PeerID: peerID, Groups: groups}
|
||||
wf, err := parsePlantUMLText(body, req)
|
||||
if err != nil {
|
||||
o.Data["json"] = map[string]interface{}{"data": nil, "code": 406, "error": err.Error()}
|
||||
o.ServeJSON()
|
||||
return
|
||||
}
|
||||
o.Data["json"] = map[string]interface{}{"data": wf, "code": 200, "error": nil}
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title Delete
|
||||
// @Description delete the workflow
|
||||
// @Param id path string true "The id you want to delete"
|
||||
|
||||
2
go.mod
2
go.mod
@@ -3,7 +3,7 @@ module oc-catalog
|
||||
go 1.25.0
|
||||
|
||||
require (
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317133706-562dfb18c1c2
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260318074039-6a907236faec
|
||||
github.com/beego/beego/v2 v2.3.8
|
||||
github.com/smartystreets/goconvey v1.7.2
|
||||
)
|
||||
|
||||
26
go.sum
26
go.sum
@@ -66,6 +66,32 @@ cloud.o-forge.io/core/oc-lib v0.0.0-20260317133239-2a2dd96870ee h1:Quv6iAj2WHdsg
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317133239-2a2dd96870ee/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317133706-562dfb18c1c2 h1:myADSI2TMOfHnFqK4bZGKOkgmuuoNe1xyw6+C/ZJi00=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317133706-562dfb18c1c2/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317135413-67778e1e47f4 h1:5BcA5BYk+0FBna0o0uGOBpNz2OhobC+0gBrrv7Df934=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317135413-67778e1e47f4/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317135927-72be3118b7af h1:IySCYxJrKUpmRa2R3hXSaYxfWf/cm28NRpmwluEmzBI=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317135927-72be3118b7af/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317142554-e758144b462f h1:G8wxkp+7NPlwEPca+H2B2SW+QqUxYlTiRSApQhRnZN4=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317142554-e758144b462f/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317143125-94837f8d2407 h1:g9uvFQW3xng3IBotajMdamaYlY60M+3IeCA05a3cxJ8=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317143125-94837f8d2407/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317144927-7f8d697e4cc4 h1:RN5venI+HB2xnbA24CePTf8z0mpEkYFd7fwAqWaTZwg=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317144927-7f8d697e4cc4/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317150939-5753450965ec h1:EYdJM5SOZQCo/Ew1lOmxp2My8tBTGjrOFU9HlwmTP70=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317150939-5753450965ec/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317151512-96beaade2448 h1:PAAeEUfexpuGs02Q5qHIz+eAOIPXhYL2rX43CJhw7Tk=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317151512-96beaade2448/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317152442-0a87343e3e90 h1:K5PZAJihyjGtSirEvyJvvDVkg9BZ7zp0tWBWHGGMw/8=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317152442-0a87343e3e90/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317153535-c39bc52312f7 h1:WpIYEW3hSn6XZB2k/XYHDgUX1lFj/GhZb8U+nKTakto=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317153535-c39bc52312f7/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317154203-d0645f5ca7a5 h1:vAJfMurcxZfTwL98/yJn+NKh5d4ljn2BYCMQBnJh5dg=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317154203-d0645f5ca7a5/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317154640-cec8033ddc84 h1:Z23MadPTK88abw+YfbuorqUacDTbqjMP62OB7DVFjls=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260317154640-cec8033ddc84/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260318073002-85314baac33c h1:6+S8ZD4fFgC10xohqFVrR1EIkLgjulBzMFLXjMbiFNw=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260318073002-85314baac33c/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260318074039-6a907236faec h1:bDj1QV9bnpUMgoSUygpxkdSC0gXv+rEV/zNjPustU9I=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20260318074039-6a907236faec/go.mod h1:+ENuvBfZdESSvecoqGY/wSvRlT3vinEolxKgwbOhUpA=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/beego/beego/v2 v2.3.4 h1:HurQEOGIEhLlPFCTR6ZDuQkybrUl2Ag2i6CdVD2rGiI=
|
||||
github.com/beego/beego/v2 v2.3.4/go.mod h1:5cqHsOHJIxkq44tBpRvtDe59GuVRVv/9/tyVDxd5ce4=
|
||||
|
||||
BIN
oc-catalog
Executable file
BIN
oc-catalog
Executable file
Binary file not shown.
@@ -52,15 +52,6 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"],
|
||||
beego.ControllerComments{
|
||||
Method: "PostPlantUML",
|
||||
Router: `/plantuml`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"],
|
||||
beego.ControllerComments{
|
||||
Method: "Search",
|
||||
@@ -115,15 +106,6 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:DataController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:DataController"],
|
||||
beego.ControllerComments{
|
||||
Method: "PostPlantUML",
|
||||
Router: `/plantuml`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:DataController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:DataController"],
|
||||
beego.ControllerComments{
|
||||
Method: "Search",
|
||||
@@ -259,15 +241,6 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:GeneralController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:GeneralController"],
|
||||
beego.ControllerComments{
|
||||
Method: "PostPlantUML",
|
||||
Router: `/plantuml`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:ProcessingController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ProcessingController"],
|
||||
beego.ControllerComments{
|
||||
Method: "Post",
|
||||
@@ -313,15 +286,6 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:ProcessingController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ProcessingController"],
|
||||
beego.ControllerComments{
|
||||
Method: "PostPlantUML",
|
||||
Router: `/plantuml`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:ProcessingController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ProcessingController"],
|
||||
beego.ControllerComments{
|
||||
Method: "Search",
|
||||
@@ -385,15 +349,6 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:ResourceController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ResourceController"],
|
||||
beego.ControllerComments{
|
||||
Method: "PostPlantUML",
|
||||
Router: `/plantuml`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:ResourceController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ResourceController"],
|
||||
beego.ControllerComments{
|
||||
Method: "Search",
|
||||
@@ -448,15 +403,6 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:StorageController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:StorageController"],
|
||||
beego.ControllerComments{
|
||||
Method: "PostPlantUML",
|
||||
Router: `/plantuml`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:StorageController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:StorageController"],
|
||||
beego.ControllerComments{
|
||||
Method: "Search",
|
||||
@@ -529,15 +475,6 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:WorkflowController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:WorkflowController"],
|
||||
beego.ControllerComments{
|
||||
Method: "PostPlantUML",
|
||||
Router: `/plantuml`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:WorkflowController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:WorkflowController"],
|
||||
beego.ControllerComments{
|
||||
Method: "Search",
|
||||
|
||||
@@ -60,35 +60,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/compute/plantuml": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"compute"
|
||||
],
|
||||
"description": "parse plantuml text and return the formed compute resources\n\u003cbr\u003e",
|
||||
"operationId": "ComputeController.PostPlantUML",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "body",
|
||||
"name": "body",
|
||||
"description": "PlantUML text content",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{compute} models.compute"
|
||||
},
|
||||
"406": {
|
||||
"description": "{string} string \"Bad request\""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/compute/search/{search}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -237,35 +208,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/data/plantuml": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"data"
|
||||
],
|
||||
"description": "parse plantuml text and return the formed data resources\n\u003cbr\u003e",
|
||||
"operationId": "DataController.PostPlantUML",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "body",
|
||||
"name": "body",
|
||||
"description": "PlantUML text content",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{data} models.data"
|
||||
},
|
||||
"406": {
|
||||
"description": "{string} string \"Bad request\""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/data/search/{search}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -560,38 +502,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/generic/plantuml": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"generic"
|
||||
],
|
||||
"description": "parse plantuml text and return the formed workflow object\n\u003cbr\u003e",
|
||||
"operationId": "GeneralController.PostPlantUML",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "body",
|
||||
"name": "body",
|
||||
"description": "PlantUML text content",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.workflow"
|
||||
}
|
||||
},
|
||||
"406": {
|
||||
"description": "{string} string \"Bad request\""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/processing/": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -637,35 +547,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/processing/plantuml": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"processing"
|
||||
],
|
||||
"description": "parse plantuml text and return the formed processing resources\n\u003cbr\u003e",
|
||||
"operationId": "ProcessingController.PostPlantUML",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "body",
|
||||
"name": "body",
|
||||
"description": "PlantUML text content",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{processing} models.processing"
|
||||
},
|
||||
"406": {
|
||||
"description": "{string} string \"Bad request\""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/processing/search/{search}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -888,35 +769,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/resource/plantuml": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"resource"
|
||||
],
|
||||
"description": "parse plantuml text and return all formed resource objects\n\u003cbr\u003e",
|
||||
"operationId": "ResourceController.PostPlantUML",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "body",
|
||||
"name": "body",
|
||||
"description": "PlantUML text content",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{resource} models.resource"
|
||||
},
|
||||
"406": {
|
||||
"description": "{string} string \"Bad request\""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/resource/search/{search}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -1014,35 +866,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/storage/plantuml": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"storage"
|
||||
],
|
||||
"description": "parse plantuml text and return the formed storage resources\n\u003cbr\u003e",
|
||||
"operationId": "StorageController.PostPlantUML",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "body",
|
||||
"name": "body",
|
||||
"description": "PlantUML text content",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{storage} models.storage"
|
||||
},
|
||||
"406": {
|
||||
"description": "{string} string \"Bad request\""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/storage/search/{search}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -1219,35 +1042,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/workflow/plantuml": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"workflow"
|
||||
],
|
||||
"description": "parse plantuml text and return the formed workflow object\n\u003cbr\u003e",
|
||||
"operationId": "WorkflowController.PostPlantUML",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "body",
|
||||
"name": "body",
|
||||
"description": "PlantUML text content",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{workflow} models.workflow"
|
||||
},
|
||||
"406": {
|
||||
"description": "{string} string \"Bad request\""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/workflow/search/{search}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
|
||||
@@ -100,27 +100,6 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{compute} delete success!'
|
||||
/compute/plantuml:
|
||||
post:
|
||||
tags:
|
||||
- compute
|
||||
description: |-
|
||||
parse plantuml text and return the formed compute resources
|
||||
<br>
|
||||
operationId: ComputeController.PostPlantUML
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: PlantUML text content
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{compute} models.compute'
|
||||
"406":
|
||||
description: '{string} string "Bad request"'
|
||||
/compute/search/{search}:
|
||||
get:
|
||||
tags:
|
||||
@@ -230,27 +209,6 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{data} delete success!'
|
||||
/data/plantuml:
|
||||
post:
|
||||
tags:
|
||||
- data
|
||||
description: |-
|
||||
parse plantuml text and return the formed data resources
|
||||
<br>
|
||||
operationId: DataController.PostPlantUML
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: PlantUML text content
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{data} models.data'
|
||||
"406":
|
||||
description: '{string} string "Bad request"'
|
||||
/data/search/{search}:
|
||||
get:
|
||||
tags:
|
||||
@@ -420,29 +378,6 @@ paths:
|
||||
description: '{compute} models.workflow'
|
||||
"406":
|
||||
description: '{string} string "Bad request"'
|
||||
/generic/plantuml:
|
||||
post:
|
||||
tags:
|
||||
- generic
|
||||
description: |-
|
||||
parse plantuml text and return the formed workflow object
|
||||
<br>
|
||||
operationId: GeneralController.PostPlantUML
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: PlantUML text content
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: ""
|
||||
schema:
|
||||
$ref: '#/definitions/models.workflow'
|
||||
"406":
|
||||
description: '{string} string "Bad request"'
|
||||
/processing/:
|
||||
get:
|
||||
tags:
|
||||
@@ -531,27 +466,6 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{processing} delete success!'
|
||||
/processing/plantuml:
|
||||
post:
|
||||
tags:
|
||||
- processing
|
||||
description: |-
|
||||
parse plantuml text and return the formed processing resources
|
||||
<br>
|
||||
operationId: ProcessingController.PostPlantUML
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: PlantUML text content
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{processing} models.processing'
|
||||
"406":
|
||||
description: '{string} string "Bad request"'
|
||||
/processing/search/{search}:
|
||||
get:
|
||||
tags:
|
||||
@@ -677,27 +591,6 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{resource} models.resource'
|
||||
/resource/plantuml:
|
||||
post:
|
||||
tags:
|
||||
- resource
|
||||
description: |-
|
||||
parse plantuml text and return all formed resource objects
|
||||
<br>
|
||||
operationId: ResourceController.PostPlantUML
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: PlantUML text content
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{resource} models.resource'
|
||||
"406":
|
||||
description: '{string} string "Bad request"'
|
||||
/resource/search/{search}:
|
||||
get:
|
||||
tags:
|
||||
@@ -807,27 +700,6 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{storage} delete success!'
|
||||
/storage/plantuml:
|
||||
post:
|
||||
tags:
|
||||
- storage
|
||||
description: |-
|
||||
parse plantuml text and return the formed storage resources
|
||||
<br>
|
||||
operationId: StorageController.PostPlantUML
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: PlantUML text content
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{storage} models.storage'
|
||||
"406":
|
||||
description: '{string} string "Bad request"'
|
||||
/storage/search/{search}:
|
||||
get:
|
||||
tags:
|
||||
@@ -959,27 +831,6 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{workflow} delete success!'
|
||||
/workflow/plantuml:
|
||||
post:
|
||||
tags:
|
||||
- workflow
|
||||
description: |-
|
||||
parse plantuml text and return the formed workflow object
|
||||
<br>
|
||||
operationId: WorkflowController.PostPlantUML
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: PlantUML text content
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{workflow} models.workflow'
|
||||
"406":
|
||||
description: '{string} string "Bad request"'
|
||||
/workflow/search/{search}:
|
||||
get:
|
||||
tags:
|
||||
|
||||
Reference in New Issue
Block a user