mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
- Scaffold Go module (github.com/owncord/server) with all package dirs - config: koanf-based YAML loader with env var overrides, default generation - db: pure-Go SQLite (modernc, no CGO), WAL mode, FK enforcement, full 15-table schema from SCHEMA.md including FTS5 and idempotent migrations - auth/tls: ECDSA P-256 self-signed cert generation, LoadOrGenerate for all 4 TLS modes (self_signed, acme, manual, off) - api: chi router with request ID middleware, /health and /api/v1/info - main: graceful shutdown (30s timeout), structured slog JSON logging - Stubs for ws, storage, admin packages ready for Phase 2+ Test coverage: api 100%, auth 85.7%, db 82.4%, config 80.6% Binary: chatserver.exe 12MB, GOOS=windows GOARCH=amd64
17 lines
380 B
Go
17 lines
380 B
Go
// Package admin provides the embedded admin panel static file server.
|
|
// Full admin API implementation follows in Phase 6.
|
|
package admin
|
|
|
|
import (
|
|
"embed"
|
|
"net/http"
|
|
)
|
|
|
|
//go:embed static
|
|
var staticFiles embed.FS
|
|
|
|
// Handler returns an http.Handler that serves the embedded admin panel static files.
|
|
func Handler() http.Handler {
|
|
return http.FileServer(http.FS(staticFiles))
|
|
}
|