You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bit4sat/bus/messages.go

23 lines
505 B
Go

package bus
// Channel names
const (
WatchInvoicesChannelName = "watch_invoices"
WebsocketPubSubPrefix = "websocket_update"
UploadUpdateChannelPrefix = "upload_update"
InvoicePaidChannelPrefix = "invoice:paid"
)
// PubSub event types
const (
PaymentReceived = iota
SetUploadId
)
// Simple message used for update notifications in pub/sub
type Message struct {
UploadId string `json:"upload_id"`
Type int `json:"type"` // update type
Data interface{} `json:"data"`
}