Files
cyi-box/backend/cmd/gen/main.go
T
chiyiandDevin 834ecacdb9 cyi-box: Memphis-style toolbox admin platform
Go(fun)+SQLite backend, Vue 3 frontend. Modules: dashboard, pay gateway
(Epay-compatible + CDK stock), license/card system (per-app appid, domain
binding), AI memory bank with built-in MCP server (/mcp, FTS5 search,
signed read links), server SSH monitor + terminal + SFTP, proxy pool with
protocol-level alive checks, DB manager (mysql/pg/sqlite + SQL
autocomplete + import/export), disk share, vault (AES-GCM + TOTP),
bookmarks, dev tools.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-01 01:58:47 +08:00

35 lines
1.1 KiB
Go

// Command gen 生成前端 TS 客户端:BindServiceForGen 只反射方法签名,
// 不装配数据库等基础设施,离线可用。用法:cd backend && go run ./cmd/gen
package main
import (
"log"
"github.com/cyi-cc/fun"
"github.com/cyi-cc/cyi-box/backend/internal/service"
)
func main() {
f := fun.GetFun()
f.BindServiceForGen(&service.AuthSvc{})
f.BindServiceForGen(&service.UserSvc{})
f.BindServiceForGen(&service.DashboardSvc{})
f.BindServiceForGen(&service.ToolSvc{})
f.BindServiceForGen(&service.VaultSvc{})
f.BindServiceForGen(&service.BookmarkSvc{})
f.BindServiceForGen(&service.ServerSvc{})
f.BindServiceForGen(&service.DbMgrSvc{})
f.BindServiceForGen(&service.WebSvc{})
f.BindServiceForGen(&service.DiskSvc{})
f.BindServiceForGen(&service.ProxySvc{})
f.BindServiceForGen(&service.SettingSvc{})
f.BindServiceForGen(&service.PaySvc{})
f.BindServiceForGen(&service.LicenseSvc{})
f.BindServiceForGen(&service.MemorySvc{})
fun.SetOutput("../frontend/src/api")
fun.GenCode(fun.GenTs{})
log.Println("gen: TS client written to frontend/src/api/ts")
}