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

Method GetWorkspaceProfileSetting

backend/store/setting.go:76–90  ·  view source on GitHub ↗

GetWorkspaceProfileSetting gets the workspace profile setting payload.

(ctx context.Context, workspaceID string)

Source from the content-addressed store, hash-verified

74
75// GetWorkspaceProfileSetting gets the workspace profile setting payload.
76func (s *Store) GetWorkspaceProfileSetting(ctx context.Context, workspaceID string) (*storepb.WorkspaceProfileSetting, error) {
77 setting, err := s.GetSetting(ctx, workspaceID, storepb.SettingName_WORKSPACE_PROFILE)
78 if err != nil {
79 return nil, errors.Wrapf(err, "failed to get setting %v", storepb.SettingName_WORKSPACE_PROFILE)
80 }
81 if setting == nil {
82 return nil, errors.Errorf("cannot find setting %v", storepb.SettingName_WORKSPACE_PROFILE)
83 }
84
85 val, ok := setting.Value.(*storepb.WorkspaceProfileSetting)
86 if !ok {
87 return nil, errors.Errorf("invalid setting value type for %s", storepb.SettingName_WORKSPACE_PROFILE)
88 }
89 return val, nil
90}
91
92func (s *Store) GetAppIMSetting(ctx context.Context, workspaceID string) (*storepb.AppIMSetting, error) {
93 setting, err := s.GetSetting(ctx, workspaceID, storepb.SettingName_APP_IM)

Callers 15

GetSQLResultSizeMethod · 0.95
GetEffectiveExternalURLFunction · 0.80
GetAccessTokenDurationFunction · 0.80
GetRefreshTokenDurationFunction · 0.80
getServerInfoMethod · 0.80
getUsedFeaturesMethod · 0.80
validateIAMPolicyFunction · 0.80
UpdateSettingMethod · 0.80
UpdateUserMethod · 0.80
validateEmailWithDomainsFunction · 0.80
CreateAccessGrantMethod · 0.80

Calls 2

GetSettingMethod · 0.95
ErrorfMethod · 0.80

Tested by

no test coverage detected