Added notificaiton model

This commit is contained in:
Nedim
2023-10-09 18:23:44 +02:00
parent 00d15ebe7e
commit abe79e5556
8 changed files with 249 additions and 10 deletions

View File

@@ -11,7 +11,6 @@ import (
"gitlab.com/pactual1/backend/services/blockchain"
"gitlab.com/pactual1/backend/services/contract"
"gitlab.com/pactual1/backend/services/erp"
"gitlab.com/pactual1/backend/services/messaging"
"gitlab.com/pactual1/backend/shared"
"github.com/gin-gonic/gin"
@@ -63,12 +62,12 @@ func main() {
}()
// Initialize channels
messagingChannel := make(chan string)
// messagingChannel := make(chan string)
erpChannel := make(chan string)
contractChannel := make(chan string)
// Start services and pass the respective channels
go messaging.MessagingService(messagingChannel)
// go messaging.MessagingService(messagingChannel)
go erp.ERPService(erpChannel)
encryptionClient := shared.NewEncryptionClient(config.AppConfig.Service.BlockchainSecret)
@@ -77,7 +76,7 @@ func main() {
go contractService.ContractService()
// Sending messages via channels
messagingChannel <- "Send an email"
// messagingChannel <- "Send an email"
erpChannel <- "Update ERP record"
contractChannel <- "Update contract info"