getEventFromStatus maps a transaction status to a corresponding event string. Parameters: - status string: The status of the transaction. Returns: - string: The corresponding event string for the transaction status.
(status string)
| 46 | // Returns: |
| 47 | // - string: The corresponding event string for the transaction status. |
| 48 | func getEventFromStatus(status string) string { |
| 49 | switch strings.ToLower(status) { |
| 50 | case strings.ToLower(StatusQueued): |
| 51 | return "transaction.queued" |
| 52 | case strings.ToLower(StatusApplied): |
| 53 | return "transaction.applied" |
| 54 | case strings.ToLower(StatusScheduled): |
| 55 | return "transaction.scheduled" |
| 56 | case strings.ToLower(StatusInflight): |
| 57 | return "transaction.inflight" |
| 58 | case strings.ToLower(StatusVoid): |
| 59 | return "transaction.void" |
| 60 | case strings.ToLower(StatusRejected): |
| 61 | return "transaction.rejected" |
| 62 | default: |
| 63 | return "transaction.unknown" |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | // processHTTP sends a webhook notification via HTTP POST request. |
| 68 | // |
no outgoing calls
no test coverage detected