feat: add PCDN management APIs, router, RBAC and menu permissions#6
Open
hequan2017 wants to merge 1 commit intomainfrom
Open
feat: add PCDN management APIs, router, RBAC and menu permissions#6hequan2017 wants to merge 1 commit intomainfrom
hequan2017 wants to merge 1 commit intomainfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
server/model/pcdn/*与server/model/pcdn/request/pcdn.go,包含PcdnNode、PcdnPolicy、PcdnDispatchTask等表结构和查询字段。server/service/pcdn/*提供节点 CRUD、上下线切换、权重调整、策略 CRUD、灰度发布与启停、以及调度任务检索等函数。server/api/v1/pcdn/*提供对应的控制器,server/router/pcdn/*将pcdn路由组挂载到私有路由并对写操作复用middleware.OperationRecord()做操作审计。server/api/v1/enter.go、server/service/enter.go、server/router/enter.go、server/initialize/gorm_biz.go和server/initialize/router_biz.go以注册 API/Service/Router 并在AutoMigrate中加入 PCDN 表,且在初始化数据中通过server/source/system/menu.go、server/source/system/api.go、server/source/system/casbin.go添加菜单项、接口权限点与默认 Casbin 策略。Testing
cd server && go test ./model/pcdn/...,测试通过(无测试文件但命令完成)。go test(例如./api/v1/pcdn、./service/pcdn、./router/pcdn等)在本环境中未在限定超时时间内完成,命令超时未能返回全部结果;因此只对模型包进行了完整确认。Codex Task