30 lines
575 B
Go
30 lines
575 B
Go
package service
|
|
|
|
import (
|
|
"git.itzana.me/strafesnet/go-grpc/maps"
|
|
"git.itzana.me/strafesnet/go-grpc/users"
|
|
"git.itzana.me/strafesnet/maps-service/pkg/datastore"
|
|
"github.com/nats-io/nats.go"
|
|
)
|
|
|
|
type Service struct {
|
|
db datastore.Datastore
|
|
nats nats.JetStreamContext
|
|
maps maps.MapsServiceClient
|
|
users users.UsersServiceClient
|
|
}
|
|
|
|
func NewService(
|
|
db datastore.Datastore,
|
|
nats nats.JetStreamContext,
|
|
maps maps.MapsServiceClient,
|
|
users users.UsersServiceClient,
|
|
) Service {
|
|
return Service{
|
|
db: db,
|
|
nats: nats,
|
|
maps: maps,
|
|
users: users,
|
|
}
|
|
}
|