oc-catalog update
This commit is contained in:
@@ -128,7 +128,7 @@ func (o *ComputeController) Delete() {
|
||||
// @Param search path string true "the search you want to get"
|
||||
// @Param is_draft query string false "draft wished"
|
||||
// @Success 200 {workflow} models.workflow
|
||||
// @router /search/:search/decentralized/:type [get]
|
||||
// @router /decentralized/:type/search/:search[get]
|
||||
func (o *ComputeController) SearchDecentralized() {
|
||||
user, _, _ := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
search := o.Ctx.Input.Param(":search")
|
||||
|
||||
@@ -129,7 +129,7 @@ func (o *DataController) Delete() {
|
||||
// @Param search path string true "the search you want to get"
|
||||
// @Param is_draft query string false "draft wished"
|
||||
// @Success 200 {workflow} models.workflow
|
||||
// @router /search/:search/decentralized/:type [get]
|
||||
// @router /decentralized/:type/search/:search[get]
|
||||
func (o *DataController) SearchDecentralized() {
|
||||
user, _, _ := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
search := o.Ctx.Input.Param(":search")
|
||||
|
||||
@@ -128,7 +128,7 @@ func (o *ProcessingController) Delete() {
|
||||
// @Param search path string true "the search you want to get"
|
||||
// @Param is_draft query string false "draft wished"
|
||||
// @Success 200 {workflow} models.workflow
|
||||
// @router /search/:search/decentralized/:type [get]
|
||||
// @router /decentralized/:type/search/:search[get]
|
||||
func (o *ProcessingController) SearchDecentralized() {
|
||||
user, _, _ := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
search := o.Ctx.Input.Param(":search")
|
||||
|
||||
@@ -92,7 +92,7 @@ func (o *ResourceController) Get() {
|
||||
// @Param search path string true "the search you want to get"
|
||||
// @Param is_draft query string false "draft wished"
|
||||
// @Success 200 {workflow} models.workflow
|
||||
// @router /search/:search/decentralized/:type [get]
|
||||
// @router /decentralized/:type/search/:search [get]
|
||||
func (o *ResourceController) SearchDecentralized() {
|
||||
user, _, _ := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
search := o.Ctx.Input.Param(":search")
|
||||
|
||||
@@ -128,7 +128,7 @@ func (o *StorageController) Delete() {
|
||||
// @Param search path string true "the search you want to get"
|
||||
// @Param is_draft query string false "draft wished"
|
||||
// @Success 200 {workflow} models.workflow
|
||||
// @router /search/:search/decentralized/:type [get]
|
||||
// @router /decentralized/:type/search/:search[get]
|
||||
func (o *StorageController) SearchDecentralized() {
|
||||
user, _, _ := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
search := o.Ctx.Input.Param(":search")
|
||||
|
||||
@@ -95,7 +95,7 @@ func (o *WorkflowController) Search() {
|
||||
// @Param search path string true "the search you want to get"
|
||||
// @Param is_draft query string false "draft wished"
|
||||
// @Success 200 {workflow} models.workflow
|
||||
// @router /search/:search/decentralized/:type [get]
|
||||
// @router /decentralized/:type/search/:search[get]
|
||||
func (o *WorkflowController) SearchDecentralized() {
|
||||
user, _, _ := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
search := o.Ctx.Input.Param(":search")
|
||||
|
||||
2
main.go
2
main.go
@@ -13,6 +13,6 @@ const appname = "oc-catalog"
|
||||
func main() {
|
||||
// Init the oc-lib
|
||||
oclib.InitAPI(appname)
|
||||
infrastructure.ListenNATS()
|
||||
go infrastructure.ListenNATS()
|
||||
beego.Run()
|
||||
}
|
||||
|
||||
BIN
oc-catalog
BIN
oc-catalog
Binary file not shown.
@@ -52,6 +52,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"],
|
||||
beego.ControllerComments{
|
||||
Method: "SearchDecentralized",
|
||||
Router: `/decentralized/:type/search/:search[get]`,
|
||||
AllowHTTPMethods: []string{"get"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"],
|
||||
beego.ControllerComments{
|
||||
Method: "Search",
|
||||
@@ -106,6 +115,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:DataController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:DataController"],
|
||||
beego.ControllerComments{
|
||||
Method: "SearchDecentralized",
|
||||
Router: `/decentralized/:type/search/:search[get]`,
|
||||
AllowHTTPMethods: []string{"get"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:DataController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:DataController"],
|
||||
beego.ControllerComments{
|
||||
Method: "Search",
|
||||
@@ -286,6 +304,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:ProcessingController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ProcessingController"],
|
||||
beego.ControllerComments{
|
||||
Method: "SearchDecentralized",
|
||||
Router: `/decentralized/:type/search/:search[get]`,
|
||||
AllowHTTPMethods: []string{"get"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:ProcessingController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ProcessingController"],
|
||||
beego.ControllerComments{
|
||||
Method: "Search",
|
||||
@@ -351,9 +378,9 @@ func init() {
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:ResourceController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ResourceController"],
|
||||
beego.ControllerComments{
|
||||
Method: "Delete",
|
||||
Router: `/:id`,
|
||||
AllowHTTPMethods: []string{"delete"},
|
||||
Method: "SearchDecentralized",
|
||||
Router: `/decentralized/:type/search/:search`,
|
||||
AllowHTTPMethods: []string{"get"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
@@ -412,6 +439,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:StorageController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:StorageController"],
|
||||
beego.ControllerComments{
|
||||
Method: "SearchDecentralized",
|
||||
Router: `/decentralized/:type/search/:search[get]`,
|
||||
AllowHTTPMethods: []string{"get"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:StorageController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:StorageController"],
|
||||
beego.ControllerComments{
|
||||
Method: "Search",
|
||||
@@ -484,6 +520,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:WorkflowController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:WorkflowController"],
|
||||
beego.ControllerComments{
|
||||
Method: "SearchDecentralized",
|
||||
Router: `/decentralized/:type/search/:search[get]`,
|
||||
AllowHTTPMethods: []string{"get"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["oc-catalog/controllers:WorkflowController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:WorkflowController"],
|
||||
beego.ControllerComments{
|
||||
Method: "Search",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
window.onload = function() {
|
||||
// Begin Swagger UI call region
|
||||
const ui = SwaggerUIBundle({
|
||||
url: "https://petstore.swagger.io/v2/swagger.json",
|
||||
url: "swagger.json",
|
||||
dom_id: '#swagger-ui',
|
||||
deepLinking: true,
|
||||
presets: [
|
||||
|
||||
@@ -89,6 +89,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/compute/search/{search}/decentralized/{type}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"compute"
|
||||
],
|
||||
"description": "find workflow by key word\n\u003cbr\u003e",
|
||||
"operationId": "ComputeController.Search Decentralized",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "search",
|
||||
"description": "the search you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{workflow} models.workflow"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/compute/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -220,6 +249,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/data/search/{search}/decentralized/{type}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"data"
|
||||
],
|
||||
"description": "find workflow by key word\n\u003cbr\u003e",
|
||||
"operationId": "DataController.Search Decentralized",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "search",
|
||||
"description": "the search you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{workflow} models.workflow"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/data/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -576,6 +634,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/processing/search/{search}/decentralized/{type}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"processing"
|
||||
],
|
||||
"description": "find workflow by key word\n\u003cbr\u003e",
|
||||
"operationId": "ProcessingController.Search Decentralized",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "search",
|
||||
"description": "the search you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{workflow} models.workflow"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/processing/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -769,6 +856,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/resource/decentralized/{type}/search/{search}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"resource"
|
||||
],
|
||||
"description": "find workflow by key word\n\u003cbr\u003e",
|
||||
"operationId": "ResourceController.Search Decentralized",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "search",
|
||||
"description": "the search you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{workflow} models.workflow"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/resource/search/{search}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -819,27 +935,6 @@
|
||||
"description": "{resource} models.resource"
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"resource"
|
||||
],
|
||||
"description": "delete the resource\n\u003cbr\u003e",
|
||||
"operationId": "ResourceController.Delete",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "The id you want to deleteDeleteOne",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{resource} delete success!"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/storage/": {
|
||||
@@ -916,6 +1011,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/storage/search/{search}/decentralized/{type}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"storage"
|
||||
],
|
||||
"description": "find workflow by key word\n\u003cbr\u003e",
|
||||
"operationId": "StorageController.Search Decentralized",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "search",
|
||||
"description": "the search you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{workflow} models.workflow"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/storage/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -1069,7 +1193,36 @@
|
||||
"workflow"
|
||||
],
|
||||
"description": "find workflow by key word\n\u003cbr\u003e",
|
||||
"operationId": "WorkflowController.Get",
|
||||
"operationId": "WorkflowController.Search",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "search",
|
||||
"description": "the search you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{workflow} models.workflow"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/workflow/search/{search}/decentralized/{type}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"workflow"
|
||||
],
|
||||
"description": "find workflow by key word\n\u003cbr\u003e",
|
||||
"operationId": "WorkflowController.Search Decentralized",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
|
||||
@@ -121,6 +121,27 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{compute} models.compute'
|
||||
/compute/search/{search}/decentralized/{type}:
|
||||
get:
|
||||
tags:
|
||||
- compute
|
||||
description: |-
|
||||
find workflow by key word
|
||||
<br>
|
||||
operationId: ComputeController.Search Decentralized
|
||||
parameters:
|
||||
- in: path
|
||||
name: search
|
||||
description: the search you want to get
|
||||
required: true
|
||||
type: string
|
||||
- in: query
|
||||
name: is_draft
|
||||
description: draft wished
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{workflow} models.workflow'
|
||||
/data/:
|
||||
get:
|
||||
tags:
|
||||
@@ -216,6 +237,27 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{data} models.data'
|
||||
/data/search/{search}/decentralized/{type}:
|
||||
get:
|
||||
tags:
|
||||
- data
|
||||
description: |-
|
||||
find workflow by key word
|
||||
<br>
|
||||
operationId: DataController.Search Decentralized
|
||||
parameters:
|
||||
- in: path
|
||||
name: search
|
||||
description: the search you want to get
|
||||
required: true
|
||||
type: string
|
||||
- in: query
|
||||
name: is_draft
|
||||
description: draft wished
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{workflow} models.workflow'
|
||||
/enum/booking/status:
|
||||
get:
|
||||
tags:
|
||||
@@ -487,6 +529,27 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{processing} models.processing'
|
||||
/processing/search/{search}/decentralized/{type}:
|
||||
get:
|
||||
tags:
|
||||
- processing
|
||||
description: |-
|
||||
find workflow by key word
|
||||
<br>
|
||||
operationId: ProcessingController.Search Decentralized
|
||||
parameters:
|
||||
- in: path
|
||||
name: search
|
||||
description: the search you want to get
|
||||
required: true
|
||||
type: string
|
||||
- in: query
|
||||
name: is_draft
|
||||
description: draft wished
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{workflow} models.workflow'
|
||||
/purchase/:
|
||||
get:
|
||||
tags:
|
||||
@@ -591,22 +654,27 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{resource} models.resource'
|
||||
delete:
|
||||
/resource/decentralized/{type}/search/{search}:
|
||||
get:
|
||||
tags:
|
||||
- resource
|
||||
description: |-
|
||||
delete the resource
|
||||
find workflow by key word
|
||||
<br>
|
||||
operationId: ResourceController.Delete
|
||||
operationId: ResourceController.Search Decentralized
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
description: The id you want to deleteDeleteOne
|
||||
name: search
|
||||
description: the search you want to get
|
||||
required: true
|
||||
type: string
|
||||
- in: query
|
||||
name: is_draft
|
||||
description: draft wished
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{resource} delete success!'
|
||||
description: '{workflow} models.workflow'
|
||||
/resource/search/{search}:
|
||||
get:
|
||||
tags:
|
||||
@@ -737,6 +805,27 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{storage} models.storage'
|
||||
/storage/search/{search}/decentralized/{type}:
|
||||
get:
|
||||
tags:
|
||||
- storage
|
||||
description: |-
|
||||
find workflow by key word
|
||||
<br>
|
||||
operationId: StorageController.Search Decentralized
|
||||
parameters:
|
||||
- in: path
|
||||
name: search
|
||||
description: the search you want to get
|
||||
required: true
|
||||
type: string
|
||||
- in: query
|
||||
name: is_draft
|
||||
description: draft wished
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{workflow} models.workflow'
|
||||
/version/:
|
||||
get:
|
||||
tags:
|
||||
@@ -854,7 +943,28 @@ paths:
|
||||
description: |-
|
||||
find workflow by key word
|
||||
<br>
|
||||
operationId: WorkflowController.Get
|
||||
operationId: WorkflowController.Search
|
||||
parameters:
|
||||
- in: path
|
||||
name: search
|
||||
description: the search you want to get
|
||||
required: true
|
||||
type: string
|
||||
- in: query
|
||||
name: is_draft
|
||||
description: draft wished
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{workflow} models.workflow'
|
||||
/workflow/search/{search}/decentralized/{type}:
|
||||
get:
|
||||
tags:
|
||||
- workflow
|
||||
description: |-
|
||||
find workflow by key word
|
||||
<br>
|
||||
operationId: WorkflowController.Search Decentralized
|
||||
parameters:
|
||||
- in: path
|
||||
name: search
|
||||
|
||||
Reference in New Issue
Block a user