Add admin config page and runtime-tunable upload/rate-limit settings

This commit is contained in:
root
2026-03-24 13:56:56 +01:00
parent d9de02f08d
commit ba06fb0c7c
14 changed files with 588 additions and 20 deletions

View File

@@ -9,12 +9,21 @@ import (
)
type Handler struct {
fileService *file.Service
fileService *file.Service
configService ConfigService
}
func NewHandler(fileService *file.Service) *Handler {
// ConfigService is the small interface needed by the web layer.
type ConfigService interface {
GetIntDefault(key string, def int) int
GetInt64Default(key string, def int64) int64
SetString(key, value string) error
}
func NewHandler(fileService *file.Service, cfg ConfigService) *Handler {
return &Handler{
fileService: fileService,
fileService: fileService,
configService: cfg,
}
}