Add workspace creation feature

This commit is contained in:
starryskymeow
2025-07-04 18:03:00 +08:00
parent 3ed03208fb
commit fa18edc20f
8 changed files with 610 additions and 0 deletions

15
internal/api/types.go Normal file
View File

@@ -0,0 +1,15 @@
package api
// CreateWorkspaceRequest defines the request body for creating a new workspace.
type CreateWorkspaceRequest struct {
Image string `json:"image"`
Env map[string]string `json:"env"`
ResourceLimits *ResourceLimits `json:"resourceLimits"`
WorkspaceID string `json:"workspaceId"`
}
// ResourceLimits defines the CPU and memory resource limits.
type ResourceLimits struct {
CPU string `json:"cpu"`
Memory string `json:"memory"`
}