(ctx context.Context, name string)
| 1031 | } |
| 1032 | |
| 1033 | func (s *ProjectService) getProjectMessage(ctx context.Context, name string) (*store.ProjectMessage, error) { |
| 1034 | projectID, err := common.GetProjectID(name) |
| 1035 | if err != nil { |
| 1036 | return nil, connect.NewError(connect.CodeInvalidArgument, err) |
| 1037 | } |
| 1038 | |
| 1039 | find := &store.FindProjectMessage{ |
| 1040 | Workspace: common.GetWorkspaceIDFromContext(ctx), |
| 1041 | ResourceID: &projectID, |
| 1042 | ShowDeleted: true, |
| 1043 | } |
| 1044 | project, err := s.store.GetProject(ctx, find) |
| 1045 | if err != nil { |
| 1046 | return nil, connect.NewError(connect.CodeInternal, err) |
| 1047 | } |
| 1048 | if project == nil { |
| 1049 | return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("project %q not found", name)) |
| 1050 | } |
| 1051 | |
| 1052 | return project, nil |
| 1053 | } |
| 1054 | |
| 1055 | func getBindingIdentifier(role string, condition *expr.Expr) string { |
| 1056 | ids := []string{ |
no test coverage detected