Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProgressTracker ¶
type ProgressTracker interface {
Increment(success bool, err error)
Complete() // Ensures any remaining updates are flushed
}
ProgressTracker defines the interface for tracking task progress
type Repository ¶
type Repository interface {
// Standard CRUD operations
Create(ctx context.Context, task *Task) error
Get(ctx context.Context, id string) (*Task, error)
List(ctx context.Context, filter *types.TaskFilter) ([]*Task, error)
Count(ctx context.Context, filter *types.TaskFilter) (int, error)
Update(ctx context.Context, task *Task) error
Delete(ctx context.Context, id string) error
}
Repository defines the interface for task operations
type Task ¶
type Task struct {
ID string `json:"id"`
TaskType types.TaskType `json:"task_type"`
EntityType types.EntityType `json:"entity_type"`
FileURL string `json:"file_url"`
FileName *string `json:"file_name,omitempty"`
FileType types.FileType `json:"file_type"`
TaskStatus types.TaskStatus `json:"task_status"`
TotalRecords *int `json:"total_records"`
ProcessedRecords int `json:"processed_records"`
SuccessfulRecords int `json:"successful_records"`
FailedRecords int `json:"failed_records"`
ErrorSummary *string `json:"error_summary"`
Metadata map[string]interface{} `json:"metadata"`
StartedAt *time.Time `json:"started_at"`
CompletedAt *time.Time `json:"completed_at"`
FailedAt *time.Time `json:"failed_at"`
EnvironmentID string `json:"environment_id"`
types.BaseModel
}
func FromEntList ¶
FromEntList converts a list of ent.Task to domain Tasks
Click to show internal directories.
Click to hide internal directories.