refactor: 重构项目架构,拆分代码到模块化目录

将单文件tts_server.go重构为模块化项目结构,拆分出common、dto、middleware、router、controller、service、adapter、setting等目录,优化代码组织提升可维护性
This commit is contained in:
sun
2026-05-23 20:32:12 +08:00
parent 1b84a6c9ee
commit 4e1820d45b
21 changed files with 1536 additions and 895 deletions
+19
View File
@@ -0,0 +1,19 @@
package common
import "time"
const (
DefaultPort = "8080"
DefaultTimeout = 30 * time.Second
MaxTextLength = 5000
MinSpeed = 0.25
MaxSpeed = 4.0
DefaultSpeed = 1.0
MaxRequestBodySize = 1024 * 1024
RateLimitRequests = 100
RateLimitWindow = time.Minute
MaxResponseTimes = 100
MaxErrors = 10
MaxConcurrentRequests = 10
CleanupInterval = time.Hour
)