add peer paths
This commit is contained in:
parent
205b89de9e
commit
5b75ed0473
@ -47,6 +47,9 @@ func (o *SharedWorkspaceController) Put() {
|
|||||||
tools.DELETE: oclib.GetPath(oclib.LibDataEnum(oclib.WORKFLOW)) + "/oc/workflow/:id",
|
tools.DELETE: oclib.GetPath(oclib.LibDataEnum(oclib.WORKFLOW)) + "/oc/workflow/:id",
|
||||||
tools.POST: oclib.GetPath(oclib.LibDataEnum(oclib.WORKFLOW)) + "/oc/workflow/",
|
tools.POST: oclib.GetPath(oclib.LibDataEnum(oclib.WORKFLOW)) + "/oc/workflow/",
|
||||||
},
|
},
|
||||||
|
utils.PEER.String(): {
|
||||||
|
tools.POST: oclib.GetPath(oclib.LibDataEnum(oclib.PEER)) + "/oc/peer",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
var res map[string]interface{}
|
var res map[string]interface{}
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
@ -75,6 +78,9 @@ func (o *SharedWorkspaceController) Post() {
|
|||||||
tools.DELETE: oclib.GetPath(oclib.LibDataEnum(oclib.WORKFLOW)) + "/oc/workflow/:id",
|
tools.DELETE: oclib.GetPath(oclib.LibDataEnum(oclib.WORKFLOW)) + "/oc/workflow/:id",
|
||||||
tools.POST: oclib.GetPath(oclib.LibDataEnum(oclib.WORKFLOW)) + "/oc/workflow/",
|
tools.POST: oclib.GetPath(oclib.LibDataEnum(oclib.WORKFLOW)) + "/oc/workflow/",
|
||||||
},
|
},
|
||||||
|
utils.PEER.String(): {
|
||||||
|
tools.POST: oclib.GetPath(oclib.LibDataEnum(oclib.PEER)) + "/oc/peer",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
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)
|
||||||
@ -122,6 +128,9 @@ func (o *SharedWorkspaceController) Delete() {
|
|||||||
tools.DELETE: oclib.GetPath(oclib.LibDataEnum(oclib.WORKFLOW)) + "/oc/workflow/:id",
|
tools.DELETE: oclib.GetPath(oclib.LibDataEnum(oclib.WORKFLOW)) + "/oc/workflow/:id",
|
||||||
tools.POST: oclib.GetPath(oclib.LibDataEnum(oclib.WORKFLOW)) + "/oc/workflow/",
|
tools.POST: oclib.GetPath(oclib.LibDataEnum(oclib.WORKFLOW)) + "/oc/workflow/",
|
||||||
},
|
},
|
||||||
|
utils.PEER.String(): {
|
||||||
|
tools.POST: oclib.GetPath(oclib.LibDataEnum(oclib.PEER)) + "/oc/peer",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
id := o.Ctx.Input.Param(":id")
|
id := o.Ctx.Input.Param(":id")
|
||||||
caller := tools.NewHTTPCaller(paths)
|
caller := tools.NewHTTPCaller(paths)
|
||||||
|
1
main.go
1
main.go
@ -33,6 +33,7 @@ func main() {
|
|||||||
oclib.AddPath(oclib.LibDataEnum(oclib.SHARED_WORKSPACE), o.GetStringDefault("SHARED_WORKSPACE_URL", ":8091"))
|
oclib.AddPath(oclib.LibDataEnum(oclib.SHARED_WORKSPACE), o.GetStringDefault("SHARED_WORKSPACE_URL", ":8091"))
|
||||||
oclib.AddPath(oclib.LibDataEnum(oclib.WORKSPACE), o.GetStringDefault("WORKSPACE_URL", ":8089"))
|
oclib.AddPath(oclib.LibDataEnum(oclib.WORKSPACE), o.GetStringDefault("WORKSPACE_URL", ":8089"))
|
||||||
oclib.AddPath(oclib.LibDataEnum(oclib.WORKFLOW), o.GetStringDefault("WORKFLOW_URL", ":8088"))
|
oclib.AddPath(oclib.LibDataEnum(oclib.WORKFLOW), o.GetStringDefault("WORKFLOW_URL", ":8088"))
|
||||||
|
oclib.AddPath(oclib.LibDataEnum(oclib.PEER), o.GetStringDefault("WORKFLOW_URL", ":8093"))
|
||||||
// Normal beego init
|
// Normal beego init
|
||||||
//if beego.BConfig.RunMode == "dev" {
|
//if beego.BConfig.RunMode == "dev" {
|
||||||
beego.BConfig.WebConfig.DirectoryIndex = true
|
beego.BConfig.WebConfig.DirectoryIndex = true
|
||||||
|
Loading…
Reference in New Issue
Block a user