Files
warpbox/lib/models/models.go
Daniel Legt cf90e08f98 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
2026-04-27 17:49:19 +03:00

34 lines
812 B
Go

package models
type BoxFile struct {
ID string `json:"id"`
Name string `json:"name"`
Size int64 `json:"size"`
SizeLabel string `json:"size_label"`
MimeType string `json:"mime_type"`
Status string `json:"status"`
StatusLabel string `json:"status_label"`
Title string `json:"title"`
IconPath string `json:"icon_path"`
DownloadPath string `json:"download_path"`
UploadPath string `json:"upload_path"`
IsComplete bool `json:"is_complete"`
}
type BoxManifest struct {
Files []BoxFile `json:"files"`
}
type CreateBoxRequest struct {
Files []CreateBoxFileRequest `json:"files"`
}
type CreateBoxFileRequest struct {
Name string `json:"name"`
Size int64 `json:"size"`
}
type UpdateFileStatusRequest struct {
Status string `json:"status"`
}