(ctx context.Context, workspaceID string)
| 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) |
| 110 | if err != nil { |
| 111 | return nil, errors.Wrapf(err, "failed to get setting %v", storepb.SettingName_SYSTEM) |
| 112 | } |
| 113 | if setting == nil { |
| 114 | return nil, errors.Errorf("cannot find setting %v", storepb.SettingName_SYSTEM) |
| 115 | } |
| 116 | |
| 117 | val, ok := setting.Value.(*storepb.SystemSetting) |
| 118 | if !ok { |
| 119 | return nil, errors.Errorf("invalid setting value type for %s", storepb.SettingName_SYSTEM) |
| 120 | } |
| 121 | return val, nil |
| 122 | } |
| 123 | |
| 124 | // UpdateLicense updates the license in SYSTEM setting. |
| 125 | func (s *Store) UpdateLicense(ctx context.Context, workspaceID string, license string) error { |
no test coverage detected