GetWorkspaceProfileSetting gets the workspace profile setting payload.
(ctx context.Context, workspaceID string)
| 74 | |
| 75 | // GetWorkspaceProfileSetting gets the workspace profile setting payload. |
| 76 | func (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 | |
| 92 | func (s *Store) GetAppIMSetting(ctx context.Context, workspaceID string) (*storepb.AppIMSetting, error) { |
| 93 | setting, err := s.GetSetting(ctx, workspaceID, storepb.SettingName_APP_IM) |
no test coverage detected