// Delete all value descriptors
495680
func (c *Client) ScrubAllValueDescriptors() error {
	conn := c.Pool.Get()
	defer conn.Close()

	err := unlinkCollection(conn, db.ValueDescriptorCollection)
	if err != nil {
		return err
	}

	return nil
}
1036845
func Del(id string, params *stripe.RadarValueListParams) (*stripe.RadarValueList, error) {
	return getC().Del(id, params)
}
751913
func DeleteDescription(description string) DeleteOption {
	return func(opts *options) {
		opts.uninstallReq.Description = description
	}
}
924956
func removeNodes(toRemove nodes, bridge, residual bool) {
	for _, n := range toRemove {
		for ei := range n.in {
			delete(ei.out, n)
		}
		if bridge {
			for ei, wi := range n.in {
				for eo, wo := range n.out {
					var weight int64
					if n.cum != 0 {
						weight = int64(float64(wo.weight) * (float64(wi.weight) / float64(n.cum)))
					}
					bumpWeight(ei, eo, weight, residual)
				}
			}
		}
		for eo := range n.out {
			delete(eo.in, n)
		}
	}
}
305608
func deleteValueDescriptorByIdHandler(w http.ResponseWriter, r *http.Request) {
	defer r.Body.Close()

	vars := mux.Vars(r)
	id := vars["id"]

	err := deleteValueDescriptorById(id)
	if err != nil {
		switch err.(type) {
		case *errors.ErrDbNotFound:
			http.Error(w, err.Error(), http.StatusNotFound)
			return
		case *errors.ErrValueDescriptorInvalid:
			http.Error(w, err.Error(), http.StatusBadRequest)
			return
		case *errors.ErrValueDescriptorInUse:
			http.Error(w, "Data integrity issue. Value Descriptor still in use by readings", http.StatusConflict)
			return
		case *errors.ErrInvalidId:
			http.Error(w, err.Error(), http.StatusBadRequest)
			return
		default:
			http.Error(w, err.Error(), http.StatusInternalServerError)
			return
		}
	}

	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(http.StatusOK)
	w.Write([]byte("true"))
}
203044
func (c *Client) DeleteValueDescriptorById(id string) error {
	conn := c.Pool.Get()
	defer conn.Close()

	err := deleteValue(conn, id)
	if err != nil {
		if err == redis.ErrNil {
			return db.ErrNotFound
		}
		return err
	}
	return nil
}
1055372
func (r *MemoryNoTS) Delete(key string) error {
	delete(r.items, key)
	return nil
}
1205939
func (s Set) Del(value string) bool {
	if _, ok := s[value]; !ok {
		return false
	}
	delete(s, value)
	return true
}
1173943
func (m *dirsMap) Delete(key string) {
	m.data.Delete(m.normalizeKey(key))
}
1283692
func (f *Facade) DeleteSnapshots(ctx datastore.Context, serviceID string) error {
	defer ctx.Metrics().Stop(ctx.Metrics().Start("Facade.DeleteSnapshots"))
	// Do not DFSLock here, ControlPlaneDao does that
	snapshots, err := f.ListSnapshots(ctx, serviceID)
	if err != nil {
		return err
	}
	for _, snapshotID := range snapshots {
		if err := f.DeleteSnapshot(ctx, snapshotID); err != nil {
			return err
		}
	}
	return nil
}
568531
func (v *OrderedValues) Del(key []byte) {
	var (
		i  int
		ok bool
		j  [][]byte
	)
	for i, j = range *v {
		if len(j) > 0 && bytes.Equal(j[0], key) {
			ok = true
			break
		}
	}
	if !ok {
		return
	}
	copy((*v)[i:], (*v)[i+1:])
	(*v)[len(*v)-1] = nil
	*v = (*v)[:len(*v)-1]
}
965460
func (sm *ScriptMap) Delete(scriptName string) {
	sm.lock.Lock()
	defer sm.lock.Unlock()
	delete(sm.scripts, scriptName)
}
70711
func (r *PrevRevisions) Del(key string) (found bool, prev datasync.KeyVal) {
	found, prev = r.Get(key)

	if found {
		r.mu.Lock()
		delete(r.revisions, key)
		r.mu.Unlock()
	}

	return found, prev
}
622906
func (filters Args) Del(name, value string) {
	if _, ok := filters.fields[name]; ok {
		delete(filters.fields[name], value)
	}
}
458983
func (m *mruInventoryMap) Delete(iv *wire.InvVect) {
	m.invMtx.Lock()
	if node, exists := m.invMap[*iv]; exists {
		m.invList.Remove(node)
		delete(m.invMap, *iv)
	}
	m.invMtx.Unlock()
}
275339
func deleteNamespaces(namespaces k8s.NamespaceListerDeleter, skip map[string]struct{}) error {
	namespacesList, err := namespaces.List(v1.ListOptions{})
	if err != nil {
		return errListNamespaces{origErr: err}
	}
	// TODO: delete concurrently https://github.com/deis/k8s-claimer/issues/49
	var errs []error
	for _, namespace := range namespacesList.Items {
		_, inSkip := skip[namespace.Name]
		_, isDefault := skipDeleteNamespaces[namespace.Name]
		if !isDefault && !inSkip {
			if err := namespaces.Delete(namespace.Name, &v1.DeleteOptions{}); err != nil {
				errs = append(errs, err)
			}
		}
	}
	if len(errs) > 0 {
		return errDeleteNamespaces{origErrs: errs}
	}
	return nil
}
642962
func (c *Client) CleanupOldMetrics() error {
	p := params.Entities{Entities: []params.Entity{
		{c.modelTag.String()},
	}}
	var results params.ErrorResults
	err := c.facade.FacadeCall("CleanupOldMetrics", p, &results)
	if err != nil {
		return errors.Trace(err)
	}
	return results.OneError()
}