MCPcopy Index your code
hub / github.com/bytebase/bytebase / GetEnvironment

Method GetEnvironment

backend/store/setting.go:216–230  ·  view source on GitHub ↗
(ctx context.Context, workspaceID string)

Source from the content-addressed store, hash-verified

214}
215
216func (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.
233type FindSettingMessage struct {

Callers 10

GetEnvironmentByIDMethod · 0.95
getEnvironmentMethod · 0.45
createEnvironmentMethod · 0.45
getUsedFeaturesMethod · 0.45
GetRolloutMethod · 0.45
ListRolloutsMethod · 0.45
CreateRolloutMethod · 0.45
UpdateSettingMethod · 0.45
convertToPlansFunction · 0.45

Calls 2

GetSettingMethod · 0.95
ErrorfMethod · 0.80

Tested by

no test coverage detected