refactor: extract models/routes and env-based server config
- Move API request/response structs into new lib/models package - Centralize Gin route registration in lib/routing to simplify wiring - Add lib/server config helper to allow WARPBOX_BOX_POLL_INTERVAL_MS override - Improves modularity and makes polling behavior configurable per environmentrefactor: extract models/routes and env-based server config - Move API request/response structs into new lib/models package - Centralize Gin route registration in lib/routing to simplify wiring - Add lib/server config helper to allow WARPBOX_BOX_POLL_INTERVAL_MS override - Improves modularity and makes polling behavior configurable per environment
This commit is contained in:
12
lib/server/constants.go
Normal file
12
lib/server/constants.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package server
|
||||
|
||||
const (
|
||||
uploadRoot = "data/uploads"
|
||||
boxManifestFile = ".warpbox.json"
|
||||
boxPollInterval = 5000
|
||||
|
||||
fileStatusFailed = "failed"
|
||||
fileStatusReady = "complete"
|
||||
fileStatusWait = "pending"
|
||||
fileStatusWork = "uploading"
|
||||
)
|
||||
Reference in New Issue
Block a user