putting in base query and collector framework

This commit is contained in:
Michael McGuinness
2024-12-18 18:52:38 +00:00
parent b0040f0cbe
commit 2209b877f5
1739 changed files with 288187 additions and 288200 deletions
+30
View File
@@ -0,0 +1,30 @@
package document
import (
"context"
"gotemplate/internal/database/repository"
)
type Service struct {
db *repository.Queries
}
type Document struct {
ID string `json:"id"`
JobID string `json:"jobId"`
Name string `json:"name"`
}
func New(ctx context.Context, db *repository.Queries) *Service {
return &Service{
db: db,
}
}
func (s *Service) Sync(ctx context.Context, doc Document) error {
// Check if collector exists for doc and is synced
// Check if job set up
// If not find all outputs and see if any are out of sync/missing
// create dependency tree - if sync triggered, sync all dependent outputs by using queue
return nil
}