(org *configstore.Org)
| 717 | } |
| 718 | |
| 719 | func (s *gormAPIStore) RevokeServiceGrant(orgID, credentialID string) error { |
| 720 | return s.store.RevokeServiceGrant(orgID, credentialID) |
| 721 | } |
| 722 | |
| 723 | func (s *gormAPIStore) ReloadSnapshot() error { |
| 724 | return s.store.ReloadSnapshot() |
| 725 | } |
| 726 | |
| 727 | func (s *gormAPIStore) GetManagedWarehouse(orgID string) (*configstore.ManagedWarehouse, error) { |
| 728 | var warehouse configstore.ManagedWarehouse |
| 729 | if err := s.db().First(&warehouse, "org_id = ?", orgID).Error; err != nil { |
| 730 | return nil, err |
| 731 | } |
| 732 | return &warehouse, nil |
| 733 | } |
| 734 | |
| 735 | func (s *gormAPIStore) UpsertManagedWarehouse(orgID string, warehouse *configstore.ManagedWarehouse) (*configstore.ManagedWarehouse, bool, error) { |
| 736 | return s.mutateManagedWarehouse(orgID, func(current *configstore.ManagedWarehouse) error { *current = *warehouse; return nil }, true) |
| 737 | } |
| 738 | |
| 739 | func (s *gormAPIStore) MutateManagedWarehouse(orgID string, mutate func(*configstore.ManagedWarehouse) error) (*configstore.ManagedWarehouse, bool, error) { |
| 740 | return s.mutateManagedWarehouse(orgID, mutate, false) |
| 741 | } |
| 742 | |
| 743 | func (s *gormAPIStore) mutateManagedWarehouse(orgID string, mutate func(*configstore.ManagedWarehouse) error, replacement bool) (*configstore.ManagedWarehouse, bool, error) { |
| 744 | var ( |
no test coverage detected