(ctx context.Context, orgID uuid.UUID)
| 68 | } |
| 69 | |
| 70 | func (r *IntegrationRepo) List(ctx context.Context, orgID uuid.UUID) ([]*biz.Integration, error) { |
| 71 | ctx, span := otelx.Start(ctx, integrationRepoTracer, "IntegrationRepo.List") |
| 72 | defer span.End() |
| 73 | |
| 74 | integrations, err := orgScopedQuery(r.data.DB, orgID). |
| 75 | QueryIntegrations(). |
| 76 | Where(integration.DeletedAtIsNil()). |
| 77 | Order(ent.Desc(integration.FieldCreatedAt)). |
| 78 | All(ctx) |
| 79 | if err != nil { |
| 80 | return nil, err |
| 81 | } |
| 82 | |
| 83 | result := make([]*biz.Integration, 0, len(integrations)) |
| 84 | for _, i := range integrations { |
| 85 | result = append(result, entIntegrationToBiz(i)) |
| 86 | } |
| 87 | |
| 88 | return result, nil |
| 89 | } |
| 90 | |
| 91 | func (r *IntegrationRepo) FindByIDInOrg(ctx context.Context, orgID, id uuid.UUID) (*biz.Integration, error) { |
| 92 | ctx, span := otelx.Start(ctx, integrationRepoTracer, "IntegrationRepo.FindByIDInOrg") |
nothing calls this directly
no test coverage detected