add features: object based control, and GC(periodic delete) zombie object

This commit is contained in:
Anya Tokugawa committed 2026-05-31 20:07:37 +09:00
1 parent 6ad039c536
commit 4da7d4e42d
18 files changed
+939 -75

No files matched your search

+18
View File
@@ -5,6 +5,7 @@ import "net/http"
type APIHandlers struct {
CreateObject http.HandlerFunc
ListObjects http.HandlerFunc
DeleteObject http.HandlerFunc
SaveRevision http.HandlerFunc
ListRevisions http.HandlerFunc
RestoreRevision http.HandlerFunc
@@ -14,6 +15,8 @@ type APIHandlers struct {
RenamePath http.HandlerFunc
RenamePreview http.HandlerFunc
RemovePath http.HandlerFunc
ZombieList http.HandlerFunc
ZombiePurge http.HandlerFunc
}
func RegisterAPIRoutes(
@@ -31,6 +34,11 @@ func RegisterAPIRoutes(
h.ListObjects,
)
mux.HandleFunc(
"/_/api/v1/object/delete",
h.DeleteObject,
)
mux.HandleFunc(
"/_/api/v1/revisions/save",
h.SaveRevision,
@@ -75,4 +83,14 @@ func RegisterAPIRoutes(
"/_/api/v1/path/remove",
h.RemovePath,
)
mux.HandleFunc(
"/_/api/v1/gc/zombies/list",
h.ZombieList,
)
mux.HandleFunc(
"/_/api/v1/gc/zombies/purge",
h.ZombiePurge,
)
}