4ec1d51a12
Job CRUD + Collector Integration * startedcreate * openapispec * createjobintegration * jobgetcontroller * jobcreateclient * updatejob * job * collector
33 lines
496 B
Go
33 lines
496 B
Go
package job
|
|
|
|
import (
|
|
"queryorchestration/internal/client"
|
|
"queryorchestration/internal/database"
|
|
"queryorchestration/internal/job/collector"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type Job struct {
|
|
ID uuid.UUID
|
|
ClientID uuid.UUID
|
|
CanSync bool
|
|
}
|
|
|
|
type Services struct {
|
|
Collector *collector.Service
|
|
Client *client.Service
|
|
}
|
|
|
|
type Service struct {
|
|
db *database.Connection
|
|
svc *Services
|
|
}
|
|
|
|
func New(db *database.Connection, svc *Services) *Service {
|
|
return &Service{
|
|
db,
|
|
svc,
|
|
}
|
|
}
|