MCPcopy Create free account
hub / github.com/PostHog/duckgres / validateOrgMutationPayload

Function validateOrgMutationPayload

controlplane/admin/api.go:719–741  ·  view source on GitHub ↗
(org *configstore.Org)

Source from the content-addressed store, hash-verified

717}
718
719func (s *gormAPIStore) RevokeServiceGrant(orgID, credentialID string) error {
720 return s.store.RevokeServiceGrant(orgID, credentialID)
721}
722
723func (s *gormAPIStore) ReloadSnapshot() error {
724 return s.store.ReloadSnapshot()
725}
726
727func (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
735func (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
739func (s *gormAPIStore) MutateManagedWarehouse(orgID string, mutate func(*configstore.ManagedWarehouse) error) (*configstore.ManagedWarehouse, bool, error) {
740 return s.mutateManagedWarehouse(orgID, mutate, false)
741}
742
743func (s *gormAPIStore) mutateManagedWarehouse(orgID string, mutate func(*configstore.ManagedWarehouse) error, replacement bool) (*configstore.ManagedWarehouse, bool, error) {
744 var (

Callers 2

createOrgMethod · 0.85
updateOrgMethod · 0.85

Calls 2

validateHostnameAliasFunction · 0.85

Tested by

no test coverage detected