// Delete delets the lease with the provided lease ID
775948
func (lm *LeaseManager) Delete(ctx context.Context, lease leases.Lease, _ ...leases.DeleteOpt) error {
	namespace, err := namespaces.NamespaceRequired(ctx)
	if err != nil {
		return err
	}

	topbkt := getBucket(lm.tx, bucketKeyVersion, []byte(namespace), bucketKeyObjectLeases)
	if topbkt == nil {
		return errors.Wrapf(errdefs.ErrNotFound, "lease %q", lease.ID)
	}
	if err := topbkt.DeleteBucket([]byte(lease.ID)); err != nil {
		if err == bolt.ErrBucketNotFound {
			err = errors.Wrapf(errdefs.ErrNotFound, "lease %q", lease.ID)
		}
		return err
	}
	return nil
}
1182720
func (e *Store) Delete(id string, pid int) {
	e.Lock()
	delete(e.byID, id)
	e.Unlock()
}
1057806
func (m *GormIterationRepository) Delete(ctx context.Context, ID uuid.UUID) error {
	defer goa.MeasureSince([]string{"goa", "db", "iteration", "delete"}, time.Now())
	if ID == uuid.Nil {
		log.Error(ctx, map[string]interface{}{
			"iteration_id": ID.String(),
		}, "unable to find the iteration by ID")
		return errors.NewNotFoundError("iteration", ID.String())
	}
	itr := Iteration{ID: ID}
	tx := m.db.Delete(itr)

	if err := tx.Error; err != nil {
		log.Error(ctx, map[string]interface{}{
			"iteration_id": ID.String(),
		}, "unable to delete the iteration")
		return errors.NewInternalError(ctx, err)
	}
	if tx.RowsAffected == 0 {
		log.Error(ctx, map[string]interface{}{
			"iteration_id": ID.String(),
		}, "none row was affected by the deletion operation")
		return errors.NewNotFoundError("iteration", ID.String())
	}
	return nil
}
1204909
func (c *Client) Delete(path string) error {
	return c.Send("DELETE", path, nil, nil)
}
538403
func (s *ServerMethods) Delete(id int) error {
	_, err := s.ExecCmd(NewCmd("serverdelete").WithArgs(NewArg("sid", id)))
	return err
}
1248508
func (self *Model) Delete(ids ...interface{}) error {
	return self.db.Delete(self.collection.Name, ids...)
}
880190
func (c *Client) Delete(key string, opts ...datasync.DelOption) (existed bool, err error) {
	consulLogger.Debugf("Delete: %q", key)
	if _, err := c.client.KV().Delete(transformKey(key), nil); err != nil {
		return false, err
	}

	return true, nil
}
156763
func (r *remoteClient) Delete() error {
	err := r.client.Workspaces.Delete(context.Background(), r.organization, r.workspace.Name)
	if err != nil && err != tfe.ErrResourceNotFound {
		return fmt.Errorf("Error deleting workspace %s: %v", r.workspace.Name, err)
	}

	return nil
}
635305
func (ipaddress IPAddress) Delete(ctx context.Context, client *Client) error {
	if ipaddress.ID == nil {
		return fmt.Errorf("an IPAddress may only be deleted using ID")
	}

	return client.BooleanRequestWithContext(ctx, &DisassociateIPAddress{
		ID: ipaddress.ID,
	})
}
1246912
func (namespace *HostComputeNamespace) Delete() error {
	logrus.Debugf("hcn::HostComputeNamespace::Delete id=%s", namespace.Id)

	if err := deleteNamespace(namespace.Id); err != nil {
		return err
	}
	return nil
}
1243373
func (c *Client) Delete() *Request {
	req := c.Request()
	req.Method("DELETE")
	return req
}
1244502
func (idx *TruncIndex) Delete(id string) error {
	idx.Lock()
	defer idx.Unlock()
	if _, exists := idx.ids[id]; !exists || id == "" {
		return fmt.Errorf("no such id: '%s'", id)
	}
	delete(idx.ids, id)
	if deleted := idx.trie.Delete(patricia.Prefix(id)); !deleted {
		return fmt.Errorf("no such id: '%s'", id)
	}
	return nil
}
307422
func (tx *tx) delete(table, id string) error {
	n := tx.lookup(table, indexID, id)
	if n == nil {
		return ErrNotExist
	}

	err := tx.memDBTx.Delete(table, n)
	if err == nil {
		tx.changelist = append(tx.changelist, n.EventDelete())
	}
	return err
}
102757
func (f *FakeNamespaceDeleter) Delete(name string, opts *v1.DeleteOptions) error {
	f.NsDeleted = append(f.NsDeleted, name)
	return f.Err
}
1266669
func (m *Map) Delete(k ident.ID) {
	hash := m.hash(k)
	for entry, ok := m.lookup[hash]; ok; entry, ok = m.lookup[hash] {
		if m.equals(entry.key.key, k) {
			m.removeMapKey(hash, entry.key)
			return
		}
		// Linear probe to "next" to this entry (really a rehash)
		hash++
	}
}
613526
func (s *RedisStore) Delete(key string) error {
	if !strings.HasPrefix(key, s.prefix) {
		key = s.prefix + key
	}
	return s.client.Del(key).Err()
}
344413
func (r *RedisStore) Delete(key string) error {
	return r.client.Del(key).Err()
}