Skip to content

Commit ba11109

Browse files
committed
add seed command
1 parent eccfe37 commit ba11109

File tree

8 files changed

+756
-8
lines changed

8 files changed

+756
-8
lines changed

apps/workspace-engine/pkg/server/openapi/deployments/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (s *Deployments) GetDeploymentResources(c *gin.Context, workspaceId string,
8888

8989
// Apply pagination
9090
start := min(offset, total)
91-
end := min(start + limit, total)
91+
end := min(start+limit, total)
9292
paginatedResources := resourceList[start:end]
9393

9494
c.JSON(http.StatusOK, gin.H{

apps/workspace-engine/pkg/server/openapi/environments/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func (s *Environments) GetEnvironmentResources(c *gin.Context, workspaceId strin
145145

146146
// Apply pagination
147147
start := min(offset, total)
148-
end := min(start + limit, total)
148+
end := min(start+limit, total)
149149
paginatedResources := resourceList[start:end]
150150

151151
c.JSON(http.StatusOK, gin.H{

apps/workspace-engine/pkg/server/openapi/relations/relations.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (s *Relations) GetRelationshipRules(c *gin.Context, workspaceId string, par
6969
for _, relationshipRule := range relationshipRules {
7070
relationshipRulesList = append(relationshipRulesList, relationshipRule)
7171
}
72-
72+
7373
limit := 50
7474
if params.Limit != nil {
7575
limit = *params.Limit
@@ -93,4 +93,4 @@ func (s *Relations) GetRelationshipRules(c *gin.Context, workspaceId string, par
9393
"limit": limit,
9494
"items": paginatedRelationshipRules,
9595
})
96-
}
96+
}

apps/workspace-engine/pkg/workspace/storage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ func init() {
3333
log.Info("Using file storage")
3434
storage := NewFileStorage("./state")
3535
Storage = storage
36-
}
36+
}

apps/workspace-engine/pkg/workspace/store/release_targets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func (r *ReleaseTargets) GetLatestJob(ctx context.Context, releaseTarget *oapi.R
205205
if len(jobs) == 0 {
206206
return nil, fmt.Errorf("no jobs found for release target")
207207
}
208-
208+
209209
jobsList := make([]*oapi.Job, 0, len(jobs))
210210
for _, job := range jobs {
211211
jobsList = append(jobsList, job)
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
[
2+
{
3+
"eventType": "system.created",
4+
"timestamp": 1729800000000,
5+
"data": {
6+
"id": "system-001",
7+
"workspaceId": "will-be-replaced",
8+
"name": "ecommerce-platform",
9+
"description": "E-commerce platform system"
10+
}
11+
},
12+
{
13+
"eventType": "deployment.created",
14+
"timestamp": 1729800001000,
15+
"data": {
16+
"id": "deploy-api",
17+
"name": "api-service",
18+
"slug": "api-service",
19+
"description": "Main API service",
20+
"systemId": "system-001",
21+
"jobAgentConfig": {
22+
"namespace": "production",
23+
"replicas": 3
24+
}
25+
}
26+
},
27+
{
28+
"eventType": "deployment.created",
29+
"timestamp": 1729800002000,
30+
"data": {
31+
"id": "deploy-worker",
32+
"name": "background-worker",
33+
"slug": "background-worker",
34+
"description": "Background job processor",
35+
"systemId": "system-001",
36+
"jobAgentConfig": {
37+
"namespace": "production",
38+
"replicas": 5
39+
}
40+
}
41+
},
42+
{
43+
"eventType": "deployment.created",
44+
"timestamp": 1729800003000,
45+
"data": {
46+
"id": "deploy-frontend",
47+
"name": "web-frontend",
48+
"slug": "web-frontend",
49+
"description": "Web frontend application",
50+
"systemId": "system-001",
51+
"jobAgentConfig": {
52+
"namespace": "production",
53+
"cdn_enabled": true
54+
}
55+
}
56+
},
57+
{
58+
"eventType": "environment.created",
59+
"timestamp": 1729800004000,
60+
"data": {
61+
"id": "env-production",
62+
"name": "production",
63+
"description": "Production environment",
64+
"systemId": "system-001",
65+
"createdAt": "2025-10-24T12:00:00Z"
66+
}
67+
},
68+
{
69+
"eventType": "environment.created",
70+
"timestamp": 1729800005000,
71+
"data": {
72+
"id": "env-staging",
73+
"name": "staging",
74+
"description": "Staging environment",
75+
"systemId": "system-001",
76+
"createdAt": "2025-10-24T12:00:01Z"
77+
}
78+
},
79+
{
80+
"eventType": "environment.created",
81+
"timestamp": 1729800006000,
82+
"data": {
83+
"id": "env-development",
84+
"name": "development",
85+
"description": "Development environment",
86+
"systemId": "system-001",
87+
"createdAt": "2025-10-24T12:00:02Z"
88+
}
89+
}
90+
]

0 commit comments

Comments
 (0)