Upstream sync

This commit is contained in:
Senad Uka
2023-09-18 12:27:40 +02:00
parent 9750aa2c37
commit 1f30f85787
30 changed files with 309 additions and 150 deletions

View File

@@ -1,11 +0,0 @@
package contact
import (
"fmt"
)
func ContactService(ch chan string) {
for msg := range ch {
fmt.Println("Contact Service: ", msg)
}
}

View File

@@ -0,0 +1,28 @@
package contract
import (
"fmt"
"github.com/jinzhu/gorm"
"gitlab.com/pactual1/backend/shared"
)
type service struct {
ch chan string
db *gorm.DB
encryptionClient shared.EncryptionClient
}
func NewService(ch chan string, db *gorm.DB, encryptionClient shared.EncryptionClient) service {
return service{
ch: ch,
db: db,
encryptionClient: encryptionClient,
}
}
func (s service) ContractService() {
for msg := range s.ch {
fmt.Println("Contract Service: ", msg)
}
}