v0.11.0 Release Notes
Released
Generated: 2026-01-23 08:00 (+00:00) v0.10.0 → v0.11.0
Recommended Commit Message
feat: add user management system with email allowlist and refactor codebase into modular architecture
翻譯
feat: 新增使用者管理系統含 email 許可清單,並重構程式碼為模組化架構Summary
Add user management system with model, database operations (list/upsert), and REST API endpoint. Introduce ALLOW_EMAILS environment variable for pre-seeding authorized users at startup. Refactor codebase by extracting database methods, command parsing, and route handlers into separate files for improved maintainability.
翻譯
新增使用者管理系統,包含模型、資料庫操作(列表/更新插入)與 REST API 端點。引入 `ALLOW_EMAILS` 環境變數於啟動時預先載入授權使用者。重構程式碼:將資料庫方法、命令解析與路由處理器抽離至獨立檔案,提升可維護性。Changes
FEAT
- Add
Usermodel withID,Email,CreatedAt,Dismissfields - Add
userstable schema with email unique constraint - Add
ListUsers()database method to query active users - Add
UpsertUser()database method for user creation/update - Add
/api/user/upsertPOST endpoint for user management - Add
ALLOW_EMAILSenv variable to pre-seed users on startup via comma-separated list - Add
user_idforeign key reference inrecordstable schema
翻譯
- 新增
User模型含ID、Email、CreatedAt、Dismiss欄位 - 新增
users資料表結構含 email 唯一約束 - 新增
ListUsers()資料庫方法查詢有效使用者 - 新增
UpsertUser()資料庫方法用於建立/更新使用者 - 新增
/api/user/upsertPOST 端點用於使用者管理 - 新增
ALLOW_EMAILS環境變數於啟動時透過逗號分隔清單預先載入使用者 - 新增
records資料表的user_id外鍵參照
UPDATE
- Change default database path from working directory to
~/.podrun/database.db - Restructure API routes from
/pod/*to/api/pod/*prefix - Add
/api/healthGET endpoint for service health check - Add
ALLOW_EMAILSto.env.examplewithREMOTE_SERVERsection comment
翻譯
- 變更預設資料庫路徑從工作目錄改為
~/.podrun/database.db - 重新組織 API 路由從
/pod/*改為/api/pod/*前綴 - 新增
/api/healthGET 端點用於服務健康檢查 - 新增
ALLOW_EMAILS至.env.example含REMOTE_SERVER區段註解
REFACTOR
- Extract
PodmanArgstruct andparseArgs()function tointernal/command/parseArgs.go - Extract
UpsertPod()method tointernal/database/upsertPod.go - Extract
UpdatePod()method tointernal/database/updatePod.go - Extract
InsertRecord()method tointernal/database/insertRecord.go - Extract
ListPods()method tointernal/database/listPods.go - Extract
ListPodRecords()method tointernal/database/listPodRecords.go - Extract
PodInfo()method tointernal/database/podInfo.go - Extract
UpsertUser()method tointernal/database/upsertUser.go - Extract
ListUsers()method tointernal/database/listUsers.go - Create
internal/handler/package with dedicated GET and POST handler functions - Move inline route handlers from
routes.goto handler package
翻譯
- 抽離
PodmanArg結構與parseArgs()函式至internal/command/parseArgs.go - 抽離
UpsertPod()方法至internal/database/upsertPod.go - 抽離
UpdatePod()方法至internal/database/updatePod.go - 抽離
InsertRecord()方法至internal/database/insertRecord.go - 抽離
ListPods()方法至internal/database/listPods.go - 抽離
ListPodRecords()方法至internal/database/listPodRecords.go - 抽離
PodInfo()方法至internal/database/podInfo.go - 抽離
UpsertUser()方法至internal/database/upsertUser.go - 抽離
ListUsers()方法至internal/database/listUsers.go - 建立
internal/handler/套件含專屬 GET 與 POST 處理函式 - 將內嵌路由處理器從
routes.go移至處理套件
CHORE
- Add
godotenvdependency for loading.envfiles at startup
翻譯
- 新增
godotenv相依套件於啟動時載入.env檔案
Files Changed
| File | Status | Tag |
|---|---|---|
.env.expample |
Modified | UPDATE |
cmd/api/main.go |
Modified | FEAT, UPDATE, CHORE |
internal/command/command.go |
Modified | REFACTOR |
internal/command/parseArgs.go |
Added | REFACTOR |
internal/database/sqlite.go |
Modified | REFACTOR |
internal/database/upsertPod.go |
Added | REFACTOR |
internal/database/updatePod.go |
Added | REFACTOR |
internal/database/insertRecord.go |
Added | REFACTOR |
internal/database/listPods.go |
Added | REFACTOR |
internal/database/listPodRecords.go |
Added | REFACTOR |
internal/database/podInfo.go |
Added | REFACTOR |
internal/database/upsertUser.go |
Added | FEAT |
internal/database/listUsers.go |
Added | FEAT |
internal/model/user.go |
Added | FEAT |
internal/handler/get.go |
Added | REFACTOR |
internal/handler/post.go |
Added | REFACTOR, FEAT |
internal/routes/routes.go |
Modified | REFACTOR, UPDATE |
sql/create.sql |
Modified | FEAT |
Generated by Claude Code