Skip to main content

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

NameTypeDescription
p*project.ProjectThe project protobuf object to be transformed into a database model. This object contains the project's identifier, name, description, labels, and state.

Returns

TypeDescription
*models.Project, errorA pointer to the models.Project database model and an error if the transformation fails, particularly during the marshaling of project labels.