// DeleteSecret removes a secret from the store.
// Returns ErrNotExist if the secret doesn't exist.
354550
func DeleteSecret(tx Tx, id string) error {
	return tx.delete(tableSecret, id)
}
1084876
func (mr *MockSecretAPIClientMockRecorder) SecretRemove(ctx, id interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretRemove", reflect.TypeOf((*MockSecretAPIClient)(nil).SecretRemove), ctx, id)
}
506686
func (e *EtcdStore) Delete(key string, recurse bool) error {
	c, q := context.WithTimeout(context.Background(), e.Timeout)
	defer q()

	o := &client.DeleteOptions{Recursive: recurse}
	return del(e, c, o, key)
}
928772
func (i *winIdentity) Delete() error {
	// duplicate cert context, since CertDeleteCertificateFromStore will free it.
	deleteCtx := C.CertDuplicateCertificateContext(i.chain[0])

	// try deleting cert
	if ok := C.CertDeleteCertificateFromStore(deleteCtx); ok == winFalse {
		return lastError("failed to delete certificate from store")
	}

	// try deleting private key
	wpk, err := i.getPrivateKey()
	if err != nil {
		return errors.Wrap(err, "failed to get identity private key")
	}

	if err := wpk.Delete(); err != nil {
		return errors.Wrap(err, "failed to delete identity private key")
	}

	return nil
}
779499
func (mr *MockSecretAPIClientMockRecorder) SecretCreate(ctx, secret interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretCreate", reflect.TypeOf((*MockSecretAPIClient)(nil).SecretCreate), ctx, secret)
}
612158
func (e *DockercfgDeletedController) secretDeleted(obj interface{}) {
	dockercfgSecret, ok := obj.(*v1.Secret)
	if !ok {
		return
	}
	if _, exists := dockercfgSecret.Annotations[ServiceAccountTokenSecretNameKey]; !exists {
		return
	}

	for i := 1; i <= NumServiceAccountUpdateRetries; i++ {
		if err := e.removeDockercfgSecretReference(dockercfgSecret); err != nil {
			if kapierrors.IsConflict(err) && i < NumServiceAccountUpdateRetries {
				time.Sleep(wait.Jitter(100*time.Millisecond, 0.0))
				continue
			}

			klog.Error(err)
			break
		}

		break
	}

	// remove the reference token secret
	if err := e.client.CoreV1().Secrets(dockercfgSecret.Namespace).Delete(dockercfgSecret.Annotations[ServiceAccountTokenSecretNameKey], nil); (err != nil) && !kapierrors.IsNotFound(err) {
		utilruntime.HandleError(err)
	}
}
176062
func (s *SecretService) Delete(itemPath dbus.ObjectPath) error {
	var prompt dbus.ObjectPath
	err := s.Object(serviceName, itemPath).Call(itemInterface+".Delete", 0).Store(&prompt)
	if err != nil {
		return err
	}

	_, _, err = s.handlePrompt(prompt)
	if err != nil {
		return err
	}

	return nil
}
384829
func (s *Service) DeleteSecret(ctx context.Context, orgID influxdb.ID, ks ...string) error {
	return s.kv.Update(ctx, func(tx Tx) error {
		for _, k := range ks {
			if err := s.deleteSecret(ctx, tx, orgID, k); err != nil {
				return err
			}
		}
		return nil
	})
}
1361388
func (item *Item) Delete() error {
  var prompt dbus.ObjectPath

  err := item.dbus.Call("org.freedesktop.Secret.Item.Delete", 0).Store(&prompt)
  if err != nil {
    return err
  }

  if isPrompt(prompt) {
    prompt := NewPrompt(item.conn, prompt)
    if _, err := prompt.Prompt(); err != nil {
      return err
    }
  }

  return nil
}
986023
func (m *MockSecretAPIClient) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error) {
	ret := m.ctrl.Call(m, "SecretCreate", ctx, secret)
	ret0, _ := ret[0].(types.SecretCreateResponse)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
752333
func (c *Client) DeleteSecret(ctx context.Context, orgID platform.ID, ks ...string) error {
	return c.db.Update(func(tx *bolt.Tx) error {
		for _, k := range ks {
			if err := c.deleteSecret(ctx, tx, orgID, k); err != nil {
				return err
			}
		}
		return nil
	})
}
957091
func (_m *Store) DeleteNode(ctx context.Context, node *types.Node) {
	_m.Called(ctx, node)
}
1200259
func (store *QueueStore) Del(key string) error {
	store.Lock()
	defer store.Unlock()
	return store.del(key)
}
220336
func (s Store) Del(key string) {
	s.Lock()
	delete(s.m, key)
	s.Unlock()
}
575569
func SecretRemove(id string) error {
	return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) {
		return cli.SecretRemove(ctx, id)
	})
}
1119729
func (c *VFSSecretStore) DeleteSecret(name string) error {
	p := c.buildSecretPath(name)
	return p.Remove()
}
153554
func (c *ClientsetSecretStore) DeleteSecret(name string) error {
	client := c.clientset.Keysets(c.namespace)

	keyset, err := client.Get(name, v1.GetOptions{})
	if err != nil {
		if errors.IsNotFound(err) {
			return nil
		} else {
			return fmt.Errorf("error reading Keyset %q: %v", name, err)
		}
	}

	if keyset.Spec.Type != kops.SecretTypeSecret {
		return fmt.Errorf("mismatch on Keyset type on %q", name)
	}

	if err := client.Delete(name, &v1.DeleteOptions{}); err != nil {
		return fmt.Errorf("error deleting Keyset %q: %v", name, err)
	}

	return nil
}