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

Method List

app/controlplane/pkg/data/integration.go:70–89  ·  view source on GitHub ↗
(ctx context.Context, orgID uuid.UUID)

Source from the content-addressed store, hash-verified

68}
69
70func (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
91func (r *IntegrationRepo) FindByIDInOrg(ctx context.Context, orgID, id uuid.UUID) (*biz.Integration, error) {
92 ctx, span := otelx.Start(ctx, integrationRepoTracer, "IntegrationRepo.FindByIDInOrg")

Callers

nothing calls this directly

Implementers 6

CASBackendUseCaseapp/controlplane/pkg/biz/casbackend.go
CASBackendRepoapp/controlplane/pkg/biz/mocks/CASBack
CASBackendRepo_Expecterapp/controlplane/pkg/biz/mocks/CASBack
WorkflowContractRepoapp/controlplane/pkg/data/workflowcont
CASBackendRepoapp/controlplane/pkg/data/casbackend.g
IntegrationRepoapp/controlplane/pkg/data/integration.

Calls 9

StartFunction · 0.92
DeletedAtIsNilFunction · 0.92
DescFunction · 0.92
orgScopedQueryFunction · 0.85
entIntegrationToBizFunction · 0.85
AllMethod · 0.45
OrderMethod · 0.45
WhereMethod · 0.45
QueryIntegrationsMethod · 0.45

Tested by

no test coverage detected