Compare commits
No commits in common. "5b709abd0e711b9489088c5527f2d9c26d532d9f" and "914e3134c25e4b3497ed838cb12b9b66a2587ed1" have entirely different histories.
5b709abd0e
...
914e3134c2
0
Dockerfile
Executable file → Normal file
0
Dockerfile
Executable file → Normal file
0
LICENSE.md
Executable file → Normal file
0
LICENSE.md
Executable file → Normal file
0
catalog.json
Executable file → Normal file
0
catalog.json
Executable file → Normal file
0
conf/app.conf
Executable file → Normal file
0
conf/app.conf
Executable file → Normal file
24
controllers/compute.go
Executable file → Normal file
24
controllers/compute.go
Executable file → Normal file
@ -12,8 +12,6 @@ type ComputeController struct {
|
|||||||
beego.Controller
|
beego.Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
var comp_collection = oclib.LibDataEnum(oclib.COMPUTE_RESOURCE)
|
|
||||||
|
|
||||||
// @Title Update
|
// @Title Update
|
||||||
// @Description create computes
|
// @Description create computes
|
||||||
// @Param id path string true "the compute id you want to get"
|
// @Param id path string true "the compute id you want to get"
|
||||||
@ -21,12 +19,11 @@ var comp_collection = oclib.LibDataEnum(oclib.COMPUTE_RESOURCE)
|
|||||||
// @Success 200 {compute} models.compute
|
// @Success 200 {compute} models.compute
|
||||||
// @router /:id [put]
|
// @router /:id [put]
|
||||||
func (o *ComputeController) Put() {
|
func (o *ComputeController) Put() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
// store and return Id or post with UUID
|
// store and return Id or post with UUID
|
||||||
var res map[string]interface{}
|
var res map[string]interface{}
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||||
o.Data["json"] = oclib.NewRequest(comp_collection, user, peerID, groups, nil).UpdateOne(res, id)
|
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(oclib.COMPUTE_RESOURCE), res, id)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,36 +33,29 @@ func (o *ComputeController) Put() {
|
|||||||
// @Success 200 {compute} models.compute
|
// @Success 200 {compute} models.compute
|
||||||
// @router / [post]
|
// @router / [post]
|
||||||
func (o *ComputeController) Post() {
|
func (o *ComputeController) Post() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
var res map[string]interface{}
|
var res map[string]interface{}
|
||||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||||
o.Data["json"] = oclib.NewRequest(comp_collection, user, peerID, groups, nil).StoreOne(res)
|
o.Data["json"] = oclib.StoreOne(oclib.LibDataEnum(oclib.COMPUTE_RESOURCE), res)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Title GetAll
|
// @Title GetAll
|
||||||
// @Description find compute by id
|
// @Description find compute by id
|
||||||
// @Param is_draft query string false "draft wished"
|
|
||||||
// @Success 200 {compute} models.compute
|
// @Success 200 {compute} models.compute
|
||||||
// @router / [get]
|
// @router / [get]
|
||||||
func (o *ComputeController) GetAll() {
|
func (o *ComputeController) GetAll() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
o.Data["json"] = oclib.LoadAll(oclib.LibDataEnum(oclib.COMPUTE_RESOURCE))
|
||||||
isDraft := o.Ctx.Input.Query("is_draft")
|
|
||||||
o.Data["json"] = oclib.NewRequest(comp_collection, user, peerID, groups, nil).LoadAll(isDraft == "true")
|
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Title Get
|
// @Title Get
|
||||||
// @Description find compute by key word
|
// @Description find compute by key word
|
||||||
// @Param search path string true "the search you want to get"
|
// @Param search path string true "the search you want to get"
|
||||||
// @Param is_draft query string false "draft wished"
|
|
||||||
// @Success 200 {compute} models.compute
|
// @Success 200 {compute} models.compute
|
||||||
// @router /search/:search [get]
|
// @router /search/:search [get]
|
||||||
func (o *ComputeController) Search() {
|
func (o *ComputeController) Search() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
isDraft := o.Ctx.Input.Query("is_draft")
|
|
||||||
search := o.Ctx.Input.Param(":search")
|
search := o.Ctx.Input.Param(":search")
|
||||||
o.Data["json"] = oclib.NewRequest(comp_collection, user, peerID, groups, nil).Search(nil, search, isDraft == "true")
|
o.Data["json"] = oclib.Search(nil, search, oclib.LibDataEnum(oclib.COMPUTE_RESOURCE))
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,9 +65,8 @@ func (o *ComputeController) Search() {
|
|||||||
// @Success 200 {compute} models.compute
|
// @Success 200 {compute} models.compute
|
||||||
// @router /:id [get]
|
// @router /:id [get]
|
||||||
func (o *ComputeController) Get() {
|
func (o *ComputeController) Get() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
o.Data["json"] = oclib.NewRequest(comp_collection, user, peerID, groups, nil).LoadOne(id)
|
o.Data["json"] = oclib.LoadOne(oclib.LibDataEnum(oclib.COMPUTE_RESOURCE), id)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,8 +76,7 @@ func (o *ComputeController) Get() {
|
|||||||
// @Success 200 {compute} delete success!
|
// @Success 200 {compute} delete success!
|
||||||
// @router /:id [delete]
|
// @router /:id [delete]
|
||||||
func (o *ComputeController) Delete() {
|
func (o *ComputeController) Delete() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
o.Data["json"] = oclib.NewRequest(comp_collection, user, peerID, groups, nil).DeleteOne(id)
|
o.Data["json"] = oclib.DeleteOne(oclib.LibDataEnum(oclib.COMPUTE_RESOURCE), id)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
25
controllers/data.go
Executable file → Normal file
25
controllers/data.go
Executable file → Normal file
@ -12,8 +12,6 @@ type DataController struct {
|
|||||||
beego.Controller
|
beego.Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
var data_collection = oclib.LibDataEnum(oclib.DATA_RESOURCE)
|
|
||||||
|
|
||||||
// @Title Update
|
// @Title Update
|
||||||
// @Description create datas
|
// @Description create datas
|
||||||
// @Param id path string true "the data id you want to get"
|
// @Param id path string true "the data id you want to get"
|
||||||
@ -22,11 +20,10 @@ var data_collection = oclib.LibDataEnum(oclib.DATA_RESOURCE)
|
|||||||
// @router /:id [put]
|
// @router /:id [put]
|
||||||
func (o *DataController) Put() {
|
func (o *DataController) Put() {
|
||||||
// store and return Id or post with UUID
|
// store and return Id or post with UUID
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
var res map[string]interface{}
|
var res map[string]interface{}
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||||
o.Data["json"] = oclib.NewRequest(data_collection, user, peerID, groups, nil).UpdateOne(res, id)
|
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(oclib.DATA_RESOURCE), res, id)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,37 +33,29 @@ func (o *DataController) Put() {
|
|||||||
// @Success 200 {data} models.data
|
// @Success 200 {data} models.data
|
||||||
// @router / [post]
|
// @router / [post]
|
||||||
func (o *DataController) Post() {
|
func (o *DataController) Post() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
var res map[string]interface{}
|
var res map[string]interface{}
|
||||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||||
o.Data["json"] = oclib.NewRequest(data_collection, user, peerID, groups, nil).StoreOne(res)
|
o.Data["json"] = oclib.StoreOne(oclib.LibDataEnum(oclib.DATA_RESOURCE), res)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Title GetAll
|
// @Title GetAll
|
||||||
// @Description find data by id
|
// @Description find data by id
|
||||||
// @Param is_draft query string false "draft wished"
|
|
||||||
// @Success 200 {data} models.data
|
// @Success 200 {data} models.data
|
||||||
// @router / [get]
|
// @router / [get]
|
||||||
func (o *DataController) GetAll() {
|
func (o *DataController) GetAll() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
o.Data["json"] = oclib.LoadAll(oclib.LibDataEnum(oclib.DATA_RESOURCE))
|
||||||
isDraft := o.Ctx.Input.Query("is_draft")
|
|
||||||
o.Data["json"] = oclib.NewRequest(data_collection, user, peerID, groups, nil).LoadAll(isDraft == "true")
|
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Title Get
|
// @Title Get
|
||||||
// @Description find data by key word
|
// @Description find data by key word
|
||||||
// @Param search path string true "the search you want to get"
|
// @Param search path string true "the search you want to get"
|
||||||
// @Param is_draft query string false "draft wished"
|
|
||||||
|
|
||||||
// @Success 200 {data} models.data
|
// @Success 200 {data} models.data
|
||||||
// @router /search/:search [get]
|
// @router /search/:search [get]
|
||||||
func (o *DataController) Search() {
|
func (o *DataController) Search() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
search := o.Ctx.Input.Param(":search")
|
search := o.Ctx.Input.Param(":search")
|
||||||
isDraft := o.Ctx.Input.Query("is_draft")
|
o.Data["json"] = oclib.Search(nil, search, oclib.LibDataEnum(oclib.DATA_RESOURCE))
|
||||||
o.Data["json"] = oclib.NewRequest(data_collection, user, peerID, groups, nil).Search(nil, search, isDraft == "true")
|
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,9 +65,8 @@ func (o *DataController) Search() {
|
|||||||
// @Success 200 {data} models.data
|
// @Success 200 {data} models.data
|
||||||
// @router /:id [get]
|
// @router /:id [get]
|
||||||
func (o *DataController) Get() {
|
func (o *DataController) Get() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
o.Data["json"] = oclib.NewRequest(data_collection, user, peerID, groups, nil).LoadOne(id)
|
o.Data["json"] = oclib.LoadOne(oclib.LibDataEnum(oclib.DATA_RESOURCE), id)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,8 +76,7 @@ func (o *DataController) Get() {
|
|||||||
// @Success 200 {data} delete success!
|
// @Success 200 {data} delete success!
|
||||||
// @router /:id [delete]
|
// @router /:id [delete]
|
||||||
func (o *DataController) Delete() {
|
func (o *DataController) Delete() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
o.Data["json"] = oclib.NewRequest(data_collection, user, peerID, groups, nil).DeleteOne(id)
|
o.Data["json"] = oclib.DeleteOne(oclib.LibDataEnum(oclib.DATA_RESOURCE), id)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
@ -1,183 +0,0 @@
|
|||||||
package controllers
|
|
||||||
|
|
||||||
import (
|
|
||||||
"cloud.o-forge.io/core/oc-lib/models/common/enum"
|
|
||||||
"cloud.o-forge.io/core/oc-lib/models/common/pricing"
|
|
||||||
"cloud.o-forge.io/core/oc-lib/models/resources"
|
|
||||||
"cloud.o-forge.io/core/oc-lib/tools"
|
|
||||||
beego "github.com/beego/beego/v2/server/web"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Operations about resource
|
|
||||||
type EnumController struct {
|
|
||||||
beego.Controller
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title EnumStorageType
|
|
||||||
// @Description get list of StorageType
|
|
||||||
// @Success 200 {resource} models.resource
|
|
||||||
// @router /storage/type [get]
|
|
||||||
func (o *EnumController) EnumStorageType() {
|
|
||||||
enumMap := map[int]string{}
|
|
||||||
for _, d := range enum.TypeList() {
|
|
||||||
enumMap[int(d)] = d.String()
|
|
||||||
}
|
|
||||||
o.Data["json"] = map[string]interface{}{"data": enumMap, "code": 200, "error": ""}
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title EnumStorageSize
|
|
||||||
// @Description get list of StorageSize
|
|
||||||
// @Success 200 {resource} models.resource
|
|
||||||
// @router /storage/size [get]
|
|
||||||
func (o *EnumController) EnumStorageSize() {
|
|
||||||
enumMap := map[int]string{}
|
|
||||||
for _, d := range enum.SizeList() {
|
|
||||||
enumMap[int(d)] = d.String()
|
|
||||||
}
|
|
||||||
o.Data["json"] = map[string]interface{}{"data": enumMap, "code": 200, "error": ""}
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title EnumInfrastructure
|
|
||||||
// @Description get list of Infrastructure
|
|
||||||
// @Success 200 {resource} models.resource
|
|
||||||
// @router /infrastructure [get]
|
|
||||||
func (o *EnumController) EnumInfrastructure() {
|
|
||||||
enumMap := map[int]string{}
|
|
||||||
for _, d := range enum.InfrastructureList() {
|
|
||||||
enumMap[int(d)] = d.String()
|
|
||||||
}
|
|
||||||
o.Data["json"] = map[string]interface{}{"data": enumMap, "code": 200, "error": ""}
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title BookingStatus
|
|
||||||
// @Description get list of Infrastructure
|
|
||||||
// @Success 200 {resource} models.resource
|
|
||||||
// @router /booking/status [get]
|
|
||||||
func (o *EnumController) EnumBookingStatus() {
|
|
||||||
enumMap := map[int]string{}
|
|
||||||
for _, d := range enum.StatusList() {
|
|
||||||
enumMap[int(d)] = d.String()
|
|
||||||
}
|
|
||||||
o.Data["json"] = map[string]interface{}{"data": enumMap, "code": 200, "error": ""}
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title EnumStatus
|
|
||||||
// @Description get list of status
|
|
||||||
// @Success 200 {resource} models.resource
|
|
||||||
// @router /status [get]
|
|
||||||
func (o *EnumController) EnumStatus() {
|
|
||||||
enumMap := map[int]string{}
|
|
||||||
for _, d := range enum.StatusList() {
|
|
||||||
enumMap[int(d)] = d.String()
|
|
||||||
}
|
|
||||||
o.Data["json"] = map[string]interface{}{"data": enumMap, "code": 200, "error": ""}
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title EnumStrategyBuy
|
|
||||||
// @Description get list of status
|
|
||||||
// @Success 200 {resource} models.resource
|
|
||||||
// @router /pricing/strategy/buy [get]
|
|
||||||
func (o *EnumController) EnumStrategyBuy() {
|
|
||||||
enumMap := map[int]string{}
|
|
||||||
for _, d := range pricing.BuyingStrategyList() {
|
|
||||||
enumMap[int(d)] = d.String()
|
|
||||||
}
|
|
||||||
o.Data["json"] = map[string]interface{}{"data": enumMap, "code": 200, "error": ""}
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title EnumStrategyTime
|
|
||||||
// @Description get list of status
|
|
||||||
// @Success 200 {resource} models.resource
|
|
||||||
// @router /pricing/strategy/time [get]
|
|
||||||
func (o *EnumController) EnumStrategyTime() {
|
|
||||||
enumMap := map[int]string{}
|
|
||||||
for _, d := range pricing.TimePricingStrategyList() {
|
|
||||||
enumMap[int(d)] = d.String()
|
|
||||||
}
|
|
||||||
o.Data["json"] = map[string]interface{}{"data": enumMap, "code": 200, "error": ""}
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title EnumStrategyPrivilege
|
|
||||||
// @Description get list of status
|
|
||||||
// @Success 200 {resource} models.resource
|
|
||||||
// @router /pricing/strategy/privilege [get]
|
|
||||||
func (o *EnumController) EnumStrategyPrivilege() {
|
|
||||||
enumMap := map[int]string{}
|
|
||||||
for _, d := range pricing.ExploitPrivilegeStrategyList() {
|
|
||||||
enumMap[int(d)] = d.String()
|
|
||||||
}
|
|
||||||
o.Data["json"] = map[string]interface{}{"data": enumMap, "code": 200, "error": ""}
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title EnumRefundType
|
|
||||||
// @Description get list of status
|
|
||||||
// @Success 200 {resource} models.resource
|
|
||||||
// @router /pricing/refund/type [get]
|
|
||||||
func (o *EnumController) EnumRefundType() {
|
|
||||||
enumMap := map[int]string{}
|
|
||||||
for _, d := range pricing.RefundTypeList() {
|
|
||||||
enumMap[int(d)] = d.String()
|
|
||||||
}
|
|
||||||
o.Data["json"] = map[string]interface{}{"data": enumMap, "code": 200, "error": ""}
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title EnumStrategyPrivilegeStorage
|
|
||||||
// @Description get list of status
|
|
||||||
// @Success 200 {resource} models.resource
|
|
||||||
// @router /pricing/strategy/privilege/storage [get]
|
|
||||||
func (o *EnumController) EnumStrategyPrivilegeStorage() {
|
|
||||||
enumMap := map[int]string{}
|
|
||||||
for _, d := range resources.PrivilegeStoragePricingStrategyList() {
|
|
||||||
enumMap[int(d)] = d.String()
|
|
||||||
}
|
|
||||||
o.Data["json"] = map[string]interface{}{"data": enumMap, "code": 200, "error": ""}
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title EnumStrategyStorage
|
|
||||||
// @Description get list of status
|
|
||||||
// @Success 200 {resource} models.resource
|
|
||||||
// @router /pricing/strategy/storage [get]
|
|
||||||
func (o *EnumController) EnumStrategyStorage() {
|
|
||||||
enumMap := map[int]string{}
|
|
||||||
for _, d := range resources.StorageResourcePricingStrategyList() {
|
|
||||||
enumMap[int(d)] = d.String()
|
|
||||||
}
|
|
||||||
o.Data["json"] = map[string]interface{}{"data": enumMap, "code": 200, "error": ""}
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title EnumStrategyData
|
|
||||||
// @Description get list of status
|
|
||||||
// @Success 200 {resource} models.resource
|
|
||||||
// @router /pricing/strategy/data [get]
|
|
||||||
func (o *EnumController) EnumStrategyData() {
|
|
||||||
enumMap := map[int]string{}
|
|
||||||
for _, d := range resources.DataResourcePricingStrategyList() {
|
|
||||||
enumMap[int(d)] = d.String()
|
|
||||||
}
|
|
||||||
o.Data["json"] = map[string]interface{}{"data": enumMap, "code": 200, "error": ""}
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title EnumResourceType
|
|
||||||
// @Description get list of status
|
|
||||||
// @Success 200 {resource} models.resource
|
|
||||||
// @router /resource/type [get]
|
|
||||||
func (o *EnumController) EnumResourceType() {
|
|
||||||
enumMap := map[int]string{}
|
|
||||||
for _, d := range tools.DataTypeList() {
|
|
||||||
enumMap[int(d)] = d.String()
|
|
||||||
}
|
|
||||||
o.Data["json"] = map[string]interface{}{"data": enumMap, "code": 200, "error": ""}
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
24
controllers/processing.go
Executable file → Normal file
24
controllers/processing.go
Executable file → Normal file
@ -12,8 +12,6 @@ type ProcessingController struct {
|
|||||||
beego.Controller
|
beego.Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
var processing_collection = oclib.LibDataEnum(oclib.PROCESSING_RESOURCE)
|
|
||||||
|
|
||||||
// @Title Update
|
// @Title Update
|
||||||
// @Description create processings
|
// @Description create processings
|
||||||
// @Param id path string true "the processing id you want to get"
|
// @Param id path string true "the processing id you want to get"
|
||||||
@ -22,11 +20,10 @@ var processing_collection = oclib.LibDataEnum(oclib.PROCESSING_RESOURCE)
|
|||||||
// @router /:id [put]
|
// @router /:id [put]
|
||||||
func (o *ProcessingController) Put() {
|
func (o *ProcessingController) Put() {
|
||||||
// store and return Id or post with UUID
|
// store and return Id or post with UUID
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
var res map[string]interface{}
|
var res map[string]interface{}
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||||
o.Data["json"] = oclib.NewRequest(processing_collection, user, peerID, groups, nil).UpdateOne(res, id)
|
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(oclib.PROCESSING_RESOURCE), res, id)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,36 +33,29 @@ func (o *ProcessingController) Put() {
|
|||||||
// @Success 200 {processing} models.processing
|
// @Success 200 {processing} models.processing
|
||||||
// @router / [post]
|
// @router / [post]
|
||||||
func (o *ProcessingController) Post() {
|
func (o *ProcessingController) Post() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
var res map[string]interface{}
|
var res map[string]interface{}
|
||||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||||
o.Data["json"] = oclib.NewRequest(processing_collection, user, peerID, groups, nil).StoreOne(res)
|
o.Data["json"] = oclib.StoreOne(oclib.LibDataEnum(oclib.PROCESSING_RESOURCE), res)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Title GetAll
|
// @Title GetAll
|
||||||
// @Description find processing by id
|
// @Description find processing by id
|
||||||
// @Param is_draft query string false "draft wished"
|
|
||||||
// @Success 200 {processing} models.processing
|
// @Success 200 {processing} models.processing
|
||||||
// @router / [get]
|
// @router / [get]
|
||||||
func (o *ProcessingController) GetAll() {
|
func (o *ProcessingController) GetAll() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
o.Data["json"] = oclib.LoadAll(oclib.LibDataEnum(oclib.PROCESSING_RESOURCE))
|
||||||
isDraft := o.Ctx.Input.Query("is_draft")
|
|
||||||
o.Data["json"] = oclib.NewRequest(processing_collection, user, peerID, groups, nil).LoadAll(isDraft == "true")
|
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Title Get
|
// @Title Get
|
||||||
// @Description find processing by key word
|
// @Description find processing by key word
|
||||||
// @Param search path string true "the search you want to get"
|
// @Param search path string true "the search you want to get"
|
||||||
// @Param is_draft query string false "draft wished"
|
|
||||||
// @Success 200 {processing} models.processing
|
// @Success 200 {processing} models.processing
|
||||||
// @router /search/:search [get]
|
// @router /search/:search [get]
|
||||||
func (o *ProcessingController) Search() {
|
func (o *ProcessingController) Search() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
search := o.Ctx.Input.Param(":search")
|
search := o.Ctx.Input.Param(":search")
|
||||||
isDraft := o.Ctx.Input.Query("is_draft")
|
o.Data["json"] = oclib.Search(nil, search, oclib.LibDataEnum(oclib.PROCESSING_RESOURCE))
|
||||||
o.Data["json"] = oclib.NewRequest(processing_collection, user, peerID, groups, nil).Search(nil, search, isDraft == "true")
|
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,9 +65,8 @@ func (o *ProcessingController) Search() {
|
|||||||
// @Success 200 {processing} models.processing
|
// @Success 200 {processing} models.processing
|
||||||
// @router /:id [get]
|
// @router /:id [get]
|
||||||
func (o *ProcessingController) Get() {
|
func (o *ProcessingController) Get() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
o.Data["json"] = oclib.NewRequest(processing_collection, user, peerID, groups, nil).LoadOne(id)
|
o.Data["json"] = oclib.LoadOne(oclib.LibDataEnum(oclib.PROCESSING_RESOURCE), id)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,8 +76,7 @@ func (o *ProcessingController) Get() {
|
|||||||
// @Success 200 {processing} delete success!
|
// @Success 200 {processing} delete success!
|
||||||
// @router /:id [delete]
|
// @router /:id [delete]
|
||||||
func (o *ProcessingController) Delete() {
|
func (o *ProcessingController) Delete() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
o.Data["json"] = oclib.NewRequest(processing_collection, user, peerID, groups, nil).DeleteOne(id)
|
o.Data["json"] = oclib.DeleteOne(oclib.LibDataEnum(oclib.PROCESSING_RESOURCE), id)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
48
controllers/resource.go
Executable file → Normal file
48
controllers/resource.go
Executable file → Normal file
@ -1,8 +1,6 @@
|
|||||||
package controllers
|
package controllers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
|
|
||||||
oclib "cloud.o-forge.io/core/oc-lib"
|
oclib "cloud.o-forge.io/core/oc-lib"
|
||||||
beego "github.com/beego/beego/v2/server/web"
|
beego "github.com/beego/beego/v2/server/web"
|
||||||
)
|
)
|
||||||
@ -14,17 +12,17 @@ type ResourceController struct {
|
|||||||
|
|
||||||
// @Title GetAll
|
// @Title GetAll
|
||||||
// @Description find resource by id
|
// @Description find resource by id
|
||||||
// @Param is_draft query string false "draft wished"
|
|
||||||
// @Success 200 {resource} models.resource
|
// @Success 200 {resource} models.resource
|
||||||
// @router / [get]
|
// @router / [get]
|
||||||
func (o *ResourceController) GetAll() {
|
func (o *ResourceController) GetAll() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
results := map[string]interface{}{}
|
results := map[string]interface{}{}
|
||||||
isDraft := o.Ctx.Input.Query("is_draft")
|
|
||||||
for _, resource := range []oclib.LibDataEnum{
|
for _, resource := range []oclib.LibDataEnum{
|
||||||
data_collection, comp_collection, storage_collection,
|
oclib.LibDataEnum(oclib.DATA_RESOURCE),
|
||||||
processing_collection, workflow_collection} {
|
oclib.LibDataEnum(oclib.COMPUTE_RESOURCE),
|
||||||
d := oclib.NewRequest(resource, user, peerID, groups, nil).LoadAll(isDraft == "true")
|
oclib.LibDataEnum(oclib.STORAGE_RESOURCE),
|
||||||
|
oclib.LibDataEnum(oclib.PROCESSING_RESOURCE),
|
||||||
|
oclib.LibDataEnum(oclib.WORKFLOW_RESOURCE)} {
|
||||||
|
d := oclib.LoadAll(resource)
|
||||||
if d.Code != 200 || len(d.Data) == 0 {
|
if d.Code != 200 || len(d.Data) == 0 {
|
||||||
results[resource.String()] = []interface{}{}
|
results[resource.String()] = []interface{}{}
|
||||||
} else {
|
} else {
|
||||||
@ -38,19 +36,18 @@ func (o *ResourceController) GetAll() {
|
|||||||
// @Title Get
|
// @Title Get
|
||||||
// @Description find resource by key word
|
// @Description find resource by key word
|
||||||
// @Param search path string true "the search you want to get"
|
// @Param search path string true "the search you want to get"
|
||||||
// @Param is_draft query string false "draft wished"
|
|
||||||
// @Success 200 {resource} models.resource
|
// @Success 200 {resource} models.resource
|
||||||
// @router /search/:search [get]
|
// @router /search/:search [get]
|
||||||
func (o *ResourceController) Search() {
|
func (o *ResourceController) Search() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
search := o.Ctx.Input.Param(":search")
|
search := o.Ctx.Input.Param(":search")
|
||||||
isDraft := o.Ctx.Input.Query("is_draft")
|
|
||||||
results := map[string]interface{}{}
|
results := map[string]interface{}{}
|
||||||
for _, resource := range []oclib.LibDataEnum{
|
for _, resource := range []oclib.LibDataEnum{
|
||||||
data_collection, comp_collection, storage_collection,
|
oclib.LibDataEnum(oclib.DATA_RESOURCE),
|
||||||
processing_collection, workflow_collection} {
|
oclib.LibDataEnum(oclib.COMPUTE_RESOURCE),
|
||||||
fmt.Println("search", search)
|
oclib.LibDataEnum(oclib.STORAGE_RESOURCE),
|
||||||
d := oclib.NewRequest(resource, user, peerID, groups, nil).Search(nil, search, isDraft == "true")
|
oclib.LibDataEnum(oclib.PROCESSING_RESOURCE),
|
||||||
|
oclib.LibDataEnum(oclib.WORKFLOW_RESOURCE)} {
|
||||||
|
d := oclib.Search(nil, search, resource)
|
||||||
if d.Code != 200 || len(d.Data) == 0 {
|
if d.Code != 200 || len(d.Data) == 0 {
|
||||||
results[resource.String()] = []interface{}{}
|
results[resource.String()] = []interface{}{}
|
||||||
} else {
|
} else {
|
||||||
@ -67,13 +64,15 @@ func (o *ResourceController) Search() {
|
|||||||
// @Success 200 {resource} models.resource
|
// @Success 200 {resource} models.resource
|
||||||
// @router /:id [get]
|
// @router /:id [get]
|
||||||
func (o *ResourceController) Get() {
|
func (o *ResourceController) Get() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
results := map[string]interface{}{}
|
results := map[string]interface{}{}
|
||||||
for _, resource := range []oclib.LibDataEnum{
|
for _, resource := range []oclib.LibDataEnum{
|
||||||
data_collection, comp_collection, storage_collection,
|
oclib.LibDataEnum(oclib.DATA_RESOURCE),
|
||||||
processing_collection, workflow_collection} {
|
oclib.LibDataEnum(oclib.COMPUTE_RESOURCE),
|
||||||
d := oclib.NewRequest(resource, user, peerID, groups, nil).LoadOne(id)
|
oclib.LibDataEnum(oclib.STORAGE_RESOURCE),
|
||||||
|
oclib.LibDataEnum(oclib.PROCESSING_RESOURCE),
|
||||||
|
oclib.LibDataEnum(oclib.WORKFLOW_RESOURCE)} {
|
||||||
|
d := oclib.LoadOne(resource, id)
|
||||||
if d.Code != 200 {
|
if d.Code != 200 {
|
||||||
results[resource.String()] = nil
|
results[resource.String()] = nil
|
||||||
} else {
|
} else {
|
||||||
@ -90,14 +89,15 @@ func (o *ResourceController) Get() {
|
|||||||
// @Success 200 {resource} delete success!
|
// @Success 200 {resource} delete success!
|
||||||
// @router /:id [delete]
|
// @router /:id [delete]
|
||||||
func (o *ResourceController) Delete() {
|
func (o *ResourceController) Delete() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
results := map[string]interface{}{}
|
results := map[string]interface{}{}
|
||||||
for _, resource := range []oclib.LibDataEnum{
|
for _, resource := range []oclib.LibDataEnum{
|
||||||
data_collection, comp_collection, storage_collection,
|
oclib.LibDataEnum(oclib.DATA_RESOURCE),
|
||||||
processing_collection, workflow_collection,
|
oclib.LibDataEnum(oclib.COMPUTE_RESOURCE),
|
||||||
} {
|
oclib.LibDataEnum(oclib.STORAGE_RESOURCE),
|
||||||
d := oclib.NewRequest(resource, user, peerID, groups, nil).DeleteOne(id)
|
oclib.LibDataEnum(oclib.PROCESSING_RESOURCE),
|
||||||
|
oclib.LibDataEnum(oclib.WORKFLOW_RESOURCE)} {
|
||||||
|
d := oclib.DeleteOne(resource, id)
|
||||||
if d.Code != 200 {
|
if d.Code != 200 {
|
||||||
results[resource.String()] = nil
|
results[resource.String()] = nil
|
||||||
} else {
|
} else {
|
||||||
|
44
controllers/storage.go
Executable file → Normal file
44
controllers/storage.go
Executable file → Normal file
@ -12,8 +12,6 @@ type StorageController struct {
|
|||||||
beego.Controller
|
beego.Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
var storage_collection = oclib.LibDataEnum(oclib.STORAGE_RESOURCE)
|
|
||||||
|
|
||||||
// @Title Update
|
// @Title Update
|
||||||
// @Description create storages
|
// @Description create storages
|
||||||
// @Param id path string true "the storage id you want to get"
|
// @Param id path string true "the storage id you want to get"
|
||||||
@ -22,11 +20,21 @@ var storage_collection = oclib.LibDataEnum(oclib.STORAGE_RESOURCE)
|
|||||||
// @router /:id [put]
|
// @router /:id [put]
|
||||||
func (o *StorageController) Put() {
|
func (o *StorageController) Put() {
|
||||||
// store and return Id or post with UUID
|
// store and return Id or post with UUID
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
var res map[string]interface{}
|
var res map[string]interface{}
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||||
o.Data["json"] = oclib.NewRequest(storage_collection, user, peerID, groups, nil).UpdateOne(res, id)
|
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(oclib.STORAGE_RESOURCE), res, id)
|
||||||
|
o.ServeJSON()
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Title Get
|
||||||
|
// @Description find storage by key word
|
||||||
|
// @Param search path string true "the search you want to get"
|
||||||
|
// @Success 200 {storage} models.storage
|
||||||
|
// @router /search/:search [get]
|
||||||
|
func (o *StorageController) Search() {
|
||||||
|
search := o.Ctx.Input.Param(":search")
|
||||||
|
o.Data["json"] = oclib.Search(nil, search, oclib.LibDataEnum(oclib.STORAGE_RESOURCE))
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,36 +44,18 @@ func (o *StorageController) Put() {
|
|||||||
// @Success 200 {storage} models.storage
|
// @Success 200 {storage} models.storage
|
||||||
// @router / [post]
|
// @router / [post]
|
||||||
func (o *StorageController) Post() {
|
func (o *StorageController) Post() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
var res map[string]interface{}
|
var res map[string]interface{}
|
||||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||||
o.Data["json"] = oclib.NewRequest(storage_collection, user, peerID, groups, nil).StoreOne(res)
|
o.Data["json"] = oclib.StoreOne(oclib.LibDataEnum(oclib.STORAGE_RESOURCE), res)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Title GetAll
|
// @Title GetAll
|
||||||
// @Description find storage by id
|
// @Description find storage by id
|
||||||
// @Param is_draft query string false "draft wished"
|
|
||||||
// @Success 200 {storage} models.storage
|
// @Success 200 {storage} models.storage
|
||||||
// @router / [get]
|
// @router / [get]
|
||||||
func (o *StorageController) GetAll() {
|
func (o *StorageController) GetAll() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
o.Data["json"] = oclib.LoadAll(oclib.LibDataEnum(oclib.STORAGE_RESOURCE))
|
||||||
isDraft := o.Ctx.Input.Query("is_draft")
|
|
||||||
o.Data["json"] = oclib.NewRequest(storage_collection, user, peerID, groups, nil).LoadAll(isDraft == "true")
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title Get
|
|
||||||
// @Description find storage by key word
|
|
||||||
// @Param search path string true "the search you want to get"
|
|
||||||
// @Param is_draft query string false "draft wished"
|
|
||||||
// @Success 200 {storage} models.storage
|
|
||||||
// @router /search/:search [get]
|
|
||||||
func (o *StorageController) Search() {
|
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
search := o.Ctx.Input.Param(":search")
|
|
||||||
isDraft := o.Ctx.Input.Query("is_draft")
|
|
||||||
o.Data["json"] = oclib.NewRequest(storage_collection, user, peerID, groups, nil).Search(nil, search, isDraft == "true")
|
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,9 +65,8 @@ func (o *StorageController) Search() {
|
|||||||
// @Success 200 {storage} models.storage
|
// @Success 200 {storage} models.storage
|
||||||
// @router /:id [get]
|
// @router /:id [get]
|
||||||
func (o *StorageController) Get() {
|
func (o *StorageController) Get() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
o.Data["json"] = oclib.NewRequest(storage_collection, user, peerID, groups, nil).LoadOne(id)
|
o.Data["json"] = oclib.LoadOne(oclib.LibDataEnum(oclib.STORAGE_RESOURCE), id)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,8 +76,7 @@ func (o *StorageController) Get() {
|
|||||||
// @Success 200 {storage} delete success!
|
// @Success 200 {storage} delete success!
|
||||||
// @router /:id [delete]
|
// @router /:id [delete]
|
||||||
func (o *StorageController) Delete() {
|
func (o *StorageController) Delete() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
o.Data["json"] = oclib.NewRequest(storage_collection, user, peerID, groups, nil).DeleteOne(id)
|
o.Data["json"] = oclib.DeleteOne(oclib.LibDataEnum(oclib.STORAGE_RESOURCE), id)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
0
controllers/version.go
Executable file → Normal file
0
controllers/version.go
Executable file → Normal file
44
controllers/workflow.go
Executable file → Normal file
44
controllers/workflow.go
Executable file → Normal file
@ -12,8 +12,6 @@ type WorkflowController struct {
|
|||||||
beego.Controller
|
beego.Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
var workflow_collection = oclib.LibDataEnum(oclib.WORKFLOW_RESOURCE)
|
|
||||||
|
|
||||||
// @Title Update
|
// @Title Update
|
||||||
// @Description create workflows
|
// @Description create workflows
|
||||||
// @Param id path string true "the workflow id you want to get"
|
// @Param id path string true "the workflow id you want to get"
|
||||||
@ -22,11 +20,21 @@ var workflow_collection = oclib.LibDataEnum(oclib.WORKFLOW_RESOURCE)
|
|||||||
// @router /:id [put]
|
// @router /:id [put]
|
||||||
func (o *WorkflowController) Put() {
|
func (o *WorkflowController) Put() {
|
||||||
// store and return Id or post with UUID
|
// store and return Id or post with UUID
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
var res map[string]interface{}
|
var res map[string]interface{}
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||||
o.Data["json"] = oclib.NewRequest(workflow_collection, user, peerID, groups, nil).UpdateOne(res, id)
|
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(oclib.WORKFLOW_RESOURCE), res, id)
|
||||||
|
o.ServeJSON()
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Title Get
|
||||||
|
// @Description find workflow by key word
|
||||||
|
// @Param search path string true "the search you want to get"
|
||||||
|
// @Success 200 {workflow} models.workflow
|
||||||
|
// @router /search/:search [get]
|
||||||
|
func (o *WorkflowController) Search() {
|
||||||
|
search := o.Ctx.Input.Param(":search")
|
||||||
|
o.Data["json"] = oclib.Search(nil, search, oclib.LibDataEnum(oclib.WORKFLOW_RESOURCE))
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,36 +44,18 @@ func (o *WorkflowController) Put() {
|
|||||||
// @Success 200 {workflow} models.workflow
|
// @Success 200 {workflow} models.workflow
|
||||||
// @router / [post]
|
// @router / [post]
|
||||||
func (o *WorkflowController) Post() {
|
func (o *WorkflowController) Post() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
var res map[string]interface{}
|
var res map[string]interface{}
|
||||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||||
o.Data["json"] = oclib.NewRequest(workflow_collection, user, peerID, groups, nil).StoreOne(res)
|
o.Data["json"] = oclib.StoreOne(oclib.LibDataEnum(oclib.WORKFLOW_RESOURCE), res)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Title GetAll
|
// @Title GetAll
|
||||||
// @Description find workflow by id
|
// @Description find workflow by id
|
||||||
// @Param is_draft query string false "draft wished"
|
|
||||||
// @Success 200 {workflow} models.workflow
|
// @Success 200 {workflow} models.workflow
|
||||||
// @router / [get]
|
// @router / [get]
|
||||||
func (o *WorkflowController) GetAll() {
|
func (o *WorkflowController) GetAll() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
o.Data["json"] = oclib.LoadAll(oclib.LibDataEnum(oclib.WORKFLOW_RESOURCE))
|
||||||
isDraft := o.Ctx.Input.Query("is_draft")
|
|
||||||
o.Data["json"] = oclib.NewRequest(workflow_collection, user, peerID, groups, nil).LoadAll(isDraft == "true")
|
|
||||||
o.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title Get
|
|
||||||
// @Description find workflow by key word
|
|
||||||
// @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 [get]
|
|
||||||
func (o *WorkflowController) Search() {
|
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
search := o.Ctx.Input.Param(":search")
|
|
||||||
isDraft := o.Ctx.Input.Query("is_draft")
|
|
||||||
o.Data["json"] = oclib.NewRequest(workflow_collection, user, peerID, groups, nil).Search(nil, search, isDraft == "true")
|
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,9 +65,8 @@ func (o *WorkflowController) Search() {
|
|||||||
// @Success 200 {workflow} models.workflow
|
// @Success 200 {workflow} models.workflow
|
||||||
// @router /:id [get]
|
// @router /:id [get]
|
||||||
func (o *WorkflowController) Get() {
|
func (o *WorkflowController) Get() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
o.Data["json"] = oclib.NewRequest(workflow_collection, user, peerID, groups, nil).LoadOne(id)
|
o.Data["json"] = oclib.LoadOne(oclib.LibDataEnum(oclib.WORKFLOW_RESOURCE), id)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,8 +76,7 @@ func (o *WorkflowController) Get() {
|
|||||||
// @Success 200 {workflow} delete success!
|
// @Success 200 {workflow} delete success!
|
||||||
// @router /:id [delete]
|
// @router /:id [delete]
|
||||||
func (o *WorkflowController) Delete() {
|
func (o *WorkflowController) Delete() {
|
||||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
o.Data["json"] = oclib.NewRequest(workflow_collection, user, peerID, groups, nil).DeleteOne(id)
|
o.Data["json"] = oclib.DeleteOne(oclib.LibDataEnum(oclib.WORKFLOW_RESOURCE), id)
|
||||||
o.ServeJSON()
|
o.ServeJSON()
|
||||||
}
|
}
|
||||||
|
0
docker-compose.base.yml
Executable file → Normal file
0
docker-compose.base.yml
Executable file → Normal file
0
docker-compose.yml
Executable file → Normal file
0
docker-compose.yml
Executable file → Normal file
0
docker_catalog.json
Executable file → Normal file
0
docker_catalog.json
Executable file → Normal file
33
go.mod
33
go.mod
@ -5,20 +5,19 @@ go 1.22.0
|
|||||||
toolchain go1.22.4
|
toolchain go1.22.4
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250205160221-88b7cfe2fd0f
|
cloud.o-forge.io/core/oc-lib v0.0.0-20250110163958-fd1c579ec418
|
||||||
github.com/beego/beego/v2 v2.3.4
|
github.com/beego/beego/v2 v2.3.1
|
||||||
github.com/smartystreets/goconvey v1.7.2
|
github.com/smartystreets/goconvey v1.7.2
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
github.com/biter777/countries v1.7.5 // indirect
|
|
||||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||||
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
|
github.com/gabriel-vasile/mimetype v1.4.6 // indirect
|
||||||
github.com/go-playground/locales v0.14.1 // indirect
|
github.com/go-playground/locales v0.14.1 // indirect
|
||||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||||
github.com/go-playground/validator/v10 v10.24.0 // indirect
|
github.com/go-playground/validator/v10 v10.22.1 // indirect
|
||||||
github.com/golang/snappy v0.0.4 // indirect
|
github.com/golang/snappy v0.0.4 // indirect
|
||||||
github.com/google/uuid v1.6.0 // indirect
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect
|
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect
|
||||||
@ -28,20 +27,20 @@ require (
|
|||||||
github.com/klauspost/compress v1.17.11 // indirect
|
github.com/klauspost/compress v1.17.11 // indirect
|
||||||
github.com/kr/text v0.2.0 // indirect
|
github.com/kr/text v0.2.0 // indirect
|
||||||
github.com/leodido/go-urn v1.4.0 // indirect
|
github.com/leodido/go-urn v1.4.0 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||||
github.com/montanaflynn/stats v0.7.1 // indirect
|
github.com/montanaflynn/stats v0.7.1 // indirect
|
||||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||||
github.com/nats-io/nats.go v1.38.0 // indirect
|
github.com/nats-io/nats.go v1.37.0 // indirect
|
||||||
github.com/nats-io/nkeys v0.4.9 // indirect
|
github.com/nats-io/nkeys v0.4.7 // indirect
|
||||||
github.com/nats-io/nuid v1.0.1 // indirect
|
github.com/nats-io/nuid v1.0.1 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||||
github.com/prometheus/client_golang v1.20.5 // indirect
|
github.com/prometheus/client_golang v1.20.5 // indirect
|
||||||
github.com/prometheus/client_model v0.6.1 // indirect
|
github.com/prometheus/client_model v0.6.1 // indirect
|
||||||
github.com/prometheus/common v0.62.0 // indirect
|
github.com/prometheus/common v0.60.1 // indirect
|
||||||
github.com/prometheus/procfs v0.15.1 // indirect
|
github.com/prometheus/procfs v0.15.1 // indirect
|
||||||
github.com/robfig/cron v1.2.0 // indirect
|
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||||
github.com/rogpeppe/go-internal v1.11.0 // indirect
|
github.com/rogpeppe/go-internal v1.11.0 // indirect
|
||||||
github.com/rs/zerolog v1.33.0 // indirect
|
github.com/rs/zerolog v1.33.0 // indirect
|
||||||
github.com/shiena/ansicolor v0.0.0-20230509054315-a9deabde6e02 // indirect
|
github.com/shiena/ansicolor v0.0.0-20230509054315-a9deabde6e02 // indirect
|
||||||
@ -50,12 +49,12 @@ require (
|
|||||||
github.com/xdg-go/scram v1.1.2 // indirect
|
github.com/xdg-go/scram v1.1.2 // indirect
|
||||||
github.com/xdg-go/stringprep v1.0.4 // indirect
|
github.com/xdg-go/stringprep v1.0.4 // indirect
|
||||||
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
|
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
|
||||||
go.mongodb.org/mongo-driver v1.17.2 // indirect
|
go.mongodb.org/mongo-driver v1.17.1 // indirect
|
||||||
golang.org/x/crypto v0.32.0 // indirect
|
golang.org/x/crypto v0.28.0 // indirect
|
||||||
golang.org/x/net v0.34.0 // indirect
|
golang.org/x/net v0.30.0 // indirect
|
||||||
golang.org/x/sync v0.10.0 // indirect
|
golang.org/x/sync v0.8.0 // indirect
|
||||||
golang.org/x/sys v0.29.0 // indirect
|
golang.org/x/sys v0.26.0 // indirect
|
||||||
golang.org/x/text v0.21.0 // indirect
|
golang.org/x/text v0.19.0 // indirect
|
||||||
google.golang.org/protobuf v1.36.3 // indirect
|
google.golang.org/protobuf v1.35.1 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
69
go.sum
69
go.sum
@ -1,12 +1,10 @@
|
|||||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250205160221-88b7cfe2fd0f h1:6V+Z81ywYoDYSVMnM4PVaJYXFgCN3xSG3ddiUPn4jL8=
|
cloud.o-forge.io/core/oc-lib v0.0.0-20250110163958-fd1c579ec418 h1:24nc5qA6AkV6pIbJJeRASeUZmWuGkl+FO/r2oXazJ8w=
|
||||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250205160221-88b7cfe2fd0f/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
cloud.o-forge.io/core/oc-lib v0.0.0-20250110163958-fd1c579ec418/go.mod h1:ya7Q+zHhaKM+XF6sAJ+avqHEVzaMnFJQih2X3TlTlGo=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
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.1 h1:7MUKMpJYzOXtCUsTEoXOxsDV/UcHw6CPbaWMlthVNsc=
|
||||||
github.com/beego/beego/v2 v2.3.4/go.mod h1:5cqHsOHJIxkq44tBpRvtDe59GuVRVv/9/tyVDxd5ce4=
|
github.com/beego/beego/v2 v2.3.1/go.mod h1:5cqHsOHJIxkq44tBpRvtDe59GuVRVv/9/tyVDxd5ce4=
|
||||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||||
github.com/biter777/countries v1.7.5 h1:MJ+n3+rSxWQdqVJU8eBy9RqcdH6ePPn4PJHocVWUa+Q=
|
|
||||||
github.com/biter777/countries v1.7.5/go.mod h1:1HSpZ526mYqKJcpT5Ti1kcGQ0L0SrXWIaptUWjFfv2E=
|
|
||||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||||
@ -21,16 +19,16 @@ github.com/elazarl/go-bindata-assetfs v1.0.1 h1:m0kkaHRKEu7tUIUFVwhGGGYClXvyl4RE
|
|||||||
github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
|
github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
|
||||||
github.com/etcd-io/etcd v3.3.17+incompatible/go.mod h1:cdZ77EstHBwVtD6iTgzgvogwcjo9m4iOqoijouPJ4bs=
|
github.com/etcd-io/etcd v3.3.17+incompatible/go.mod h1:cdZ77EstHBwVtD6iTgzgvogwcjo9m4iOqoijouPJ4bs=
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||||
github.com/gabriel-vasile/mimetype v1.4.8 h1:FfZ3gj38NjllZIeJAmMhr+qKL8Wu+nOoI3GqacKw1NM=
|
github.com/gabriel-vasile/mimetype v1.4.6 h1:3+PzJTKLkvgjeTbts6msPJt4DixhT4YtFNf1gtGe3zc=
|
||||||
github.com/gabriel-vasile/mimetype v1.4.8/go.mod h1:ByKUIKGjh1ODkGM1asKUbQZOLGrPjydw3hYPU2YU9t8=
|
github.com/gabriel-vasile/mimetype v1.4.6/go.mod h1:JX1qVKqZd40hUPpAfiNTe0Sne7hdfKSbOqqmkq8GCXc=
|
||||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||||
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||||
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||||
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||||
github.com/go-playground/validator/v10 v10.24.0 h1:KHQckvo8G6hlWnrPX4NJJ+aBfWNAE/HH+qdL2cBpCmg=
|
github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA=
|
||||||
github.com/go-playground/validator/v10 v10.24.0/go.mod h1:GGzBIJMuE98Ic/kJsBXbz1x/7cByt++cQ+YOuDM5wus=
|
github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
||||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
@ -60,9 +58,8 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+
|
|||||||
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
|
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
|
||||||
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
|
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
|
||||||
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||||
|
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||||
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
|
||||||
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
|
||||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||||
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||||
@ -78,10 +75,10 @@ github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8
|
|||||||
github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
|
github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
|
||||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||||
github.com/nats-io/nats.go v1.38.0 h1:A7P+g7Wjp4/NWqDOOP/K6hfhr54DvdDQUznt5JFg9XA=
|
github.com/nats-io/nats.go v1.37.0 h1:07rauXbVnnJvv1gfIyghFEo6lUcYRY0WXc3x7x0vUxE=
|
||||||
github.com/nats-io/nats.go v1.38.0/go.mod h1:IGUM++TwokGnXPs82/wCuiHS02/aKrdYUQkU8If6yjw=
|
github.com/nats-io/nats.go v1.37.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
|
||||||
github.com/nats-io/nkeys v0.4.9 h1:qe9Faq2Gxwi6RZnZMXfmGMZkg3afLLOtrU+gDZJ35b0=
|
github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI=
|
||||||
github.com/nats-io/nkeys v0.4.9/go.mod h1:jcMqs+FLG+W5YO36OX6wFIFcmpdAns+w1Wm6D3I/evE=
|
github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc=
|
||||||
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
|
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
|
||||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||||
github.com/ogier/pflag v0.0.1/go.mod h1:zkFki7tvTa0tafRvTBIZTvzYyAu6kQhPZFnshFFPE+g=
|
github.com/ogier/pflag v0.0.1/go.mod h1:zkFki7tvTa0tafRvTBIZTvzYyAu6kQhPZFnshFFPE+g=
|
||||||
@ -94,12 +91,12 @@ github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+
|
|||||||
github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
|
github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
|
||||||
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
|
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
|
||||||
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
|
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
|
||||||
github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
|
github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc=
|
||||||
github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
|
github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw=
|
||||||
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
|
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
|
||||||
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
|
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
|
||||||
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
|
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
|
||||||
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
|
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
|
||||||
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
|
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
|
||||||
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
|
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
|
||||||
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||||
@ -116,8 +113,8 @@ github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hg
|
|||||||
github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM=
|
github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
|
github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
|
||||||
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
|
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
|
||||||
github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY=
|
github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY=
|
||||||
@ -127,25 +124,25 @@ github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gi
|
|||||||
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM=
|
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM=
|
||||||
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI=
|
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI=
|
||||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
go.mongodb.org/mongo-driver v1.17.2 h1:gvZyk8352qSfzyZ2UMWcpDpMSGEr1eqE4T793SqyhzM=
|
go.mongodb.org/mongo-driver v1.17.1 h1:Wic5cJIwJgSpBhe3lx3+/RybR5PiYRMpVFgO7cOHyIM=
|
||||||
go.mongodb.org/mongo-driver v1.17.2/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ=
|
go.mongodb.org/mongo-driver v1.17.1/go.mod h1:wwWm/+BuOddhcq3n68LKRmgk2wXzmF6s0SFOa0GINL4=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
|
golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
|
||||||
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
|
golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
|
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
|
||||||
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
|
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
|
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||||
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
@ -156,23 +153,23 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
|
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
|
||||||
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||||
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
|
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
|
||||||
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU=
|
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
|
||||||
google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||||
|
179
routers/commentsRouter.go
Executable file → Normal file
179
routers/commentsRouter.go
Executable file → Normal file
@ -7,60 +7,6 @@ import (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"],
|
|
||||||
beego.ControllerComments{
|
|
||||||
Method: "Post",
|
|
||||||
Router: `/`,
|
|
||||||
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: "GetAll",
|
|
||||||
Router: `/`,
|
|
||||||
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: "Put",
|
|
||||||
Router: `/:id`,
|
|
||||||
AllowHTTPMethods: []string{"put"},
|
|
||||||
MethodParams: param.Make(),
|
|
||||||
Filters: nil,
|
|
||||||
Params: nil})
|
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"],
|
|
||||||
beego.ControllerComments{
|
|
||||||
Method: "Get",
|
|
||||||
Router: `/:id`,
|
|
||||||
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: "Delete",
|
|
||||||
Router: `/:id`,
|
|
||||||
AllowHTTPMethods: []string{"delete"},
|
|
||||||
MethodParams: param.Make(),
|
|
||||||
Filters: nil,
|
|
||||||
Params: nil})
|
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"],
|
|
||||||
beego.ControllerComments{
|
|
||||||
Method: "Search",
|
|
||||||
Router: `/search/:search`,
|
|
||||||
AllowHTTPMethods: []string{"get"},
|
|
||||||
MethodParams: param.Make(),
|
|
||||||
Filters: nil,
|
|
||||||
Params: nil})
|
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:DataController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:DataController"],
|
beego.GlobalControllerRouter["oc-catalog/controllers:DataController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:DataController"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "Post",
|
Method: "Post",
|
||||||
@ -115,118 +61,55 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"],
|
beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "EnumBookingStatus",
|
Method: "Post",
|
||||||
Router: `/booking/status`,
|
Router: `/`,
|
||||||
|
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: "GetAll",
|
||||||
|
Router: `/`,
|
||||||
AllowHTTPMethods: []string{"get"},
|
AllowHTTPMethods: []string{"get"},
|
||||||
MethodParams: param.Make(),
|
MethodParams: param.Make(),
|
||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"],
|
beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "EnumInfrastructure",
|
Method: "Put",
|
||||||
Router: `/infrastructure`,
|
Router: `/:id`,
|
||||||
|
AllowHTTPMethods: []string{"put"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
|
beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"],
|
||||||
|
beego.ControllerComments{
|
||||||
|
Method: "Get",
|
||||||
|
Router: `/:id`,
|
||||||
AllowHTTPMethods: []string{"get"},
|
AllowHTTPMethods: []string{"get"},
|
||||||
MethodParams: param.Make(),
|
MethodParams: param.Make(),
|
||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"],
|
beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "EnumRefundType",
|
Method: "Delete",
|
||||||
Router: `/pricing/refund/type`,
|
Router: `/:id`,
|
||||||
AllowHTTPMethods: []string{"get"},
|
AllowHTTPMethods: []string{"delete"},
|
||||||
MethodParams: param.Make(),
|
MethodParams: param.Make(),
|
||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"],
|
beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:ComputeController"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "EnumStrategyBuy",
|
Method: "Search",
|
||||||
Router: `/pricing/strategy/buy`,
|
Router: `/search/:search`,
|
||||||
AllowHTTPMethods: []string{"get"},
|
|
||||||
MethodParams: param.Make(),
|
|
||||||
Filters: nil,
|
|
||||||
Params: nil})
|
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"],
|
|
||||||
beego.ControllerComments{
|
|
||||||
Method: "EnumStrategyData",
|
|
||||||
Router: `/pricing/strategy/data`,
|
|
||||||
AllowHTTPMethods: []string{"get"},
|
|
||||||
MethodParams: param.Make(),
|
|
||||||
Filters: nil,
|
|
||||||
Params: nil})
|
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"],
|
|
||||||
beego.ControllerComments{
|
|
||||||
Method: "EnumStrategyPrivilege",
|
|
||||||
Router: `/pricing/strategy/privilege`,
|
|
||||||
AllowHTTPMethods: []string{"get"},
|
|
||||||
MethodParams: param.Make(),
|
|
||||||
Filters: nil,
|
|
||||||
Params: nil})
|
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"],
|
|
||||||
beego.ControllerComments{
|
|
||||||
Method: "EnumStrategyPrivilegeStorage",
|
|
||||||
Router: `/pricing/strategy/privilege/storage`,
|
|
||||||
AllowHTTPMethods: []string{"get"},
|
|
||||||
MethodParams: param.Make(),
|
|
||||||
Filters: nil,
|
|
||||||
Params: nil})
|
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"],
|
|
||||||
beego.ControllerComments{
|
|
||||||
Method: "EnumStrategyStorage",
|
|
||||||
Router: `/pricing/strategy/storage`,
|
|
||||||
AllowHTTPMethods: []string{"get"},
|
|
||||||
MethodParams: param.Make(),
|
|
||||||
Filters: nil,
|
|
||||||
Params: nil})
|
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"],
|
|
||||||
beego.ControllerComments{
|
|
||||||
Method: "EnumStrategyTime",
|
|
||||||
Router: `/pricing/strategy/time`,
|
|
||||||
AllowHTTPMethods: []string{"get"},
|
|
||||||
MethodParams: param.Make(),
|
|
||||||
Filters: nil,
|
|
||||||
Params: nil})
|
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"],
|
|
||||||
beego.ControllerComments{
|
|
||||||
Method: "EnumResourceType",
|
|
||||||
Router: `/resource/type`,
|
|
||||||
AllowHTTPMethods: []string{"get"},
|
|
||||||
MethodParams: param.Make(),
|
|
||||||
Filters: nil,
|
|
||||||
Params: nil})
|
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"],
|
|
||||||
beego.ControllerComments{
|
|
||||||
Method: "EnumStatus",
|
|
||||||
Router: `/status`,
|
|
||||||
AllowHTTPMethods: []string{"get"},
|
|
||||||
MethodParams: param.Make(),
|
|
||||||
Filters: nil,
|
|
||||||
Params: nil})
|
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"],
|
|
||||||
beego.ControllerComments{
|
|
||||||
Method: "EnumStorageSize",
|
|
||||||
Router: `/storage/size`,
|
|
||||||
AllowHTTPMethods: []string{"get"},
|
|
||||||
MethodParams: param.Make(),
|
|
||||||
Filters: nil,
|
|
||||||
Params: nil})
|
|
||||||
|
|
||||||
beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"] = append(beego.GlobalControllerRouter["oc-catalog/controllers:EnumController"],
|
|
||||||
beego.ControllerComments{
|
|
||||||
Method: "EnumStorageType",
|
|
||||||
Router: `/storage/type`,
|
|
||||||
AllowHTTPMethods: []string{"get"},
|
AllowHTTPMethods: []string{"get"},
|
||||||
MethodParams: param.Make(),
|
MethodParams: param.Make(),
|
||||||
Filters: nil,
|
Filters: nil,
|
||||||
|
5
routers/router.go
Executable file → Normal file
5
routers/router.go
Executable file → Normal file
@ -45,11 +45,6 @@ func init() {
|
|||||||
&controllers.WorkflowController{},
|
&controllers.WorkflowController{},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
beego.NSNamespace("/enum",
|
|
||||||
beego.NSInclude(
|
|
||||||
&controllers.EnumController{},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
beego.NSNamespace("/version",
|
beego.NSNamespace("/version",
|
||||||
beego.NSInclude(
|
beego.NSInclude(
|
||||||
&controllers.VersionController{},
|
&controllers.VersionController{},
|
||||||
|
0
swagger/favicon-16x16.png
Executable file → Normal file
0
swagger/favicon-16x16.png
Executable file → Normal file
Before Width: | Height: | Size: 665 B After Width: | Height: | Size: 665 B |
0
swagger/favicon-32x32.png
Executable file → Normal file
0
swagger/favicon-32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
0
swagger/index.html
Executable file → Normal file
0
swagger/index.html
Executable file → Normal file
0
swagger/oauth2-redirect.html
Executable file → Normal file
0
swagger/oauth2-redirect.html
Executable file → Normal file
0
swagger/swagger-ui-bundle.js
Executable file → Normal file
0
swagger/swagger-ui-bundle.js
Executable file → Normal file
0
swagger/swagger-ui-bundle.js.map
Executable file → Normal file
0
swagger/swagger-ui-bundle.js.map
Executable file → Normal file
0
swagger/swagger-ui-es-bundle-core.js
Executable file → Normal file
0
swagger/swagger-ui-es-bundle-core.js
Executable file → Normal file
0
swagger/swagger-ui-es-bundle.js
Executable file → Normal file
0
swagger/swagger-ui-es-bundle.js
Executable file → Normal file
0
swagger/swagger-ui-standalone-preset.js
Executable file → Normal file
0
swagger/swagger-ui-standalone-preset.js
Executable file → Normal file
0
swagger/swagger-ui-standalone-preset.js.map
Executable file → Normal file
0
swagger/swagger-ui-standalone-preset.js.map
Executable file → Normal file
0
swagger/swagger-ui.css
Executable file → Normal file
0
swagger/swagger-ui.css
Executable file → Normal file
0
swagger/swagger-ui.css.map
Executable file → Normal file
0
swagger/swagger-ui.css.map
Executable file → Normal file
0
swagger/swagger-ui.js
Executable file → Normal file
0
swagger/swagger-ui.js
Executable file → Normal file
0
swagger/swagger-ui.js.map
Executable file → Normal file
0
swagger/swagger-ui.js.map
Executable file → Normal file
529
swagger/swagger.json
Executable file → Normal file
529
swagger/swagger.json
Executable file → Normal file
@ -15,6 +15,140 @@
|
|||||||
},
|
},
|
||||||
"basePath": "/oc/",
|
"basePath": "/oc/",
|
||||||
"paths": {
|
"paths": {
|
||||||
|
"/data/": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"data"
|
||||||
|
],
|
||||||
|
"description": "find data by id\n\u003cbr\u003e",
|
||||||
|
"operationId": "DataController.GetAll",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "{data} models.data"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"data"
|
||||||
|
],
|
||||||
|
"description": "create data\n\u003cbr\u003e",
|
||||||
|
"operationId": "DataController.Create",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "body",
|
||||||
|
"name": "data",
|
||||||
|
"description": "body for data content (Json format)",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "{data} models.data"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/data/search/{search}": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"data"
|
||||||
|
],
|
||||||
|
"description": "find data by key word\n\u003cbr\u003e",
|
||||||
|
"operationId": "DataController.Get",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "search",
|
||||||
|
"description": "the search you want to get",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "{data} models.data"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/data/{id}": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"data"
|
||||||
|
],
|
||||||
|
"description": "find data by id\n\u003cbr\u003e",
|
||||||
|
"operationId": "DataController.Get",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "id",
|
||||||
|
"description": "the id you want to get",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "{data} models.data"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"tags": [
|
||||||
|
"data"
|
||||||
|
],
|
||||||
|
"description": "create datas\n\u003cbr\u003e",
|
||||||
|
"operationId": "DataController.Update",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "id",
|
||||||
|
"description": "the data id you want to get",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "body",
|
||||||
|
"name": "body",
|
||||||
|
"description": "The data content",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/models.data"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "{data} models.data"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"tags": [
|
||||||
|
"data"
|
||||||
|
],
|
||||||
|
"description": "delete the data\n\u003cbr\u003e",
|
||||||
|
"operationId": "DataController.Delete",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "id",
|
||||||
|
"description": "The id you want to delete",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "{data} delete success!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/compute/": {
|
"/compute/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -22,14 +156,6 @@
|
|||||||
],
|
],
|
||||||
"description": "find compute by id\n\u003cbr\u003e",
|
"description": "find compute by id\n\u003cbr\u003e",
|
||||||
"operationId": "ComputeController.GetAll",
|
"operationId": "ComputeController.GetAll",
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "is_draft",
|
|
||||||
"description": "draft wished",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "{compute} models.compute"
|
"description": "{compute} models.compute"
|
||||||
@ -74,12 +200,6 @@
|
|||||||
"description": "the search you want to get",
|
"description": "the search you want to get",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "is_draft",
|
|
||||||
"description": "draft wished",
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -163,319 +283,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/data/": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"data"
|
|
||||||
],
|
|
||||||
"description": "find data by id\n\u003cbr\u003e",
|
|
||||||
"operationId": "DataController.GetAll",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "is_draft",
|
|
||||||
"description": "draft wished",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{data} models.data"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"post": {
|
|
||||||
"tags": [
|
|
||||||
"data"
|
|
||||||
],
|
|
||||||
"description": "create data\n\u003cbr\u003e",
|
|
||||||
"operationId": "DataController.Create",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "body",
|
|
||||||
"name": "data",
|
|
||||||
"description": "body for data content (Json format)",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{data} models.data"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/data/search/{search}": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"data"
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{data} models.data"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/data/{id}": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"data"
|
|
||||||
],
|
|
||||||
"description": "find data by id\n\u003cbr\u003e",
|
|
||||||
"operationId": "DataController.Get",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "path",
|
|
||||||
"name": "id",
|
|
||||||
"description": "the id you want to get",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{data} models.data"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"put": {
|
|
||||||
"tags": [
|
|
||||||
"data"
|
|
||||||
],
|
|
||||||
"description": "create datas\n\u003cbr\u003e",
|
|
||||||
"operationId": "DataController.Update",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "path",
|
|
||||||
"name": "id",
|
|
||||||
"description": "the data id you want to get",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "body",
|
|
||||||
"name": "body",
|
|
||||||
"description": "The data content",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/models.data"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{data} models.data"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"delete": {
|
|
||||||
"tags": [
|
|
||||||
"data"
|
|
||||||
],
|
|
||||||
"description": "delete the data\n\u003cbr\u003e",
|
|
||||||
"operationId": "DataController.Delete",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "path",
|
|
||||||
"name": "id",
|
|
||||||
"description": "The id you want to delete",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{data} delete success!"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/enum/booking/status": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"enum"
|
|
||||||
],
|
|
||||||
"description": "get list of Infrastructure\n\u003cbr\u003e",
|
|
||||||
"operationId": "EnumController.BookingStatus",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{resource} models.resource"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/enum/infrastructure": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"enum"
|
|
||||||
],
|
|
||||||
"description": "get list of Infrastructure\n\u003cbr\u003e",
|
|
||||||
"operationId": "EnumController.EnumInfrastructure",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{resource} models.resource"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/enum/pricing/refund/type": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"enum"
|
|
||||||
],
|
|
||||||
"description": "get list of status\n\u003cbr\u003e",
|
|
||||||
"operationId": "EnumController.EnumRefundType",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{resource} models.resource"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/enum/pricing/strategy/buy": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"enum"
|
|
||||||
],
|
|
||||||
"description": "get list of status\n\u003cbr\u003e",
|
|
||||||
"operationId": "EnumController.EnumStrategyBuy",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{resource} models.resource"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/enum/pricing/strategy/data": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"enum"
|
|
||||||
],
|
|
||||||
"description": "get list of status\n\u003cbr\u003e",
|
|
||||||
"operationId": "EnumController.EnumStrategyData",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{resource} models.resource"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/enum/pricing/strategy/privilege": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"enum"
|
|
||||||
],
|
|
||||||
"description": "get list of status\n\u003cbr\u003e",
|
|
||||||
"operationId": "EnumController.EnumStrategyPrivilege",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{resource} models.resource"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/enum/pricing/strategy/privilege/storage": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"enum"
|
|
||||||
],
|
|
||||||
"description": "get list of status\n\u003cbr\u003e",
|
|
||||||
"operationId": "EnumController.EnumStrategyPrivilegeStorage",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{resource} models.resource"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/enum/pricing/strategy/storage": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"enum"
|
|
||||||
],
|
|
||||||
"description": "get list of status\n\u003cbr\u003e",
|
|
||||||
"operationId": "EnumController.EnumStrategyStorage",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{resource} models.resource"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/enum/pricing/strategy/time": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"enum"
|
|
||||||
],
|
|
||||||
"description": "get list of status\n\u003cbr\u003e",
|
|
||||||
"operationId": "EnumController.EnumStrategyTime",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{resource} models.resource"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/enum/resource/type": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"enum"
|
|
||||||
],
|
|
||||||
"description": "get list of status\n\u003cbr\u003e",
|
|
||||||
"operationId": "EnumController.EnumResourceType",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{resource} models.resource"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/enum/status": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"enum"
|
|
||||||
],
|
|
||||||
"description": "get list of status\n\u003cbr\u003e",
|
|
||||||
"operationId": "EnumController.EnumStatus",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{resource} models.resource"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/enum/storage/size": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"enum"
|
|
||||||
],
|
|
||||||
"description": "get list of StorageSize\n\u003cbr\u003e",
|
|
||||||
"operationId": "EnumController.EnumStorageSize",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{resource} models.resource"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/enum/storage/type": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"enum"
|
|
||||||
],
|
|
||||||
"description": "get list of StorageType\n\u003cbr\u003e",
|
|
||||||
"operationId": "EnumController.EnumStorageType",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "{resource} models.resource"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/processing/": {
|
"/processing/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -483,14 +290,6 @@
|
|||||||
],
|
],
|
||||||
"description": "find processing by id\n\u003cbr\u003e",
|
"description": "find processing by id\n\u003cbr\u003e",
|
||||||
"operationId": "ProcessingController.GetAll",
|
"operationId": "ProcessingController.GetAll",
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "is_draft",
|
|
||||||
"description": "draft wished",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "{processing} models.processing"
|
"description": "{processing} models.processing"
|
||||||
@ -535,12 +334,6 @@
|
|||||||
"description": "the search you want to get",
|
"description": "the search you want to get",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "is_draft",
|
|
||||||
"description": "draft wished",
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -631,14 +424,6 @@
|
|||||||
],
|
],
|
||||||
"description": "find resource by id\n\u003cbr\u003e",
|
"description": "find resource by id\n\u003cbr\u003e",
|
||||||
"operationId": "ResourceController.GetAll",
|
"operationId": "ResourceController.GetAll",
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "is_draft",
|
|
||||||
"description": "draft wished",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "{resource} models.resource"
|
"description": "{resource} models.resource"
|
||||||
@ -660,12 +445,6 @@
|
|||||||
"description": "the search you want to get",
|
"description": "the search you want to get",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "is_draft",
|
|
||||||
"description": "draft wished",
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -726,14 +505,6 @@
|
|||||||
],
|
],
|
||||||
"description": "find storage by id\n\u003cbr\u003e",
|
"description": "find storage by id\n\u003cbr\u003e",
|
||||||
"operationId": "StorageController.GetAll",
|
"operationId": "StorageController.GetAll",
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "is_draft",
|
|
||||||
"description": "draft wished",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "{storage} models.storage"
|
"description": "{storage} models.storage"
|
||||||
@ -778,12 +549,6 @@
|
|||||||
"description": "the search you want to get",
|
"description": "the search you want to get",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "is_draft",
|
|
||||||
"description": "draft wished",
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -902,14 +667,6 @@
|
|||||||
],
|
],
|
||||||
"description": "find workflow by id\n\u003cbr\u003e",
|
"description": "find workflow by id\n\u003cbr\u003e",
|
||||||
"operationId": "WorkflowController.GetAll",
|
"operationId": "WorkflowController.GetAll",
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "is_draft",
|
|
||||||
"description": "draft wished",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "{workflow} models.workflow"
|
"description": "{workflow} models.workflow"
|
||||||
@ -954,12 +711,6 @@
|
|||||||
"description": "the search you want to get",
|
"description": "the search you want to get",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "is_draft",
|
|
||||||
"description": "draft wished",
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -1049,14 +800,14 @@
|
|||||||
"title": "json",
|
"title": "json",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"models.compute": {
|
|
||||||
"title": "compute",
|
|
||||||
"type": "object"
|
|
||||||
},
|
|
||||||
"models.data": {
|
"models.data": {
|
||||||
"title": "data",
|
"title": "data",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"models.compute": {
|
||||||
|
"title": "compute",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"models.processing": {
|
"models.processing": {
|
||||||
"title": "processing",
|
"title": "processing",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
@ -1095,10 +846,6 @@
|
|||||||
"name": "workflow",
|
"name": "workflow",
|
||||||
"description": "Operations about workflow\n"
|
"description": "Operations about workflow\n"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "enum",
|
|
||||||
"description": "Operations about resource\n"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "version",
|
"name": "version",
|
||||||
"description": "VersionController operations for Version\n"
|
"description": "VersionController operations for Version\n"
|
||||||
|
392
swagger/swagger.yml
Executable file → Normal file
392
swagger/swagger.yml
Executable file → Normal file
@ -12,6 +12,106 @@ info:
|
|||||||
url: https://www.gnu.org/licenses/agpl-3.0.html
|
url: https://www.gnu.org/licenses/agpl-3.0.html
|
||||||
basePath: /oc/
|
basePath: /oc/
|
||||||
paths:
|
paths:
|
||||||
|
/data/:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- data
|
||||||
|
description: |-
|
||||||
|
find data by id
|
||||||
|
<br>
|
||||||
|
operationId: DataController.GetAll
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: '{data} models.data'
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- data
|
||||||
|
description: |-
|
||||||
|
create data
|
||||||
|
<br>
|
||||||
|
operationId: DataController.Create
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: data
|
||||||
|
description: body for data content (Json format)
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/json'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: '{data} models.data'
|
||||||
|
/data/{id}:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- data
|
||||||
|
description: |-
|
||||||
|
find data by id
|
||||||
|
<br>
|
||||||
|
operationId: DataController.Get
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
description: the id you want to get
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: '{data} models.data'
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- data
|
||||||
|
description: |-
|
||||||
|
create datas
|
||||||
|
<br>
|
||||||
|
operationId: DataController.Update
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
description: the data id you want to get
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: The data content
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.data'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: '{data} models.data'
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- data
|
||||||
|
description: |-
|
||||||
|
delete the data
|
||||||
|
<br>
|
||||||
|
operationId: DataController.Delete
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
description: The id you want to delete
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: '{data} delete success!'
|
||||||
|
/data/search/{search}:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- data
|
||||||
|
description: |-
|
||||||
|
find data by key word
|
||||||
|
<br>
|
||||||
|
operationId: DataController.Get
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: search
|
||||||
|
description: the search you want to get
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: '{data} models.data'
|
||||||
/compute/:
|
/compute/:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -20,11 +120,6 @@ paths:
|
|||||||
find compute by id
|
find compute by id
|
||||||
<br>
|
<br>
|
||||||
operationId: ComputeController.GetAll
|
operationId: ComputeController.GetAll
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: is_draft
|
|
||||||
description: draft wished
|
|
||||||
type: string
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{compute} models.compute'
|
description: '{compute} models.compute'
|
||||||
@ -114,251 +209,9 @@ paths:
|
|||||||
description: the search you want to get
|
description: the search you want to get
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: query
|
|
||||||
name: is_draft
|
|
||||||
description: draft wished
|
|
||||||
type: string
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{compute} models.compute'
|
description: '{compute} models.compute'
|
||||||
/data/:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- data
|
|
||||||
description: |-
|
|
||||||
find data by id
|
|
||||||
<br>
|
|
||||||
operationId: DataController.GetAll
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: is_draft
|
|
||||||
description: draft wished
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{data} models.data'
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- data
|
|
||||||
description: |-
|
|
||||||
create data
|
|
||||||
<br>
|
|
||||||
operationId: DataController.Create
|
|
||||||
parameters:
|
|
||||||
- in: body
|
|
||||||
name: data
|
|
||||||
description: body for data content (Json format)
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/json'
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{data} models.data'
|
|
||||||
/data/{id}:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- data
|
|
||||||
description: |-
|
|
||||||
find data by id
|
|
||||||
<br>
|
|
||||||
operationId: DataController.Get
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: id
|
|
||||||
description: the id you want to get
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{data} models.data'
|
|
||||||
put:
|
|
||||||
tags:
|
|
||||||
- data
|
|
||||||
description: |-
|
|
||||||
create datas
|
|
||||||
<br>
|
|
||||||
operationId: DataController.Update
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: id
|
|
||||||
description: the data id you want to get
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: body
|
|
||||||
name: body
|
|
||||||
description: The data content
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/models.data'
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{data} models.data'
|
|
||||||
delete:
|
|
||||||
tags:
|
|
||||||
- data
|
|
||||||
description: |-
|
|
||||||
delete the data
|
|
||||||
<br>
|
|
||||||
operationId: DataController.Delete
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: id
|
|
||||||
description: The id you want to delete
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{data} delete success!'
|
|
||||||
/data/search/{search}:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- data
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{data} models.data'
|
|
||||||
/enum/booking/status:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- enum
|
|
||||||
description: |-
|
|
||||||
get list of Infrastructure
|
|
||||||
<br>
|
|
||||||
operationId: EnumController.BookingStatus
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{resource} models.resource'
|
|
||||||
/enum/infrastructure:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- enum
|
|
||||||
description: |-
|
|
||||||
get list of Infrastructure
|
|
||||||
<br>
|
|
||||||
operationId: EnumController.EnumInfrastructure
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{resource} models.resource'
|
|
||||||
/enum/pricing/refund/type:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- enum
|
|
||||||
description: |-
|
|
||||||
get list of status
|
|
||||||
<br>
|
|
||||||
operationId: EnumController.EnumRefundType
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{resource} models.resource'
|
|
||||||
/enum/pricing/strategy/buy:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- enum
|
|
||||||
description: |-
|
|
||||||
get list of status
|
|
||||||
<br>
|
|
||||||
operationId: EnumController.EnumStrategyBuy
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{resource} models.resource'
|
|
||||||
/enum/pricing/strategy/data:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- enum
|
|
||||||
description: |-
|
|
||||||
get list of status
|
|
||||||
<br>
|
|
||||||
operationId: EnumController.EnumStrategyData
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{resource} models.resource'
|
|
||||||
/enum/pricing/strategy/privilege:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- enum
|
|
||||||
description: |-
|
|
||||||
get list of status
|
|
||||||
<br>
|
|
||||||
operationId: EnumController.EnumStrategyPrivilege
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{resource} models.resource'
|
|
||||||
/enum/pricing/strategy/privilege/storage:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- enum
|
|
||||||
description: |-
|
|
||||||
get list of status
|
|
||||||
<br>
|
|
||||||
operationId: EnumController.EnumStrategyPrivilegeStorage
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{resource} models.resource'
|
|
||||||
/enum/pricing/strategy/storage:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- enum
|
|
||||||
description: |-
|
|
||||||
get list of status
|
|
||||||
<br>
|
|
||||||
operationId: EnumController.EnumStrategyStorage
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{resource} models.resource'
|
|
||||||
/enum/pricing/strategy/time:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- enum
|
|
||||||
description: |-
|
|
||||||
get list of status
|
|
||||||
<br>
|
|
||||||
operationId: EnumController.EnumStrategyTime
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{resource} models.resource'
|
|
||||||
/enum/resource/type:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- enum
|
|
||||||
description: |-
|
|
||||||
get list of status
|
|
||||||
<br>
|
|
||||||
operationId: EnumController.EnumResourceType
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{resource} models.resource'
|
|
||||||
/enum/status:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- enum
|
|
||||||
description: |-
|
|
||||||
get list of status
|
|
||||||
<br>
|
|
||||||
operationId: EnumController.EnumStatus
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{resource} models.resource'
|
|
||||||
/enum/storage/size:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- enum
|
|
||||||
description: |-
|
|
||||||
get list of StorageSize
|
|
||||||
<br>
|
|
||||||
operationId: EnumController.EnumStorageSize
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{resource} models.resource'
|
|
||||||
/enum/storage/type:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- enum
|
|
||||||
description: |-
|
|
||||||
get list of StorageType
|
|
||||||
<br>
|
|
||||||
operationId: EnumController.EnumStorageType
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{resource} models.resource'
|
|
||||||
/processing/:
|
/processing/:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -367,11 +220,6 @@ paths:
|
|||||||
find processing by id
|
find processing by id
|
||||||
<br>
|
<br>
|
||||||
operationId: ProcessingController.GetAll
|
operationId: ProcessingController.GetAll
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: is_draft
|
|
||||||
description: draft wished
|
|
||||||
type: string
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{processing} models.processing'
|
description: '{processing} models.processing'
|
||||||
@ -461,10 +309,6 @@ paths:
|
|||||||
description: the search you want to get
|
description: the search you want to get
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: query
|
|
||||||
name: is_draft
|
|
||||||
description: draft wished
|
|
||||||
type: string
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{processing} models.processing'
|
description: '{processing} models.processing'
|
||||||
@ -476,11 +320,6 @@ paths:
|
|||||||
find resource by id
|
find resource by id
|
||||||
<br>
|
<br>
|
||||||
operationId: ResourceController.GetAll
|
operationId: ResourceController.GetAll
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: is_draft
|
|
||||||
description: draft wished
|
|
||||||
type: string
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{resource} models.resource'
|
description: '{resource} models.resource'
|
||||||
@ -531,10 +370,6 @@ paths:
|
|||||||
description: the search you want to get
|
description: the search you want to get
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: query
|
|
||||||
name: is_draft
|
|
||||||
description: draft wished
|
|
||||||
type: string
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{resource} models.resource'
|
description: '{resource} models.resource'
|
||||||
@ -546,11 +381,6 @@ paths:
|
|||||||
find storage by id
|
find storage by id
|
||||||
<br>
|
<br>
|
||||||
operationId: StorageController.GetAll
|
operationId: StorageController.GetAll
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: is_draft
|
|
||||||
description: draft wished
|
|
||||||
type: string
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{storage} models.storage'
|
description: '{storage} models.storage'
|
||||||
@ -640,10 +470,6 @@ paths:
|
|||||||
description: the search you want to get
|
description: the search you want to get
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: query
|
|
||||||
name: is_draft
|
|
||||||
description: draft wished
|
|
||||||
type: string
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{storage} models.storage'
|
description: '{storage} models.storage'
|
||||||
@ -677,11 +503,6 @@ paths:
|
|||||||
find workflow by id
|
find workflow by id
|
||||||
<br>
|
<br>
|
||||||
operationId: WorkflowController.GetAll
|
operationId: WorkflowController.GetAll
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: is_draft
|
|
||||||
description: draft wished
|
|
||||||
type: string
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{workflow} models.workflow'
|
description: '{workflow} models.workflow'
|
||||||
@ -771,10 +592,6 @@ paths:
|
|||||||
description: the search you want to get
|
description: the search you want to get
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: query
|
|
||||||
name: is_draft
|
|
||||||
description: draft wished
|
|
||||||
type: string
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{workflow} models.workflow'
|
description: '{workflow} models.workflow'
|
||||||
@ -782,12 +599,12 @@ definitions:
|
|||||||
json:
|
json:
|
||||||
title: json
|
title: json
|
||||||
type: object
|
type: object
|
||||||
models.compute:
|
|
||||||
title: compute
|
|
||||||
type: object
|
|
||||||
models.data:
|
models.data:
|
||||||
title: data
|
title: data
|
||||||
type: object
|
type: object
|
||||||
|
models.compute:
|
||||||
|
title: compute
|
||||||
|
type: object
|
||||||
models.processing:
|
models.processing:
|
||||||
title: processing
|
title: processing
|
||||||
type: object
|
type: object
|
||||||
@ -816,9 +633,6 @@ tags:
|
|||||||
- name: workflow
|
- name: workflow
|
||||||
description: |
|
description: |
|
||||||
Operations about workflow
|
Operations about workflow
|
||||||
- name: enum
|
|
||||||
description: |
|
|
||||||
Operations about resource
|
|
||||||
- name: version
|
- name: version
|
||||||
description: |
|
description: |
|
||||||
VersionController operations for Version
|
VersionController operations for Version
|
||||||
|
0
tests/default_test.go
Executable file → Normal file
0
tests/default_test.go
Executable file → Normal file
Loading…
Reference in New Issue
Block a user