(ctx context.Context, workspaceID string, id string)
| 10 | ) |
| 11 | |
| 12 | func (s *Store) GetEnvironmentByID(ctx context.Context, workspaceID string, id string) (*storepb.EnvironmentSetting_Environment, error) { |
| 13 | environments, err := s.GetEnvironment(ctx, workspaceID) |
| 14 | if err != nil { |
| 15 | return nil, err |
| 16 | } |
| 17 | for _, environment := range environments.GetEnvironments() { |
| 18 | if environment.Id == id { |
| 19 | return environment, nil |
| 20 | } |
| 21 | } |
| 22 | return nil, nil |
| 23 | } |
| 24 | |
| 25 | func (s *Store) CheckDatabaseUseEnvironment(ctx context.Context, id string) (bool, error) { |
| 26 | var exists bool |
no test coverage detected