(ctx context.Context, workspaceID string)
| 214 | } |
| 215 | |
| 216 | func (s *Store) GetEnvironment(ctx context.Context, workspaceID string) (*storepb.EnvironmentSetting, error) { |
| 217 | setting, err := s.GetSetting(ctx, workspaceID, storepb.SettingName_ENVIRONMENT) |
| 218 | if err != nil { |
| 219 | return nil, err |
| 220 | } |
| 221 | if setting == nil { |
| 222 | return &storepb.EnvironmentSetting{}, nil |
| 223 | } |
| 224 | |
| 225 | val, ok := setting.Value.(*storepb.EnvironmentSetting) |
| 226 | if !ok { |
| 227 | return nil, errors.Errorf("invalid setting value type for %s", storepb.SettingName_ENVIRONMENT) |
| 228 | } |
| 229 | return val, nil |
| 230 | } |
| 231 | |
| 232 | // FindSettingMessage is the message for finding settings. |
| 233 | type FindSettingMessage struct { |
no test coverage detected