List returns a list of workflows and the total count of workflows
(ctx context.Context, orgID string, filterOpts *WorkflowListOpts, paginationOpts *pagination.OffsetPaginationOpts)
| 385 | |
| 386 | // List returns a list of workflows and the total count of workflows |
| 387 | func (uc *WorkflowUseCase) List(ctx context.Context, orgID string, filterOpts *WorkflowListOpts, paginationOpts *pagination.OffsetPaginationOpts) ([]*Workflow, int, error) { |
| 388 | ctx, span := otelx.Start(ctx, workflowTracer, "WorkflowUseCase.List") |
| 389 | defer span.End() |
| 390 | |
| 391 | orgUUID, err := uuid.Parse(orgID) |
| 392 | if err != nil { |
| 393 | return nil, 0, NewErrInvalidUUID(err) |
| 394 | } |
| 395 | // Apply default pagination if not provided |
| 396 | pgOpts := pagination.NewDefaultOffsetPaginationOpts() |
| 397 | if paginationOpts != nil { |
| 398 | pgOpts = paginationOpts |
| 399 | } |
| 400 | |
| 401 | return uc.wfRepo.List(ctx, orgUUID, filterOpts, pgOpts) |
| 402 | } |
| 403 | |
| 404 | func (uc *WorkflowUseCase) IncRunsCounter(ctx context.Context, workflowID string) error { |
| 405 | ctx, span := otelx.Start(ctx, workflowTracer, "WorkflowUseCase.IncRunsCounter") |
nothing calls this directly
no test coverage detected