-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
task.go
66 lines (51 loc) · 1.85 KB
/
task.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package table
import (
"encoding/json"
"strconv"
)
type LSTaskExists struct {
TaskId int64 `index:"0" json:",omitempty"`
Unrecognized map[int]any `json:",omitempty"`
}
type LSRemoveTask struct {
TaskId int64 `index:"0" json:",omitempty"`
Unrecognized map[int]any `json:",omitempty"`
}
type LSUpdateTaskQueueName struct {
QueueNameTaskId string `index:"0" json:",omitempty"`
QueueName string `index:"1" json:",omitempty"`
Unrecognized map[int]any `json:",omitempty"`
}
type LSUpdateTaskValue struct {
QueueNameTaskId string `index:"0" json:",omitempty"`
/*
b.taskValue.split(a[1]).join(a[2]) // b = curr obj value
*/
TaskValue1 string `index:"1" json:",omitempty"`
TaskValue2 string `index:"2" json:",omitempty"`
Unrecognized map[int]any `json:",omitempty"`
}
type LSMailboxTaskCompletionApiOnTaskCompletion struct {
TaskId int64 `index:"0" json:",omitempty"`
Success bool `index:"1" json:",omitempty"`
Unrecognized map[int]any `json:",omitempty"`
}
type LSIssueNewTask struct {
QueueName string `index:"0" json:",omitempty"`
Context int64 `index:"1" json:",omitempty"`
TaskValue string `index:"2" json:",omitempty"`
HttpUrlOverride string `index:"3" json:",omitempty"`
TimeoutTimestampMs int64 `index:"4" json:",omitempty"`
PluginType int64 `index:"5" json:",omitempty"`
Priority int64 `index:"6" json:",omitempty"`
SyncGroupId int64 `index:"7" json:",omitempty"`
TransportKey int64 `index:"8" json:",omitempty"`
MinTimeToSyncTimestampMs int64 `index:"9" json:",omitempty"`
Unrecognized map[int]any `json:",omitempty"`
}
func (l *LSIssueNewTask) GetLabel() string {
return strconv.FormatInt(l.Context, 10)
}
func (l *LSIssueNewTask) Create() (any, any, bool) {
return json.RawMessage(l.TaskValue), l.QueueName, false
}