-
Notifications
You must be signed in to change notification settings - Fork 1
/
events.go
66 lines (62 loc) · 2.02 KB
/
events.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 dto
const (
BatchCreating = "batch.creating"
BatchItemError = "batch-item.error"
BatchItemsCreating = "batch.items-creating"
BatchItemPixQrcodecreated = "batch-item.pix.qrcodecreated"
BatchItemPixUpdated = "batch-item.pix.updated"
BatchItemPixPaid = "batch-item.pix.paid"
BatchItemPixLiquidated = "batch-item.pix.liquidated"
BatchItemTransferAccepted = "batch-item.transfer.accepted"
BatchItemTransferResolved = "batch-item.transfer.resolved"
BatchItemTransferRejected = "batch-item.transfer.rejected"
BatchItemInvoiceCreated = "batch-item.invoice.created"
BatchItemInvoiceInstrumentsCreated = "batch-item.invoice.instruments-created"
BatchItemInvoicePaid = "batch-item.invoice.paid"
BatchItemInvoiceRejected = "batch-item.invoice.rejected"
ZemoGatewayChargePaid = "zemo-gateway.charge.paid"
ZemoGatewayChargeRejected = "zemo-gateway.charge.rejected"
)
var AllEvents = []string{
BatchCreating,
BatchItemError,
BatchItemsCreating,
BatchItemPixQrcodecreated,
BatchItemPixUpdated,
BatchItemPixPaid,
BatchItemPixLiquidated,
BatchItemTransferAccepted,
BatchItemTransferResolved,
BatchItemTransferRejected,
BatchItemInvoiceCreated,
BatchItemInvoiceInstrumentsCreated,
BatchItemInvoicePaid,
BatchItemInvoiceRejected,
ZemoGatewayChargePaid,
ZemoGatewayChargeRejected,
}
//Events is struct for events
type Events string
func (e Events) String() string {
switch e {
case BatchCreating,
BatchItemError,
BatchItemsCreating,
BatchItemPixQrcodecreated,
BatchItemPixUpdated,
BatchItemPixPaid,
BatchItemPixLiquidated,
BatchItemTransferAccepted,
BatchItemTransferResolved,
BatchItemTransferRejected,
BatchItemInvoiceCreated,
BatchItemInvoiceInstrumentsCreated,
BatchItemInvoicePaid,
BatchItemInvoiceRejected,
ZemoGatewayChargePaid,
ZemoGatewayChargeRejected:
return string(e)
default:
return "unknown"
}
}