Upstream sync
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
package contact
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func ContactService(ch chan string) {
|
||||
for msg := range ch {
|
||||
fmt.Println("Contact Service: ", msg)
|
||||
}
|
||||
}
|
||||
28
services/contract/contract_service.go
Normal file
28
services/contract/contract_service.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user