MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / List

Method List

app/controlplane/pkg/biz/workflow.go:387–402  ·  view source on GitHub ↗

List returns a list of workflows and the total count of workflows

(ctx context.Context, orgID string, filterOpts *WorkflowListOpts, paginationOpts *pagination.OffsetPaginationOpts)

Source from the content-addressed store, hash-verified

385
386// List returns a list of workflows and the total count of workflows
387func (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
404func (uc *WorkflowUseCase) IncRunsCounter(ctx context.Context, workflowID string) error {
405 ctx, span := otelx.Start(ctx, workflowTracer, "WorkflowUseCase.IncRunsCounter")

Callers

nothing calls this directly

Calls 5

StartFunction · 0.92
NewErrInvalidUUIDFunction · 0.85
ParseMethod · 0.80
ListMethod · 0.65

Tested by

no test coverage detected