(ctx context.Context, workspaceID string)
| 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) |
| 94 | if err != nil { |
| 95 | return nil, errors.Wrapf(err, "failed to get setting %v", storepb.SettingName_APP_IM) |
| 96 | } |
| 97 | if setting == nil { |
| 98 | return nil, errors.Errorf("cannot find setting %v", storepb.SettingName_APP_IM) |
| 99 | } |
| 100 | |
| 101 | val, ok := setting.Value.(*storepb.AppIMSetting) |
| 102 | if !ok { |
| 103 | return nil, errors.Errorf("invalid setting value type for %s", storepb.SettingName_APP_IM) |
| 104 | } |
| 105 | return val, nil |
| 106 | } |
| 107 | |
| 108 | func (s *Store) GetSystemSetting(ctx context.Context, workspaceID string) (*storepb.SystemSetting, error) { |
| 109 | setting, err := s.GetSetting(ctx, workspaceID, storepb.SettingName_SYSTEM) |
no test coverage detected