feat(storage): add private file layer and isolate SeaweedFS on a storage network

This commit is contained in:
shira committed 2026-10-06 13:51:53 +03:00
1 parent f5b07e8f4d
commit 8378ad45b0
22 files changed
+1668 -40

No files matched your search

@@ -0,0 +1,28 @@
package files
// Namespace is the key prefix of one kind of stored file. Every namespace is
// declared here, so two features cannot share one by accident and then read
// or delete each other's files. Add a namespace with the first feature that
// stores such files; the planned owners are noted for reference.
type Namespace string
const (
// NamespaceResume holds uploaded resume files (TASK-070).
NamespaceResume Namespace = "resume"
// NamespaceProfilePDF holds generated standard profile PDFs (FR02).
NamespaceProfilePDF Namespace = "profile-pdf"
// NamespaceAccountExport holds personal data exports (TASK-093, TASK-458).
NamespaceAccountExport Namespace = "account-export"
)
// registeredNamespaces lists every declared namespace for NewPolicy.
var registeredNamespaces = []Namespace{NamespaceResume, NamespaceProfilePDF, NamespaceAccountExport}
func registered(namespace Namespace) bool {
for _, known := range registeredNamespaces {
if namespace == known {
return true
}
}
return false
}