workspace latest

This commit is contained in:
mr 2024-08-08 08:38:40 +02:00
parent 60c25b1352
commit cdc9e130aa
8 changed files with 79 additions and 2 deletions

View File

@ -1,4 +1,4 @@
FROM golang:alpine as builder
FROM golang:alpine AS builder
WORKDIR /app

View File

@ -12,6 +12,18 @@ type WorkspaceController struct {
beego.Controller
}
// @Title Search
// @Description search workspace
// @Param search path string true "the word search you want to get"
// @Success 200 {workspace} models.workspace
// @router /search/:search [get]
func (o *WorkspaceController) Search() {
// store and return Id or post with UUID
search := o.Ctx.Input.Param(":search")
o.Data["json"] = oclib.Search(nil, search, oclib.LibDataEnum(oclib.WORKSPACE))
o.ServeJSON()
}
// @Title Update
// @Description create workspaces
// @Param id path string true "the workspace id you want to get"

2
go.mod
View File

@ -11,7 +11,7 @@ require (
)
require (
cloud.o-forge.io/core/oc-lib v0.0.0-20240726075154-d5c5b454f4d0 // indirect
cloud.o-forge.io/core/oc-lib v0.0.0-20240801071310-924a688a9d3f // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/beego/bee/v2 v2.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect

16
go.sum
View File

@ -90,6 +90,22 @@ cloud.o-forge.io/core/oc-lib v0.0.0-20240726065859-5ad4d523abfe h1:ZDIYobKqkCf+x
cloud.o-forge.io/core/oc-lib v0.0.0-20240726065859-5ad4d523abfe/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240726075154-d5c5b454f4d0 h1:u27xxSJtc2dYarTRUZKIk82OfNvxFmhYFhR6kco67Jo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240726075154-d5c5b454f4d0/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240730124133-b06193add2fe h1:dAA8GotTauJxVzs0tq1Ltu6JvorgnQ3rsH0yVmtmJkY=
cloud.o-forge.io/core/oc-lib v0.0.0-20240730124133-b06193add2fe/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240730143044-18d54cdb8ffe h1:2MaMNPIexFOHcc3VanjYfGwJjjewxILttbdxA4bvWQQ=
cloud.o-forge.io/core/oc-lib v0.0.0-20240730143044-18d54cdb8ffe/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240731063616-19381d6438d1 h1:sUFbr0F1uwHMqLf/D3rF0ITOVaj820gMqbKhqSR5EFI=
cloud.o-forge.io/core/oc-lib v0.0.0-20240731063616-19381d6438d1/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240731065720-511e0c3f311d h1:zRgOtzPGwoRCNqQWmDcS6D5clJz88sdsyOLBhVDm6Nw=
cloud.o-forge.io/core/oc-lib v0.0.0-20240731065720-511e0c3f311d/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240731080755-7ae1399a9a41 h1:jSSEXUHn2Bp4D7G9Rj/wGs/w4zMxWYzGxgy/H0J8nK0=
cloud.o-forge.io/core/oc-lib v0.0.0-20240731080755-7ae1399a9a41/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240731083657-274ce57f5b50 h1:onXWe5IPmlP2oPJDNPj7/qoNoy1uN43WY1AScBwA9Ec=
cloud.o-forge.io/core/oc-lib v0.0.0-20240731083657-274ce57f5b50/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240731123052-78bef28a2171 h1:SiTy74sfSeO97umBOnUZNrBl613LM0oqBw8eOOsYv7I=
cloud.o-forge.io/core/oc-lib v0.0.0-20240731123052-78bef28a2171/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240801071310-924a688a9d3f h1:w4KMhEFwcJrVhinhuo4G/A/pJZOpHQSA8BB/1LV8aN4=
cloud.o-forge.io/core/oc-lib v0.0.0-20240801071310-924a688a9d3f/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=

Binary file not shown.

View File

@ -61,4 +61,13 @@ func init() {
Filters: nil,
Params: nil})
beego.GlobalControllerRouter["oc-workspace/controllers:WorkspaceController"] = append(beego.GlobalControllerRouter["oc-workspace/controllers:WorkspaceController"],
beego.ControllerComments{
Method: "Search",
Router: `/search/:search`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})
}

View File

@ -66,6 +66,29 @@
}
}
},
"/workspace/search/{search}": {
"get": {
"tags": [
"workspace"
],
"description": "search workspace\n\u003cbr\u003e",
"operationId": "WorkspaceController.Search",
"parameters": [
{
"in": "path",
"name": "search",
"description": "the word search you want to get",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{workspace} models.workspace"
}
}
}
},
"/workspace/{id}": {
"get": {
"tags": [

View File

@ -106,6 +106,23 @@ paths:
responses:
"200":
description: '{workspace} delete success!'
/workspace/search/{search}:
get:
tags:
- workspace
description: |-
search workspace
<br>
operationId: WorkspaceController.Search
parameters:
- in: path
name: search
description: the word search you want to get
required: true
type: string
responses:
"200":
description: '{workspace} models.workspace'
definitions:
json:
title: json