github.com/TrueBlocks/trueblocks-core/src/apps/chifra@v0.0.0-20241022031540-b362680128f7/pkg/notify/notification.go (about)

     1  package notify
     2  
     3  import "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/types"
     4  
     5  type Message string
     6  
     7  type Notification[T NotificationPayload] struct {
     8  	Msg     Message         `json:"msg"`
     9  	Meta    *types.MetaData `json:"meta"`
    10  	Payload T               `json:"payload"`
    11  }
    12  
    13  type NotificationPayload interface {
    14  	[]NotificationPayloadAppearance |
    15  		[]NotificationPayloadChunkWritten |
    16  		NotificationPayloadChunkWritten |
    17  		string
    18  }