Compare commits
24 Commits
c97b8ab8ac
...
demo-alpr
| Author | SHA1 | Date | |
|---|---|---|---|
| e3a3e7ed4a | |||
| e45f7c2bf8 | |||
| d76473bb0f | |||
| edc8915e2f | |||
| 7452451f28 | |||
| 75b90ac64c | |||
| 47eb681f3b | |||
| b0de32c0d3 | |||
| ed9e98e5f9 | |||
| 7d391e4059 | |||
| f56a5d0dd3 | |||
| 90ac9b4d44 | |||
| 3b65fb934b | |||
| 6567dc68a5 | |||
| e9eeac3738 | |||
| c4d2081bf2 | |||
| 73b2446397 | |||
| f3566e1120 | |||
| 863b413258 | |||
| d34a960c96 | |||
| 7c994437e0 | |||
| c8038f42c1 | |||
| 6af13d4f0d | |||
| 3b8c543697 |
42
Dockerfile
42
Dockerfile
@@ -1,29 +1,45 @@
|
||||
FROM golang:alpine AS deps
|
||||
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN sed -i '/replace/d' go.mod
|
||||
RUN go mod download
|
||||
|
||||
#----------------------------------------------------------------------------------------------
|
||||
|
||||
FROM golang:alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN apk add git
|
||||
|
||||
RUN go get github.com/beego/bee/v2 && go install github.com/beego/bee/v2@master
|
||||
RUN go install github.com/beego/bee/v2@latest
|
||||
|
||||
RUN timeout 15 bee run -gendoc=true -downdoc=true -runmode=dev || :
|
||||
WORKDIR /oc-shared
|
||||
|
||||
RUN sed -i 's/http:\/\/127.0.0.1:8080\/swagger\/swagger.json/swagger.json/g' swagger/index.html
|
||||
COPY --from=deps /go/pkg /go/pkg
|
||||
COPY --from=deps /app/go.mod /app/go.sum ./
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" .
|
||||
RUN export CGO_ENABLED=0 && \
|
||||
export GOOS=linux && \
|
||||
export GOARCH=amd64 && \
|
||||
export BUILD_FLAGS="-ldflags='-w -s'"
|
||||
|
||||
RUN ls /app
|
||||
COPY . .
|
||||
|
||||
FROM scratch
|
||||
RUN sed -i '/replace/d' go.mod
|
||||
RUN bee pack
|
||||
RUN mkdir -p /app/extracted && tar -zxvf oc-shared.tar.gz -C /app/extracted
|
||||
RUN sed -i 's/http:\/\/127.0.0.1:8080\/swagger\/swagger.json/swagger.json/g' /app/extracted/swagger/index.html
|
||||
|
||||
#----------------------------------------------------------------------------------------------
|
||||
|
||||
FROM golang:alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/oc-shared /usr/bin/
|
||||
COPY --from=builder /app/swagger /app/swagger
|
||||
|
||||
COPY docker_shared.json /etc/oc/shared.json
|
||||
COPY --from=builder /app/extracted/oc-shared /usr/bin/
|
||||
COPY --from=builder /app/extracted/swagger /app/swagger
|
||||
COPY --from=builder /app/extracted/docker_shared.json /etc/oc/shared.json
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
||||
35
Makefile
Normal file
35
Makefile
Normal file
@@ -0,0 +1,35 @@
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
build: clean
|
||||
bee pack
|
||||
|
||||
run:
|
||||
bee run -gendoc=true -downdoc=true
|
||||
|
||||
purge:
|
||||
lsof -t -i:8091 | xargs kill | true
|
||||
|
||||
run-dev:
|
||||
bee generate routers && bee run -gendoc=true -downdoc=true -runmode=prod
|
||||
|
||||
dev: purge run-dev
|
||||
|
||||
debug:
|
||||
bee run -downdebug -gendebug
|
||||
|
||||
clean:
|
||||
rm -rf oc-shared.tar.gz
|
||||
|
||||
docker:
|
||||
DOCKER_BUILDKIT=1 docker build -t oc/oc-shared:0.0.1 -f Dockerfile .
|
||||
docker tag oc/oc-shared:0.0.1 oc/oc-shared:latest
|
||||
|
||||
publish-kind:
|
||||
kind load docker-image oc/oc-shared:0.0.1 --name opencloud
|
||||
|
||||
publish-registry:
|
||||
@echo "TODO"
|
||||
|
||||
all: docker publish-kind publish-registry
|
||||
|
||||
.PHONY: build run clean docker publish-kind publish-registry
|
||||
@@ -6,6 +6,8 @@ To build :
|
||||
|
||||
bee generate routers
|
||||
bee run -gendoc=true -downdoc=true
|
||||
OR
|
||||
make dev
|
||||
|
||||
If default Swagger page is displayed instead of tyour api, change url in swagger/index.html file to :
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"slices"
|
||||
|
||||
oclib "cloud.o-forge.io/core/oc-lib"
|
||||
"cloud.o-forge.io/core/oc-lib/config"
|
||||
"cloud.o-forge.io/core/oc-lib/tools"
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
@@ -17,31 +18,34 @@ type CollaborativeAreaController struct {
|
||||
|
||||
var paths = map[tools.DataType]map[tools.METHOD]string{ // paths used to call other OC services
|
||||
tools.COLLABORATIVE_AREA: {
|
||||
tools.DELETE: "/oc/shared/workspace/:id?is_remote=true",
|
||||
tools.POST: "/oc/shared/workspace/?is_remote=true",
|
||||
tools.DELETE: "/collaborative_area/:id?is_remote=true",
|
||||
tools.POST: "/collaborative_area/?is_remote=true",
|
||||
},
|
||||
tools.WORKSPACE: {
|
||||
tools.DELETE: "/oc/workspace/:id?is_remote=true",
|
||||
tools.POST: "/oc/workspace/?is_remote=true",
|
||||
tools.DELETE: "/:id?is_remote=true",
|
||||
tools.POST: "/?is_remote=true",
|
||||
},
|
||||
tools.WORKFLOW: {
|
||||
tools.DELETE: "/oc/workflow/:id?is_remote=true",
|
||||
tools.POST: "/oc/workflow/?is_remote=true",
|
||||
tools.DELETE: "/:id?is_remote=true",
|
||||
tools.POST: "/?is_remote=true",
|
||||
},
|
||||
tools.PEER: {
|
||||
tools.POST: "/oc/peer",
|
||||
tools.POST: "/status/",
|
||||
},
|
||||
}
|
||||
|
||||
// @Title Search
|
||||
// @Description search shared workspace
|
||||
// @Param search path string true "the word search you want to get"
|
||||
// @Param is_draft query string false "draft wished"
|
||||
// @Success 200 {shared workspace} models.shared_workspace
|
||||
// @router /search/:search [get]
|
||||
func (o *CollaborativeAreaController) Search() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
// store and return Id or post with UUID
|
||||
search := o.Ctx.Input.Param(":search")
|
||||
o.Data["json"] = oclib.Search(nil, search, oclib.LibDataEnum(tools.COLLABORATIVE_AREA))
|
||||
isDraft := o.Ctx.Input.Query("is_draft")
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).Search(nil, search, isDraft == "true")
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -52,6 +56,7 @@ func (o *CollaborativeAreaController) Search() {
|
||||
// @Success 200 {shared workspace} models.shared_workspace
|
||||
// @router /:id [put]
|
||||
func (o *CollaborativeAreaController) Put() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
// store and return Id or post with UUID
|
||||
var res map[string]interface{}
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
@@ -59,7 +64,7 @@ func (o *CollaborativeAreaController) Put() {
|
||||
caller := tools.NewHTTPCaller(paths) // caller used to send to peers
|
||||
caller.Disabled = oclib.IsQueryParamsEquals(o.Ctx.Input, "is_remote", true)
|
||||
fmt.Println("UPDATE", res)
|
||||
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), res, id, caller)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, caller).UpdateOne(res, id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -69,20 +74,24 @@ func (o *CollaborativeAreaController) Put() {
|
||||
// @Success 200 {shared workspace} models.shared_workspace
|
||||
// @router / [post]
|
||||
func (o *CollaborativeAreaController) Post() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
caller := tools.NewHTTPCaller(paths) // caller used to send to peers
|
||||
caller.Disabled = oclib.IsQueryParamsEquals(o.Ctx.Input, "is_remote", true)
|
||||
var res map[string]interface{}
|
||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||
o.Data["json"] = oclib.StoreOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), res, caller)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, caller).StoreOne(res)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title GetAll
|
||||
// @Description find shared workspace by id
|
||||
// @Param is_draft query string false "draft wished"
|
||||
// @Success 200 {shared_workspace} models.shared_workspace
|
||||
// @router / [get]
|
||||
func (o *CollaborativeAreaController) GetAll() {
|
||||
o.Data["json"] = oclib.LoadAll(oclib.LibDataEnum(tools.COLLABORATIVE_AREA))
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
isDraft := o.Ctx.Input.Query("is_draft")
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).LoadAll(isDraft == "true")
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -92,23 +101,25 @@ func (o *CollaborativeAreaController) GetAll() {
|
||||
// @Success 200 {shared workspace} models.shared_workspace
|
||||
// @router /:id [get]
|
||||
func (o *CollaborativeAreaController) Get() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
o.Data["json"] = oclib.LoadOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), id)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).LoadOne(id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title Add Workspace
|
||||
// @Title Remove Workspace
|
||||
// @Description find shared workspace by id
|
||||
// @Param id path string true "the id you want to get"
|
||||
// @Param id2 path string true "the id you want to add"
|
||||
// @Success 200 {shared workspace} models.shared_workspace
|
||||
// @router /:id/workspace/:id2 [delete]
|
||||
func (o *CollaborativeAreaController) RemoveWorkspace() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
caller := tools.NewHTTPCaller(paths) // caller used to send to peers
|
||||
caller.Disabled = oclib.IsQueryParamsEquals(o.Ctx.Input, "is_remote", true)
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
id2 := o.Ctx.Input.Param(":id2")
|
||||
r := oclib.LoadOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), id)
|
||||
r := oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).LoadOne(id)
|
||||
shared := r.ToCollaborativeArea()
|
||||
newWorkspace := []string{}
|
||||
if slices.Contains(shared.Workspaces, id2) {
|
||||
@@ -119,7 +130,8 @@ func (o *CollaborativeAreaController) RemoveWorkspace() {
|
||||
}
|
||||
shared.Workspaces = newWorkspace
|
||||
}
|
||||
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), shared.Serialize(), id, caller)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, caller).UpdateOne(
|
||||
shared.Serialize(shared), id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -130,23 +142,22 @@ func (o *CollaborativeAreaController) RemoveWorkspace() {
|
||||
// @Success 200 {shared workspace} models.shared_workspace
|
||||
// @router /:id/workflow/:id2 [delete]
|
||||
func (o *CollaborativeAreaController) RemoveWorkflow() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
caller := tools.NewHTTPCaller(paths) // caller used to send to peers
|
||||
caller.Disabled = oclib.IsQueryParamsEquals(o.Ctx.Input, "is_remote", true)
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
id2 := o.Ctx.Input.Param(":id2")
|
||||
r := oclib.LoadOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), id)
|
||||
fmt.Println("RemoveWorkflow", r)
|
||||
r := oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).LoadOne(id)
|
||||
shared := r.ToCollaborativeArea()
|
||||
newWorkflows := []string{}
|
||||
if slices.Contains(shared.Workflows, id2) {
|
||||
for _, w := range shared.Workflows {
|
||||
if w != id2 {
|
||||
newWorkflows = append(newWorkflows, w)
|
||||
}
|
||||
for _, w := range shared.Workflows {
|
||||
if w != id2 {
|
||||
newWorkflows = append(newWorkflows, w)
|
||||
}
|
||||
shared.Workflows = newWorkflows
|
||||
}
|
||||
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), shared.Serialize(), id, caller)
|
||||
shared.Workflows = newWorkflows
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, caller).UpdateOne(
|
||||
shared.Serialize(shared), id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -157,14 +168,15 @@ func (o *CollaborativeAreaController) RemoveWorkflow() {
|
||||
// @Success 200 {shared workspace} models.shared_workspace
|
||||
// @router /:id/peer/:id2 [delete]
|
||||
func (o *CollaborativeAreaController) RemovePeer() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
caller := tools.NewHTTPCaller(paths) // caller used to send to peers
|
||||
caller.Disabled = oclib.IsQueryParamsEquals(o.Ctx.Input, "is_remote", true)
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
id2 := o.Ctx.Input.Param(":id2")
|
||||
r := oclib.LoadOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), id)
|
||||
r := oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).LoadOne(id)
|
||||
shared := r.ToCollaborativeArea()
|
||||
newPeers := []string{}
|
||||
if shared.CreatorID != id2 {
|
||||
newPeers := map[string][]string{}
|
||||
if shared.CreatorID == id2 {
|
||||
o.Data["json"] = map[string]interface{}{
|
||||
"data": nil,
|
||||
"code": 409,
|
||||
@@ -173,15 +185,28 @@ func (o *CollaborativeAreaController) RemovePeer() {
|
||||
o.ServeJSON()
|
||||
return
|
||||
}
|
||||
if slices.Contains(shared.Peers, id) && shared.CreatorID != id2 {
|
||||
for _, peer := range shared.Peers {
|
||||
if peer != id2 {
|
||||
newPeers = append(newPeers, peer)
|
||||
}
|
||||
if shared.AllowedPeersGroup != nil {
|
||||
keys := make([]string, len(shared.AllowedPeersGroup))
|
||||
i := 0
|
||||
for k := range shared.AllowedPeersGroup {
|
||||
keys[i] = k
|
||||
i++
|
||||
}
|
||||
if slices.Contains(keys, id) && shared.CreatorID != id2 {
|
||||
for _, peer := range keys {
|
||||
if peer != id2 {
|
||||
if config.GetConfig().Whitelist {
|
||||
newPeers[peer] = []string{"*"}
|
||||
} else {
|
||||
newPeers[peer] = []string{}
|
||||
}
|
||||
}
|
||||
}
|
||||
shared.AllowedPeersGroup = newPeers
|
||||
}
|
||||
shared.Peers = newPeers
|
||||
}
|
||||
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), shared.Serialize(), id, caller)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, caller).UpdateOne(
|
||||
shared.Serialize(shared), id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -192,11 +217,12 @@ func (o *CollaborativeAreaController) RemovePeer() {
|
||||
// @Success 200 {shared workspace} models.shared_workspace
|
||||
// @router /:id/rule/:id2 [delete]
|
||||
func (o *CollaborativeAreaController) RemoveRule() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
caller := tools.NewHTTPCaller(paths) // caller used to send to peers
|
||||
caller.Disabled = oclib.IsQueryParamsEquals(o.Ctx.Input, "is_remote", true)
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
id2 := o.Ctx.Input.Param(":id2")
|
||||
r := oclib.LoadOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), id)
|
||||
r := oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).LoadOne(id)
|
||||
shared := r.ToCollaborativeArea()
|
||||
newRules := []string{}
|
||||
if shared != nil && slices.Contains(shared.Rules, id2) {
|
||||
@@ -207,7 +233,8 @@ func (o *CollaborativeAreaController) RemoveRule() {
|
||||
}
|
||||
shared.Rules = newRules
|
||||
}
|
||||
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), shared.Serialize(), id, caller)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, caller).UpdateOne(
|
||||
shared.Serialize(shared), id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -218,11 +245,12 @@ func (o *CollaborativeAreaController) RemoveRule() {
|
||||
// @Success 200 {shared workspace} models.shared_workspace
|
||||
// @router /:id/workspace/:id2 [post]
|
||||
func (o *CollaborativeAreaController) AddWorkspace() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
caller := tools.NewHTTPCaller(paths) // caller used to send to peers
|
||||
caller.Disabled = oclib.IsQueryParamsEquals(o.Ctx.Input, "is_remote", true)
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
id2 := o.Ctx.Input.Param(":id2")
|
||||
r := oclib.LoadOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), id)
|
||||
r := oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).LoadOne(id)
|
||||
if r.Code != 200 {
|
||||
o.Data["json"] = r
|
||||
o.ServeJSON()
|
||||
@@ -232,7 +260,8 @@ func (o *CollaborativeAreaController) AddWorkspace() {
|
||||
if shared != nil && !slices.Contains(shared.Workspaces, id2) {
|
||||
shared.Workspaces = append(shared.Workspaces, id2)
|
||||
}
|
||||
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), shared.Serialize(), id, caller)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, caller).UpdateOne(
|
||||
shared.Serialize(shared), id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -243,16 +272,23 @@ func (o *CollaborativeAreaController) AddWorkspace() {
|
||||
// @Success 200 {shared workspace} models.shared_workspace
|
||||
// @router /:id/workflow/:id2 [post]
|
||||
func (o *CollaborativeAreaController) AddWorkflow() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
caller := tools.NewHTTPCaller(paths) // caller used to send to peers
|
||||
caller.Disabled = oclib.IsQueryParamsEquals(o.Ctx.Input, "is_remote", true)
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
id2 := o.Ctx.Input.Param(":id2")
|
||||
r := oclib.LoadOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), id)
|
||||
r := oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).LoadOne(id)
|
||||
if r.Code != 200 {
|
||||
o.Data["json"] = r
|
||||
o.ServeJSON()
|
||||
return
|
||||
}
|
||||
shared := r.ToCollaborativeArea()
|
||||
if shared != nil && !slices.Contains(shared.Workflows, id2) {
|
||||
shared.Workflows = append(shared.Workflows, id2)
|
||||
}
|
||||
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), shared.Serialize(), id, caller)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, caller).UpdateOne(
|
||||
shared.Serialize(shared), id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -260,19 +296,29 @@ func (o *CollaborativeAreaController) AddWorkflow() {
|
||||
// @Description find shared workspace by id
|
||||
// @Param id path string true "the id you want to get"
|
||||
// @Param id2 path string true "the id you want to add"
|
||||
// @Param body body models.workspace true "The shared workspace content"
|
||||
// @Success 200 {shared workspace} models.shared_workspace
|
||||
// @router /:id/peer/:id2 [post]
|
||||
func (o *CollaborativeAreaController) AddPeer() {
|
||||
var res []string
|
||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
caller := tools.NewHTTPCaller(paths) // caller used to send to peers
|
||||
caller.Disabled = oclib.IsQueryParamsEquals(o.Ctx.Input, "is_remote", true)
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
id2 := o.Ctx.Input.Param(":id2")
|
||||
r := oclib.LoadOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), id)
|
||||
r := oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).LoadOne(id)
|
||||
shared := r.ToCollaborativeArea()
|
||||
if shared != nil && !slices.Contains(shared.Peers, id2) {
|
||||
shared.Peers = append(shared.Peers, id2)
|
||||
if shared.AllowedPeersGroup == nil {
|
||||
shared.AllowedPeersGroup = map[string][]string{}
|
||||
}
|
||||
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), shared.Serialize(), id, caller)
|
||||
if config.GetConfig().Whitelist && len(res) == 0 {
|
||||
shared.AllowedPeersGroup[id2] = []string{"*"}
|
||||
} else {
|
||||
shared.AllowedPeersGroup[id2] = res
|
||||
}
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, caller).UpdateOne(
|
||||
shared.Serialize(shared), id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -283,16 +329,17 @@ func (o *CollaborativeAreaController) AddPeer() {
|
||||
// @Success 200 {shared workspace} models.shared_workspace
|
||||
// @router /:id/rule/:id2 [post]
|
||||
func (o *CollaborativeAreaController) AddRule() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
caller := tools.NewHTTPCaller(paths) // caller used to send to peers
|
||||
caller.Disabled = oclib.IsQueryParamsEquals(o.Ctx.Input, "is_remote", true)
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
id2 := o.Ctx.Input.Param(":id2")
|
||||
r := oclib.LoadOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), id)
|
||||
r := oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).LoadOne(id)
|
||||
shared := r.ToCollaborativeArea()
|
||||
if shared != nil && !slices.Contains(shared.Rules, id2) {
|
||||
shared.Rules = append(shared.Rules, id2)
|
||||
}
|
||||
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), shared.Serialize(), id, caller)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, caller).UpdateOne(shared.Serialize(shared), id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -302,9 +349,10 @@ func (o *CollaborativeAreaController) AddRule() {
|
||||
// @Success 200 {shared workspace} delete success!
|
||||
// @router /:id [delete]
|
||||
func (o *CollaborativeAreaController) Delete() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
caller := tools.NewHTTPCaller(paths) // caller used to send to peers
|
||||
caller.Disabled = oclib.IsQueryParamsEquals(o.Ctx.Input, "is_remote", true)
|
||||
o.Data["json"] = oclib.DeleteOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), id, caller)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, caller).DeleteOne(id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -15,12 +15,15 @@ type RuleController struct {
|
||||
// @Title Search
|
||||
// @Description search rule
|
||||
// @Param search path string true "the word search you want to get"
|
||||
// @Param is_draft query string false "draft wished"
|
||||
// @Success 200 {rule} models.rule
|
||||
// @router /search/:search [get]
|
||||
func (o *RuleController) Search() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
// store and return Id or post with UUID
|
||||
search := o.Ctx.Input.Param(":search")
|
||||
o.Data["json"] = oclib.Search(nil, search, oclib.LibDataEnum(oclib.RULE))
|
||||
isDraft := o.Ctx.Input.Query("is_draft")
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.RULE), user, peerID, groups, nil).Search(nil, search, isDraft == "true")
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -31,11 +34,12 @@ func (o *RuleController) Search() {
|
||||
// @Success 200 {rule} models.rule
|
||||
// @router /:id [put]
|
||||
func (o *RuleController) Put() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
// store and return ID or post with UUID
|
||||
var res map[string]interface{}
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(oclib.RULE), res, id)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.RULE), user, peerID, groups, nil).UpdateOne(res, id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -45,18 +49,22 @@ func (o *RuleController) Put() {
|
||||
// @Success 200 {rule} models.rule
|
||||
// @router / [post]
|
||||
func (o *RuleController) Post() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
var res map[string]interface{}
|
||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
|
||||
o.Data["json"] = oclib.StoreOne(oclib.LibDataEnum(oclib.RULE), res)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.RULE), user, peerID, groups, nil).StoreOne(res)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title GetAll
|
||||
// @Description find rule by id
|
||||
// @Param is_draft query string false "draft wished"
|
||||
// @Success 200 {rule} models.rule
|
||||
// @router / [get]
|
||||
func (o *RuleController) GetAll() {
|
||||
o.Data["json"] = oclib.LoadAll(oclib.LibDataEnum(oclib.RULE))
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
isDraft := o.Ctx.Input.Query("is_draft")
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.RULE), user, peerID, groups, nil).LoadAll(isDraft == "true")
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -66,8 +74,9 @@ func (o *RuleController) GetAll() {
|
||||
// @Success 200 {rule} models.rule
|
||||
// @router /:id [get]
|
||||
func (o *RuleController) Get() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
o.Data["json"] = oclib.LoadOne(oclib.LibDataEnum(oclib.RULE), id)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.RULE), user, peerID, groups, nil).LoadOne(id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -77,7 +86,8 @@ func (o *RuleController) Get() {
|
||||
// @Success 200 {rule} delete success!
|
||||
// @router /:id [delete]
|
||||
func (o *RuleController) Delete() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
o.Data["json"] = oclib.DeleteOne(oclib.LibDataEnum(oclib.RULE), id)
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.RULE), user, peerID, groups, nil).DeleteOne(id)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -15,7 +15,10 @@ type VersionController struct {
|
||||
// @Success 200
|
||||
// @router / [get]
|
||||
func (c *VersionController) GetAll() {
|
||||
c.Data["json"] = map[string]string{"version": "1"}
|
||||
c.Data["json"] = map[string]string{
|
||||
"service": "oc-shared",
|
||||
"version": "1",
|
||||
}
|
||||
c.ServeJSON()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
mongo:
|
||||
image: 'mongo:latest'
|
||||
networks:
|
||||
- catalog
|
||||
ports:
|
||||
- 27017:27017
|
||||
container_name: mongo
|
||||
volumes:
|
||||
- oc-catalog-data:/data/db
|
||||
- oc-catalog-data:/data/configdb
|
||||
|
||||
mongo-express:
|
||||
image: "mongo-express:latest"
|
||||
restart: always
|
||||
depends_on:
|
||||
- mongo
|
||||
networks:
|
||||
- catalog
|
||||
ports:
|
||||
- 8081:8081
|
||||
environment:
|
||||
- ME_CONFIG_BASICAUTH_USERNAME=test
|
||||
- ME_CONFIG_BASICAUTH_PASSWORD=test
|
||||
|
||||
volumes:
|
||||
oc-catalog-data:
|
||||
|
||||
networks:
|
||||
catalog:
|
||||
external: true
|
||||
# name: catalog
|
||||
@@ -8,9 +8,18 @@ services:
|
||||
ports:
|
||||
- 8091:8080
|
||||
container_name: oc-shared
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.shared.entrypoints=web"
|
||||
- "traefik.http.routers.shared.rule=PathPrefix(`/shared`)"
|
||||
- "traefik.http.middlewares.shared-rewrite.replacepathregex.regex=^/shared(.*)"
|
||||
- "traefik.http.middlewares.shared-rewrite.replacepathregex.replacement=/oc$$1"
|
||||
- "traefik.http.routers.shared.middlewares=shared-rewrite"
|
||||
- "traefik.http.services.shared.loadbalancer.server.port=8080"
|
||||
- "traefik.http.middlewares.shared.forwardauth.address=http://oc-auth:8080/oc/forward"
|
||||
networks:
|
||||
- catalog
|
||||
- oc
|
||||
|
||||
networks:
|
||||
catalog:
|
||||
oc:
|
||||
external: true
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"MONGO_URL":"mongodb://mongo:27017/",
|
||||
"NATS_URL":"nats://nats:4222",
|
||||
"MONGO_DATABASE":"DC_myDC"
|
||||
}
|
||||
4
env.env
Normal file
4
env.env
Normal file
@@ -0,0 +1,4 @@
|
||||
KUBERNETES_SERVICE_HOST=192.168.1.169
|
||||
KUBE_CA="LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJkekNDQVIyZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQWpNU0V3SHdZRFZRUUREQmhyTTNNdGMyVnkKZG1WeUxXTmhRREUzTWpNeE1USXdNell3SGhjTk1qUXdPREE0TVRBeE16VTJXaGNOTXpRd09EQTJNVEF4TXpVMgpXakFqTVNFd0h3WURWUVFEREJock0zTXRjMlZ5ZG1WeUxXTmhRREUzTWpNeE1USXdNell3V1RBVEJnY3Foa2pPClBRSUJCZ2dxaGtqT1BRTUJCd05DQUFTVlk3ZHZhNEdYTVdkMy9jMlhLN3JLYjlnWXgyNSthaEE0NmkyNVBkSFAKRktQL2UxSVMyWVF0dzNYZW1TTUQxaStZdzJSaVppNUQrSVZUamNtNHdhcnFvMEl3UURBT0JnTlZIUThCQWY4RQpCQU1DQXFRd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTRFRmdRVWtlUVJpNFJiODduME5yRnZaWjZHClc2SU55NnN3Q2dZSUtvWkl6ajBFQXdJRFNBQXdSUUlnRXA5ck04WmdNclRZSHYxZjNzOW5DZXZZeWVVa3lZUk4KWjUzazdoaytJS1FDSVFDbk05TnVGKzlTakIzNDFacGZ5ays2NEpWdkpSM3BhcmVaejdMd2lhNm9kdz09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K"
|
||||
KUBE_CERT="LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJrVENDQVRlZ0F3SUJBZ0lJWUxWNkFPQkdrU1F3Q2dZSUtvWkl6ajBFQXdJd0l6RWhNQjhHQTFVRUF3d1kKYXpOekxXTnNhV1Z1ZEMxallVQXhOekl6TVRFeU1ETTJNQjRYRFRJME1EZ3dPREV3TVRNMU5sb1hEVEkxTURndwpPREV3TVRNMU5sb3dNREVYTUJVR0ExVUVDaE1PYzNsemRHVnRPbTFoYzNSbGNuTXhGVEFUQmdOVkJBTVRESE41CmMzUmxiVHBoWkcxcGJqQlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJGQ2Q1MFdPeWdlQ2syQzcKV2FrOWY4MVAvSkJieVRIajRWOXBsTEo0ck5HeHFtSjJOb2xROFYxdUx5RjBtOTQ2Nkc0RmRDQ2dqaXFVSk92Swp3NVRPNnd5alNEQkdNQTRHQTFVZER3RUIvd1FFQXdJRm9EQVRCZ05WSFNVRUREQUtCZ2dyQmdFRkJRY0RBakFmCkJnTlZIU01FR0RBV2dCVFJkOFI5cXVWK2pjeUVmL0ovT1hQSzMyS09XekFLQmdncWhrak9QUVFEQWdOSUFEQkYKQWlFQTArbThqTDBJVldvUTZ0dnB4cFo4NVlMalF1SmpwdXM0aDdnSXRxS3NmUVVDSUI2M2ZNdzFBMm5OVWU1TgpIUGZOcEQwSEtwcVN0Wnk4djIyVzliYlJUNklZCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0KLS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJlRENDQVIyZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQWpNU0V3SHdZRFZRUUREQmhyTTNNdFkyeHAKWlc1MExXTmhRREUzTWpNeE1USXdNell3SGhjTk1qUXdPREE0TVRBeE16VTJXaGNOTXpRd09EQTJNVEF4TXpVMgpXakFqTVNFd0h3WURWUVFEREJock0zTXRZMnhwWlc1MExXTmhRREUzTWpNeE1USXdNell3V1RBVEJnY3Foa2pPClBRSUJCZ2dxaGtqT1BRTUJCd05DQUFRc3hXWk9pbnIrcVp4TmFEQjVGMGsvTDF5cE01VHAxOFRaeU92ektJazQKRTFsZWVqUm9STW0zNmhPeVljbnN3d3JoNnhSUnBpMW5RdGhyMzg0S0Z6MlBvMEl3UURBT0JnTlZIUThCQWY4RQpCQU1DQXFRd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTRFRmdRVTBYZkVmYXJsZm8zTWhIL3lmemx6Cnl0OWlqbHN3Q2dZSUtvWkl6ajBFQXdJRFNRQXdSZ0loQUxJL2dNYnNMT3MvUUpJa3U2WHVpRVMwTEE2cEJHMXgKcnBlTnpGdlZOekZsQWlFQW1wdjBubjZqN3M0MVI0QzFNMEpSL0djNE53MHdldlFmZWdEVGF1R2p3cFk9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K"
|
||||
KUBE_DATA="LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSU5ZS1BFb1dhd1NKUzJlRW5oWmlYMk5VZlY1ZlhKV2krSVNnV09TNFE5VTlvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFVUozblJZN0tCNEtUWUx0WnFUMS96VS84a0Z2Sk1lUGhYMm1Vc25pczBiR3FZblkyaVZEeApYVzR2SVhTYjNqcm9iZ1YwSUtDT0twUWs2OHJEbE03ckRBPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo="
|
||||
23
go.mod
23
go.mod
@@ -5,15 +5,16 @@ go 1.22.0
|
||||
toolchain go1.22.4
|
||||
|
||||
require (
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241002120813-a09a04e1a71e
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250219142942-5111c9c8bec7
|
||||
github.com/beego/beego/v2 v2.3.1
|
||||
)
|
||||
|
||||
require (
|
||||
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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.5 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.6 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.22.1 // indirect
|
||||
@@ -21,7 +22,7 @@ require (
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/goraz/onion v0.1.3 // indirect
|
||||
github.com/hashicorp/golang-lru v1.0.2 // indirect
|
||||
github.com/klauspost/compress v1.17.10 // indirect
|
||||
github.com/klauspost/compress v1.17.11 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
@@ -33,11 +34,11 @@ require (
|
||||
github.com/nats-io/nkeys v0.4.7 // indirect
|
||||
github.com/nats-io/nuid v1.0.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/prometheus/client_golang v1.20.2 // indirect
|
||||
github.com/prometheus/client_golang v1.20.5 // indirect
|
||||
github.com/prometheus/client_model v0.6.1 // indirect
|
||||
github.com/prometheus/common v0.58.0 // indirect
|
||||
github.com/prometheus/common v0.60.1 // indirect
|
||||
github.com/prometheus/procfs v0.15.1 // indirect
|
||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||
github.com/robfig/cron v1.2.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.11.0 // indirect
|
||||
github.com/rs/zerolog v1.33.0 // indirect
|
||||
github.com/shiena/ansicolor v0.0.0-20230509054315-a9deabde6e02 // indirect
|
||||
@@ -47,11 +48,11 @@ require (
|
||||
github.com/xdg-go/stringprep v1.0.4 // indirect
|
||||
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
|
||||
go.mongodb.org/mongo-driver v1.17.1 // indirect
|
||||
golang.org/x/crypto v0.27.0 // indirect
|
||||
golang.org/x/net v0.29.0 // indirect
|
||||
golang.org/x/crypto v0.28.0 // indirect
|
||||
golang.org/x/net v0.30.0 // indirect
|
||||
golang.org/x/sync v0.8.0 // indirect
|
||||
golang.org/x/sys v0.25.0 // indirect
|
||||
golang.org/x/text v0.18.0 // indirect
|
||||
google.golang.org/protobuf v1.34.2 // indirect
|
||||
golang.org/x/sys v0.26.0 // indirect
|
||||
golang.org/x/text v0.19.0 // indirect
|
||||
google.golang.org/protobuf v1.35.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
94
go.sum
94
go.sum
@@ -1,20 +1,38 @@
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20240904135449-4f0ab6a3760f h1:v9mw3uNg/DJswOvHooMu8/BMedA+vIXbma+8iUwsjUI=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20240904135449-4f0ab6a3760f/go.mod h1:FIJD0taWLJ5pjQLJ6sfE2KlTkvbmk5SMcyrxdjsaVz0=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20240927112324-cdf513c2c454 h1:F5/oBMypnb6Mdvcf6N8y8v/DgfglPQ6VsQUY7hjC2zA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20240927112324-cdf513c2c454/go.mod h1:FIJD0taWLJ5pjQLJ6sfE2KlTkvbmk5SMcyrxdjsaVz0=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241002084552-3c1a84011ecc h1:1R4stJxXDMQ6joJZl9gQ2TUGW6S2jct2lhHUubPChs0=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241002084552-3c1a84011ecc/go.mod h1:FIJD0taWLJ5pjQLJ6sfE2KlTkvbmk5SMcyrxdjsaVz0=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241002102322-c309d9762350 h1:ybK3Qz1inr9xgrJwbHjSOTNaFIyX+AVINyzqcsvpATY=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241002102322-c309d9762350/go.mod h1:FIJD0taWLJ5pjQLJ6sfE2KlTkvbmk5SMcyrxdjsaVz0=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241002120813-a09a04e1a71e h1:77QHk5JSf0q13B/Ai3xjcsGSS7nX+9AfxcsYz5oDo/A=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241002120813-a09a04e1a71e/go.mod h1:t+zpCTVKVdHH/BImwtMYY2QIWLMXKgY4n/JhFm3Vpu8=
|
||||
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-20250205160221-88b7cfe2fd0f/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250213093249-c53e25e69a7b h1:HAb2h0011mE3QrHdOwJCua5w0r/BDOFLNb/557ZAzL0=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250213093249-c53e25e69a7b/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250217072519-cafadec1469f h1:esLB0EAn8IuOChW35kcBrPaN80z4A4yYyz1mXT45GQo=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250217072519-cafadec1469f/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218080121-a098f0a672ee h1:UIGIiE+O5LUrP18C8nrZxN1v6Lmzfdlv8pvHnSLKJz8=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218080121-a098f0a672ee/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218085355-6e6ed4ea2c64 h1:dANQHoMCyp3uioCHnUOpLFiG/UO+biyPUoSelDNJ814=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218085355-6e6ed4ea2c64/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218092508-b771b5d25ee5 h1:EwoctMKdVG1PJHRcBcRKCxgdAxy+TV1T617vxIZwkio=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218092508-b771b5d25ee5/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218101140-6bf058ab5ca4 h1:7om8VD4ZivHA2BKBwvqM98/a7D+MTwppd2FloNBg1Y4=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218101140-6bf058ab5ca4/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218113916-04f7537066c1 h1:on0zLtHo1Jj6FvQ/wuJCc/sxfBfgrd2qTFknpDh3wQM=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218113916-04f7537066c1/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218115549-81d3406305c5 h1:DP/XYrxSOc5ORMGvVNqTvFjxLF4cymUW/d3HIZXKDEk=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218115549-81d3406305c5/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218130229-7c30633bded0 h1:3EsRmeTz6OWHJETrPObctnGF8WgZtXHfwL2cjyHcfOk=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250218130229-7c30633bded0/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250219075511-241c6a5a0861 h1:XqTFKSZ8hXGCJbuu/SBwakpftevg1AKV7hDI50cXNUg=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250219075511-241c6a5a0861/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250219100312-b4a176667754 h1:7J5EUe/iNS6cT6KVDklpgGH7ak30iEFgWJDEPF6wik4=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250219100312-b4a176667754/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250219104152-3ecb0e9d960b h1:DhRqJdw2VePaYVlsh8OUA3zl+76Q0FWwGu+a+3aOf6s=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250219104152-3ecb0e9d960b/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250219142942-5111c9c8bec7 h1:fh6SzBPenzIxufIIzExtx4jEE4OhFposqn3EbHFr92Q=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20250219142942-5111c9c8bec7/go.mod h1:2roQbUpv3a6mTIr5oU1ux31WbN8YucyyQvCQ0FqwbcE=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/beego/beego/v2 v2.3.0 h1:iECVwzm6egw6iw6tkWrEDqXG4NQtKLQ6QBSYqlM6T/I=
|
||||
github.com/beego/beego/v2 v2.3.0/go.mod h1:Ob/5BJ9fIKZLd4s9ZV3o9J6odkkIyL83et+p98gyYXo=
|
||||
github.com/beego/beego/v2 v2.3.1 h1:7MUKMpJYzOXtCUsTEoXOxsDV/UcHw6CPbaWMlthVNsc=
|
||||
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/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/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
@@ -29,16 +47,14 @@ 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/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/gabriel-vasile/mimetype v1.4.5 h1:J7wGKdGu33ocBOhGy0z653k/lFKLFDPJMG8Gql0kxn4=
|
||||
github.com/gabriel-vasile/mimetype v1.4.5/go.mod h1:ibHel+/kbxn9x2407k1izTA1S81ku1z/DlgOW2QE0M4=
|
||||
github.com/gabriel-vasile/mimetype v1.4.6 h1:3+PzJTKLkvgjeTbts6msPJt4DixhT4YtFNf1gtGe3zc=
|
||||
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/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/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/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||
github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4Bx7ia+JlgcnOao=
|
||||
github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
||||
github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA=
|
||||
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=
|
||||
@@ -59,10 +75,8 @@ github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ
|
||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
|
||||
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
|
||||
github.com/klauspost/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/NMPtT0=
|
||||
github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
|
||||
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
|
||||
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
@@ -101,16 +115,16 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_golang v1.20.2 h1:5ctymQzZlyOON1666svgwn3s6IKWgfbjsejTMiXIyjg=
|
||||
github.com/prometheus/client_golang v1.20.2/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
|
||||
github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y=
|
||||
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/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
|
||||
github.com/prometheus/common v0.58.0 h1:N+N8vY4/23r6iYfD3UQZUoJPnUYAo7v6LG5XZxjZTXo=
|
||||
github.com/prometheus/common v0.58.0/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0=
|
||||
github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc=
|
||||
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/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
|
||||
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
|
||||
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
|
||||
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
|
||||
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
|
||||
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/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||
@@ -138,29 +152,21 @@ 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/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
go.mongodb.org/mongo-driver v1.16.1 h1:rIVLL3q0IHM39dvE+z2ulZLp9ENZKThVfuvN/IiN4l8=
|
||||
go.mongodb.org/mongo-driver v1.16.1/go.mod h1:oB6AhJQvFQL4LEHyXi6aJzQJtBiTQHiAd83l0GdFaiw=
|
||||
go.mongodb.org/mongo-driver v1.17.0 h1:Hp4q2MCjvY19ViwimTs00wHi7G4yzxh4/2+nTx8r40k=
|
||||
go.mongodb.org/mongo-driver v1.17.0/go.mod h1:wwWm/+BuOddhcq3n68LKRmgk2wXzmF6s0SFOa0GINL4=
|
||||
go.mongodb.org/mongo-driver v1.17.1 h1:Wic5cJIwJgSpBhe3lx3+/RybR5PiYRMpVFgO7cOHyIM=
|
||||
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-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.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
|
||||
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
|
||||
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
|
||||
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
|
||||
golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
|
||||
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/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-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-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
|
||||
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
|
||||
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
|
||||
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
|
||||
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
|
||||
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-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||
@@ -175,23 +181,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.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
|
||||
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
|
||||
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-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.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.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
|
||||
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
|
||||
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-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.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
|
||||
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
|
||||
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
|
||||
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 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
|
||||
19
main.go
19
main.go
@@ -5,12 +5,13 @@ import (
|
||||
|
||||
oclib "cloud.o-forge.io/core/oc-lib"
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
"github.com/beego/beego/v2/server/web/filter/cors"
|
||||
)
|
||||
|
||||
const appname = "oc-shared"
|
||||
|
||||
func main() {
|
||||
|
||||
// Init the oc-lib
|
||||
// Init the oc-lib
|
||||
oclib.Init(appname)
|
||||
|
||||
@@ -21,20 +22,22 @@ func main() {
|
||||
oclib.SetConfig(
|
||||
o.GetStringDefault("MONGO_URL", "mongodb://127.0.0.1:27017"),
|
||||
o.GetStringDefault("MONGO_DATABASE", "DC_myDC"),
|
||||
"",
|
||||
o.GetStringDefault("NATS_URL", "nats://localhost:4222"),
|
||||
o.GetStringDefault("LOKI_URL", ""),
|
||||
o.GetStringDefault("LOG_LEVEL", "info"),
|
||||
)
|
||||
|
||||
/* PATHS ARE REFERENCE FOR INNER SERVICE OF DISTANT OC
|
||||
* PATHS ARE USED TO CALL OTHER OC SERVICES
|
||||
* NAMES ARE CANONICAL NAMES OF THE SERVICES
|
||||
*/
|
||||
// Beego init
|
||||
beego.BConfig.AppName = appname
|
||||
beego.BConfig.Listen.HTTPPort = 8080
|
||||
beego.BConfig.Listen.HTTPPort = o.GetIntDefault("port", 8080)
|
||||
beego.BConfig.WebConfig.DirectoryIndex = true
|
||||
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
|
||||
beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
|
||||
AllowAllOrigins: true,
|
||||
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
|
||||
AllowHeaders: []string{"Origin", "Authorization", "Content-Type"},
|
||||
ExposeHeaders: []string{"Content-Length", "Content-Type"},
|
||||
AllowCredentials: true,
|
||||
}))
|
||||
|
||||
beego.Run()
|
||||
}
|
||||
|
||||
@@ -14,15 +14,15 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
ns := beego.NewNamespace("/oc",
|
||||
beego.NSNamespace("/shared/collaborative_area",
|
||||
ns := beego.NewNamespace("/oc/",
|
||||
beego.NSNamespace("/collaborative_area",
|
||||
beego.NSInclude(
|
||||
&controllers.CollaborativeAreaController{},
|
||||
),
|
||||
),
|
||||
beego.NSNamespace("/shared/collaborative_area/rule",
|
||||
beego.NSInclude(
|
||||
&controllers.RuleController{},
|
||||
beego.NSNamespace("/rule",
|
||||
beego.NSInclude(
|
||||
&controllers.RuleController{},
|
||||
),
|
||||
),
|
||||
),
|
||||
beego.NSNamespace("/version",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"port":8080,
|
||||
"port":8091,
|
||||
"MONGO_URL":"mongodb://localhost:27017/",
|
||||
"MONGO_DATABASE":"DC_myDC"
|
||||
}
|
||||
@@ -9,19 +9,27 @@
|
||||
"email": "admin@o-cloud.io"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://opensource.org/license/mit"
|
||||
"name": "AGPL",
|
||||
"url": "https://www.gnu.org/licenses/agpl-3.0.html"
|
||||
}
|
||||
},
|
||||
"basePath": "/oc",
|
||||
"basePath": "/oc/",
|
||||
"paths": {
|
||||
"/shared/collaborative_area/": {
|
||||
"/collaborative_area/": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "find shared workspace by id\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.GetAll",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{shared_workspace} models.shared_workspace"
|
||||
@@ -30,7 +38,7 @@
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "create shared workspace\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.Create",
|
||||
@@ -52,144 +60,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/shared/collaborative_area/rule/": {
|
||||
"/collaborative_area/search/{search}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"shared/collaborative_area/rule"
|
||||
],
|
||||
"description": "find rule by id\n\u003cbr\u003e",
|
||||
"operationId": "RuleController.GetAll",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{rule} models.rule"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"shared/collaborative_area/rule"
|
||||
],
|
||||
"description": "create rule\n\u003cbr\u003e",
|
||||
"operationId": "RuleController.Create",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "body",
|
||||
"name": "data",
|
||||
"description": "body for data content (Json format)",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/json"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{rule} models.rule"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/shared/collaborative_area/rule/search/{search}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"shared/collaborative_area/rule"
|
||||
],
|
||||
"description": "search rule\n\u003cbr\u003e",
|
||||
"operationId": "RuleController.Search",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "search",
|
||||
"description": "the word search you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{rule} models.rule"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/shared/collaborative_area/rule/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"shared/collaborative_area/rule"
|
||||
],
|
||||
"description": "find rule by id\n\u003cbr\u003e",
|
||||
"operationId": "RuleController.Get",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "the id you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{rule} models.rule"
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"tags": [
|
||||
"shared/collaborative_area/rule"
|
||||
],
|
||||
"description": "create rules\n\u003cbr\u003e",
|
||||
"operationId": "RuleController.Update",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "the rule id you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "body",
|
||||
"name": "body",
|
||||
"description": "The rule content",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.rule"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{rule} models.rule"
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"shared/collaborative_area/rule"
|
||||
],
|
||||
"description": "delete the rule\n\u003cbr\u003e",
|
||||
"operationId": "RuleController.Delete",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "The id you want to delete",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{rule} delete success!"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/shared/collaborative_area/search/{search}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "search shared workspace\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.Search",
|
||||
@@ -200,6 +74,12 @@
|
||||
"description": "the word search you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -209,10 +89,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/shared/collaborative_area/{id}": {
|
||||
"/collaborative_area/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "find shared workspace by id\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.Get",
|
||||
@@ -233,7 +113,7 @@
|
||||
},
|
||||
"put": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "create shared workspaces\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.Update",
|
||||
@@ -263,7 +143,7 @@
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "delete the shared workspace\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.Delete",
|
||||
@@ -283,10 +163,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/shared/collaborative_area/{id}/peer/{id2}": {
|
||||
"/collaborative_area/{id}/peer/{id2}": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "find shared workspace by id\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.Add Peer",
|
||||
@@ -304,6 +184,15 @@
|
||||
"description": "the id you want to add",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "body",
|
||||
"name": "body",
|
||||
"description": "The shared workspace content",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.workspace"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -314,7 +203,7 @@
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "find shared workspace by id\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.Remove Peer",
|
||||
@@ -341,10 +230,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/shared/collaborative_area/{id}/rule/{id2}": {
|
||||
"/collaborative_area/{id}/rule/{id2}": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "find shared workspace by id\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.Add Rule",
|
||||
@@ -372,7 +261,7 @@
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "find shared workspace by id\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.Remove Rule",
|
||||
@@ -399,10 +288,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/shared/collaborative_area/{id}/workflow/{id2}": {
|
||||
"/collaborative_area/{id}/workflow/{id2}": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "find shared workspace by id\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.Add Workflow",
|
||||
@@ -430,7 +319,7 @@
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "find shared workspace by id\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.Remove Workflow",
|
||||
@@ -457,10 +346,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/shared/collaborative_area/{id}/workspace/{id2}": {
|
||||
"/collaborative_area/{id}/workspace/{id2}": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "find shared workspace by id\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.Add Workspace",
|
||||
@@ -488,10 +377,10 @@
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"shared/collaborative_area"
|
||||
"collaborative_area"
|
||||
],
|
||||
"description": "find shared workspace by id\n\u003cbr\u003e",
|
||||
"operationId": "CollaborativeAreaController.Add Workspace",
|
||||
"operationId": "CollaborativeAreaController.Remove Workspace",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
@@ -560,13 +449,9 @@
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "shared/collaborative_area",
|
||||
"name": "collaborative_area",
|
||||
"description": "Operations about workspace\n"
|
||||
},
|
||||
{
|
||||
"name": "shared/collaborative_area/rule",
|
||||
"description": "Operations about rule\n"
|
||||
},
|
||||
{
|
||||
"name": "version",
|
||||
"description": "VersionController operations for Version\n"
|
||||
|
||||
@@ -8,24 +8,29 @@ info:
|
||||
contact:
|
||||
email: admin@o-cloud.io
|
||||
license:
|
||||
name: MIT
|
||||
url: https://opensource.org/license/mit
|
||||
basePath: /oc
|
||||
name: AGPL
|
||||
url: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
basePath: /oc/
|
||||
paths:
|
||||
/shared/collaborative_area/:
|
||||
/collaborative_area/:
|
||||
get:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
find shared workspace by id
|
||||
<br>
|
||||
operationId: CollaborativeAreaController.GetAll
|
||||
parameters:
|
||||
- in: query
|
||||
name: is_draft
|
||||
description: draft wished
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{shared_workspace} models.shared_workspace'
|
||||
post:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
create shared workspace
|
||||
<br>
|
||||
@@ -40,10 +45,10 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{shared workspace} models.shared_workspace'
|
||||
/shared/collaborative_area/{id}:
|
||||
/collaborative_area/{id}:
|
||||
get:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
find shared workspace by id
|
||||
<br>
|
||||
@@ -59,7 +64,7 @@ paths:
|
||||
description: '{shared workspace} models.shared_workspace'
|
||||
put:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
create shared workspaces
|
||||
<br>
|
||||
@@ -81,7 +86,7 @@ paths:
|
||||
description: '{shared workspace} models.shared_workspace'
|
||||
delete:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
delete the shared workspace
|
||||
<br>
|
||||
@@ -95,10 +100,10 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{shared workspace} delete success!'
|
||||
/shared/collaborative_area/{id}/peer/{id2}:
|
||||
/collaborative_area/{id}/peer/{id2}:
|
||||
post:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
find shared workspace by id
|
||||
<br>
|
||||
@@ -114,12 +119,18 @@ paths:
|
||||
description: the id you want to add
|
||||
required: true
|
||||
type: string
|
||||
- in: body
|
||||
name: body
|
||||
description: The shared workspace content
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.workspace'
|
||||
responses:
|
||||
"200":
|
||||
description: '{shared workspace} models.shared_workspace'
|
||||
delete:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
find shared workspace by id
|
||||
<br>
|
||||
@@ -138,10 +149,10 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{shared workspace} models.shared_workspace'
|
||||
/shared/collaborative_area/{id}/rule/{id2}:
|
||||
/collaborative_area/{id}/rule/{id2}:
|
||||
post:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
find shared workspace by id
|
||||
<br>
|
||||
@@ -162,7 +173,7 @@ paths:
|
||||
description: '{shared workspace} models.shared_workspace'
|
||||
delete:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
find shared workspace by id
|
||||
<br>
|
||||
@@ -181,10 +192,10 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{shared workspace} models.shared_workspace'
|
||||
/shared/collaborative_area/{id}/workflow/{id2}:
|
||||
/collaborative_area/{id}/workflow/{id2}:
|
||||
post:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
find shared workspace by id
|
||||
<br>
|
||||
@@ -205,7 +216,7 @@ paths:
|
||||
description: '{shared workspace} models.shared_workspace'
|
||||
delete:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
find shared workspace by id
|
||||
<br>
|
||||
@@ -224,10 +235,10 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{shared workspace} models.shared_workspace'
|
||||
/shared/collaborative_area/{id}/workspace/{id2}:
|
||||
/collaborative_area/{id}/workspace/{id2}:
|
||||
post:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
find shared workspace by id
|
||||
<br>
|
||||
@@ -248,11 +259,11 @@ paths:
|
||||
description: '{shared workspace} models.shared_workspace'
|
||||
delete:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
find shared workspace by id
|
||||
<br>
|
||||
operationId: CollaborativeAreaController.Add Workspace
|
||||
operationId: CollaborativeAreaController.Remove Workspace
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
@@ -267,110 +278,10 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{shared workspace} models.shared_workspace'
|
||||
/shared/collaborative_area/rule/:
|
||||
/collaborative_area/search/{search}:
|
||||
get:
|
||||
tags:
|
||||
- shared/collaborative_area/rule
|
||||
description: |-
|
||||
find rule by id
|
||||
<br>
|
||||
operationId: RuleController.GetAll
|
||||
responses:
|
||||
"200":
|
||||
description: '{rule} models.rule'
|
||||
post:
|
||||
tags:
|
||||
- shared/collaborative_area/rule
|
||||
description: |-
|
||||
create rule
|
||||
<br>
|
||||
operationId: RuleController.Create
|
||||
parameters:
|
||||
- in: body
|
||||
name: data
|
||||
description: body for data content (Json format)
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/json'
|
||||
responses:
|
||||
"200":
|
||||
description: '{rule} models.rule'
|
||||
/shared/collaborative_area/rule/{id}:
|
||||
get:
|
||||
tags:
|
||||
- shared/collaborative_area/rule
|
||||
description: |-
|
||||
find rule by id
|
||||
<br>
|
||||
operationId: RuleController.Get
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
description: the id you want to get
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{rule} models.rule'
|
||||
put:
|
||||
tags:
|
||||
- shared/collaborative_area/rule
|
||||
description: |-
|
||||
create rules
|
||||
<br>
|
||||
operationId: RuleController.Update
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
description: the rule id you want to get
|
||||
required: true
|
||||
type: string
|
||||
- in: body
|
||||
name: body
|
||||
description: The rule content
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.rule'
|
||||
responses:
|
||||
"200":
|
||||
description: '{rule} models.rule'
|
||||
delete:
|
||||
tags:
|
||||
- shared/collaborative_area/rule
|
||||
description: |-
|
||||
delete the rule
|
||||
<br>
|
||||
operationId: RuleController.Delete
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
description: The id you want to delete
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{rule} delete success!'
|
||||
/shared/collaborative_area/rule/search/{search}:
|
||||
get:
|
||||
tags:
|
||||
- shared/collaborative_area/rule
|
||||
description: |-
|
||||
search rule
|
||||
<br>
|
||||
operationId: RuleController.Search
|
||||
parameters:
|
||||
- in: path
|
||||
name: search
|
||||
description: the word search you want to get
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{rule} models.rule'
|
||||
/shared/collaborative_area/search/{search}:
|
||||
get:
|
||||
tags:
|
||||
- shared/collaborative_area
|
||||
- collaborative_area
|
||||
description: |-
|
||||
search shared workspace
|
||||
<br>
|
||||
@@ -381,6 +292,10 @@ paths:
|
||||
description: the word search you want to get
|
||||
required: true
|
||||
type: string
|
||||
- in: query
|
||||
name: is_draft
|
||||
description: draft wished
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{shared workspace} models.shared_workspace'
|
||||
@@ -417,12 +332,9 @@ definitions:
|
||||
title: workspace
|
||||
type: object
|
||||
tags:
|
||||
- name: shared/collaborative_area
|
||||
- name: collaborative_area
|
||||
description: |
|
||||
Operations about workspace
|
||||
- name: shared/collaborative_area/rule
|
||||
description: |
|
||||
Operations about rule
|
||||
- name: version
|
||||
description: |
|
||||
VersionController operations for Version
|
||||
|
||||
Reference in New Issue
Block a user