NewProjectModel
NewProjectModel transforms a project proto into a project DB model.
def NewProjectModel(
p: *project.Project
) - > *models.Project, error
Transforms a project proto into a project database model. This function is used to convert a project's protobuf representation into a format suitable for storage in a database.
Parameters
| Name | Type | Description |
|---|---|---|
| p | *project.Project | The project protobuf object to be transformed into a database model. This object contains the project's identifier, name, description, labels, and state. |
Returns
| Type | Description |
|---|---|
*models.Project, error | A pointer to the models.Project database model and an error if the transformation fails, particularly during the marshaling of project labels. |