-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add group api for UI module #344 #373
Conversation
err := service.UpsertGroup(context.Background(), tenantName, "", "", group) | ||
if err != nil { | ||
_ = c.Error(err) | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里有问题吧,当出错的时候,返回值是啥呢?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不会的,我昨天试了下,当error 的时候,返回值是空的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func CreateGroup(c *gin.Context) { | ||
service := admin.GetService(c) | ||
tenantName := c.Param("tenant") | ||
var group *boot.GroupBody |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be boot.GroupBody
.
service := admin.GetService(c) | ||
tenant := c.Param("tenant") | ||
group := c.Param("group") | ||
var groupBody *boot.GroupBody |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
pkg/admin/router/db_groups.go
Outdated
import ( | ||
"github.com/gin-gonic/gin" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 3rd imports should before arana imports, pls reformat
* add: missing interfaces in proto files and discovery files * feat: group api in file db_groups.go (arana-db#344) * style: add license header and add tool: imports-formatter * style: fix import
* feat: add group api for UI module #344 (#373) * add: missing interfaces in proto files and discovery files * feat: group api in file db_groups.go (#344) * style: add license header and add tool: imports-formatter * style: fix import * feat: support notify event * refactor:config center * none * feat: none * refactor:split config and add change watch * style: fix code style * fix: fix func call error * fix: ci error * style:fix code style * fix: fix code style * refactor: rebase upstream * fix:add cluster info to list groups Co-authored-by: chovychan <51713304+chovychan@users.noreply.github.com> Co-authored-by: Jeffsky <jjeffcaii@outlook.com>
* feat: add admin api server skeleton (#330) * feat(config): add config updater api (#336) * add http server api for cluster. (#352) * add http server api for tenant (#366) * add http server api for tenant * fix import format * fix go format Co-authored-by: Zhang Aphelios <aphelios.zhang@shopee.com> * add http api for nodes#344 (#371) * add http api for nodes * fix:bug * fix:bug * fix:bug * fix:bug * feat: add arana-admin into docker compose file * fix 🐛 HTTP API For UI (#399) * change * change * feat(config): support new config & Feat config listener (#374) * feat: add group api for UI module #344 (#373) * add: missing interfaces in proto files and discovery files * feat: group api in file db_groups.go (#344) * style: add license header and add tool: imports-formatter * style: fix import * feat: support notify event * refactor:config center * none * feat: none * refactor:split config and add change watch * style: fix code style * fix: fix func call error * fix: ci error * style:fix code style * fix: fix code style * refactor: rebase upstream * fix:add cluster info to list groups Co-authored-by: chovychan <51713304+chovychan@users.noreply.github.com> Co-authored-by: Jeffsky <jjeffcaii@outlook.com> * fix: compile failure * fix:unit test (#403) * Feat/admin api (#404) * Feat/admin api (#406) * fix:unit test * fix:unit test * fix:file unit test Co-authored-by: Zonglei Dong <dongzonglei@apache.org> Co-authored-by: Aphelios <996933971@qq.com> Co-authored-by: Zhang Aphelios <aphelios.zhang@shopee.com> Co-authored-by: 龚娜 <2036479155@qq.com> Co-authored-by: liaochuntao <liaochuntao@live.com> Co-authored-by: chovychan <51713304+chovychan@users.noreply.github.com>
What this PR does:
add missing interfaces && add group api
Which issue(s) this PR fixes:
ref #344