FindWorkspace finds a single workspace matching the filter. Returns (nil, nil) if no workspace matches.
(ctx context.Context, find *FindWorkspaceMessage)
| 264 | // FindWorkspace finds a single workspace matching the filter. |
| 265 | // Returns (nil, nil) if no workspace matches. |
| 266 | func (s *Store) FindWorkspace(ctx context.Context, find *FindWorkspaceMessage) (*WorkspaceMessage, error) { |
| 267 | workspaces, err := s.ListWorkspacesByEmail(ctx, find) |
| 268 | if err != nil { |
| 269 | return nil, err |
| 270 | } |
| 271 | if len(workspaces) == 0 { |
| 272 | return nil, nil |
| 273 | } |
| 274 | return workspaces[0], nil |
| 275 | } |
| 276 | |
| 277 | // ListWorkspacesByEmail finds all workspaces where the given email is a member |
| 278 | // in the workspace IAM policy bindings, either directly or via a group. |
nothing calls this directly
no test coverage detected