refactor(bookmark): 重构 bookmark 服务生成配置和内部引用

将 bookmark 和 user_np 服务的生成配置分离为 server 和 client 包,
并更新了相应的导入路径。同时更新了 OpenAPI 配置文件中的包名、输出路径及
启用 strict-server 模式以增强类型安全。

此外,同步更新了 VFS 服务的客户端和服务端生成配置,并完善了其 OpenAPI
错误响应定义与二进制内容支持,增强了 API 的规范性和健壮性。

修复了部分权限校验逻辑,并调整了中间件注册方式以适配新的严格模式接口。
This commit is contained in:
zzy
2025-09-25 16:15:34 +08:00
parent 24f238f377
commit b2cc27b8f5
18 changed files with 878 additions and 488 deletions

View File

@ -6,7 +6,6 @@ import (
"log"
"net/http"
api "git.zzyxyz.com/zzy/zzyxyz_go_api/gen/vfs"
"git.zzyxyz.com/zzy/zzyxyz_go_api/internal/handlers"
"git.zzyxyz.com/zzy/zzyxyz_go_api/internal/vfs"
"git.zzyxyz.com/zzy/zzyxyz_go_api/internal/vfs/vfsdriver"
@ -44,7 +43,7 @@ func main() {
if server, err := vfs.NewVfsHandler(config); err != nil {
log.Fatal("Failed to create bookmarks server:", err)
} else {
api.RegisterHandlers(api_router, server)
vfs.RegisterVFSRoutes(api_router, server)
// 示例:在你的服务初始化代码中
bookmarkService, err := vfsdriver.NewVfsBookMarkService("http://localhost:8081/api") // 替换为实际的 bookmark 服务地址
if err != nil {