Files
OwnCord/Server/db/errors.go
T
jevb 3236918012 refactor: server hardening + client decomposition + protocol resilience
Server:
- Split monolithic voice_handlers.go into voice_join/leave/controls/broadcast
- Add metrics endpoint (admin-IP-restricted /api/v1/metrics)
- Add orphaned attachment cleanup in maintenance loop
- Add sentinel errors (db/errors.go, ws/errors.go)
- Add ring buffer for event replay on reconnect
- Add heartbeat monitoring with stale connection sweep
- Improve hub with panic recovery, graceful shutdown, seq tracking
- Typed message structs replace raw map[string]interface{}

Client:
- Decompose MainPage into ChatArea + SidebarArea controllers
- Add disposable.ts lifecycle management pattern
- Add member list right-click context menu (kick/ban/role)
- Tighten CSP (media-src, font-src, object-src, base-uri)
- Improve store with shallowEqual, 500-msg cap, batch updates
- Add search API endpoint wiring
- Fix LiveKit session cleanup and reconnection

Docs:
- Add CODEMAPS for architecture, backend, frontend, data, deps
- Add protocol-schema.json (machine-readable, 36 message types)
- Add platform research report
- Update PROTOCOL.md with seq/replay fields
2026-03-21 10:08:44 +01:00

19 lines
527 B
Go

package db
import "errors"
// Sentinel errors for the db package. Use errors.Is() to check.
var (
// ErrNotFound indicates the requested resource does not exist.
ErrNotFound = errors.New("not found")
// ErrForbidden indicates the caller lacks permission for the operation.
ErrForbidden = errors.New("forbidden")
// ErrConflict indicates a uniqueness constraint violation (e.g., duplicate username).
ErrConflict = errors.New("conflict")
// ErrBanned indicates the user is banned.
ErrBanned = errors.New("banned")
)