(ctx context.Context, orgID uuid.UUID, name string)
| 112 | } |
| 113 | |
| 114 | func (r *ProjectRepo) Create(ctx context.Context, orgID uuid.UUID, name string) (*biz.Project, error) { |
| 115 | ctx, span := otelx.Start(ctx, projectRepoTracer, "ProjectRepo.Create") |
| 116 | defer span.End() |
| 117 | |
| 118 | pro, err := r.data.DB.Project.Create().SetOrganizationID(orgID).SetName(name).Save(ctx) |
| 119 | if err != nil && !ent.IsNotFound(err) { |
| 120 | return nil, err |
| 121 | } |
| 122 | |
| 123 | return entProjectToBiz(pro), nil |
| 124 | } |
| 125 | |
| 126 | // ListMembers lists all members of a project (both users and groups) |
| 127 | func (r *ProjectRepo) ListMembers(ctx context.Context, orgID uuid.UUID, projectID uuid.UUID, paginationOpts *pagination.OffsetPaginationOpts) ([]*biz.ProjectMembership, int, error) { |
nothing calls this directly
no test coverage detected