ProjectModelToProject
Transforms a project DB model into a project proto with injected domains.
def ProjectModelToProject(
model: *models.Project,
domains: []*project.Domain
) - > *project.Project, error
Transforms a project database model into a project protobuf message, injecting specified domain information. This function is used to convert internal database representations of projects into a format suitable for API responses or inter-service communication.
Parameters
| Name | Type | Description |
|---|---|---|
| model | *models.Project | The database model of the project to be transformed. This model contains the raw project data from the database. |
| domains | []*project.Domain | A slice of project.Domain protobuf messages to be injected into the resulting project. These domains typically represent associated organizational units or logical groupings. |
Returns
| Type | Description |
|---|---|
*project.Project, error | A pointer to the project.Project protobuf message representing the transformed project, and an error if the unmarshaling of project labels fails. |