-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjob.go
More file actions
37 lines (32 loc) · 825 Bytes
/
job.go
File metadata and controls
37 lines (32 loc) · 825 Bytes
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
package godvm
type Job struct {
ID string
}
type JobStatus int
const (
StatusPaymentRequired JobStatus = 1
StatusPaymentCompleted JobStatus = 2
StatusProcessing JobStatus = 3
StatusPartial JobStatus = 4
StatusSuccess JobStatus = 5
StatusSuccessWithPayment JobStatus = 6
StatusError JobStatus = 7
)
var (
JobStatusToString = map[JobStatus]string{
StatusPaymentRequired: "payment-required",
StatusProcessing: "processing",
StatusSuccess: "success",
StatusSuccessWithPayment: "success",
StatusError: "error",
StatusPartial: "partial",
}
)
type JobUpdate struct {
Status JobStatus
AmountSats int
PaymentRequest string
Result string
ExtraTags [][]string
FailureMsg string
}