Skip to content

Commit 8b217f9

Browse files
committed

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

polycode/client.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ import (
1111
)
1212

1313
const (
14-
TaskPending TaskStatus = iota
15-
TaskRunning
16-
TaskSuccess
17-
TaskFailed
18-
TaskCancelled
14+
Insert DbAction = "insert"
15+
Update DbAction = "update"
16+
Upsert DbAction = "upsert"
17+
Delete DbAction = "delete"
1918
)
2019

2120
type TaskStatus int8
2221

22+
type DbAction string
23+
2324
type StartAppRequest struct {
2425
AppName string `json:"appName"`
2526
AppPort uint `json:"appPort"`
@@ -89,7 +90,7 @@ type ExecFuncResponse struct {
8990

9091
// PutRequest represents the JSON structure for put operations
9192
type PutRequest struct {
92-
Action string `json:"action"`
93+
Action DbAction `json:"action"`
9394
Collection string `json:"collection"`
9495
Key string `json:"key"`
9596
Item map[string]interface{} `json:"item"`

0 commit comments

Comments
 (0)