(ctx context.Context, orgID, workflowID string, includeRevoked bool)
| 105 | } |
| 106 | |
| 107 | func (uc *RobotAccountUseCase) List(ctx context.Context, orgID, workflowID string, includeRevoked bool) ([]*RobotAccount, error) { |
| 108 | ctx, span := otelx.Start(ctx, robotAccountTracer, "RobotAccountUseCase.List") |
| 109 | defer span.End() |
| 110 | |
| 111 | workflowUUID, err := uuid.Parse(workflowID) |
| 112 | if err != nil { |
| 113 | return nil, NewErrInvalidUUID(err) |
| 114 | } |
| 115 | |
| 116 | orgUUID, err := uuid.Parse(orgID) |
| 117 | if err != nil { |
| 118 | return nil, NewErrInvalidUUID(err) |
| 119 | } |
| 120 | // Check that the workflow is from the provided user |
| 121 | if wf, err := uc.workflowRepo.GetOrgScoped(ctx, orgUUID, workflowUUID); err != nil { |
| 122 | return nil, err |
| 123 | } else if wf == nil { |
| 124 | return nil, NewErrNotFound("workflow") |
| 125 | } |
| 126 | |
| 127 | return uc.robotAccountRepo.List(ctx, workflowUUID, includeRevoked) |
| 128 | } |
| 129 | |
| 130 | func (uc *RobotAccountUseCase) FindByID(ctx context.Context, id string) (*RobotAccount, error) { |
| 131 | ctx, span := otelx.Start(ctx, robotAccountTracer, "RobotAccountUseCase.FindByID") |
nothing calls this directly
no test coverage detected