TaskModelsToTaskDetails
Transforms task database models to task.TaskDetails objects.
def TaskModelsToTaskDetails(
ctx: context.Context,
taskModels: []*models.Task
) - > []*task.TaskDetails, error
Transforms task database models to task.TaskDetails objects. This function converts raw task data from the database into a more structured and detailed format suitable for API responses or further processing.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and tracing. |
| taskModels | []*models.Task | A slice of database task models to be transformed into TaskDetails objects. |
Returns
| Type | Description |
|---|---|
[]*task.TaskDetails, error | A slice of TaskDetails objects representing the transformed tasks, and an error if the task spec unmarshalling fails. |