Skip to main content

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

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for cancellation and tracing.
taskModels[]*models.TaskA slice of database task models to be transformed into TaskDetails objects.

Returns

TypeDescription
[]*task.TaskDetails, errorA slice of TaskDetails objects representing the transformed tasks, and an error if the task spec unmarshalling fails.