// Delete deletes an entry with the given key
435575
func (b *Backend) Delete(ctx context.Context, key string) error {
	defer metrics.MeasureSince(metricDelete, time.Now())

	// Pooling
	b.permitPool.Acquire()
	defer b.permitPool.Release()

	// Delete
	err := b.client.Bucket(b.bucket).Object(key).Delete(ctx)
	if err != nil && err != storage.ErrObjectNotExist {
		return errwrap.Wrapf(fmt.Sprintf("failed to delete key %q: {{err}}", key), err)
	}
	return nil
}
734056
func (db *Database) Delete(sid string, key string) (deleted bool) {
	txn := db.Service.NewTransaction(true)
	err := txn.Delete(makeKey(sid, key))
	if err != nil {
		return
	}
	txn.Commit(nil)
	return err == nil
}
885551
func (s *MemorySession) Delete(key string) error {
	delete(s.data, key)
	return nil
}
1300398
func (s *GenericStorage) Delete(key interface{}) error {
	if s.del == nil && s.delMulti == nil {
		return errors.Newf(
			"'%s' does not have Delete/DeleteMulti implementation",
			s.name)
	}

	s.rwMutex.Lock()
	defer s.rwMutex.Unlock()

	if s.del != nil {
		return s.del(key)
	}
	return s.delMulti(key)
}
209498
func (d *Datastore) Delete(key ds.Key) (err error) {
	return d.child.Delete(d.ConvertKey(key))
}
948585
func (immutable *Immutable) Delete(entries ...Entry) (*Immutable, Entries) {
	if len(entries) == 0 {
		return immutable, Entries{}
	}

	deleted := make(Entries, 0, len(entries))
	cp := immutable.copy()
	for _, e := range entries {
		deleted = append(deleted, cp.delete(e))
	}

	return cp, deleted
}
329607
func (m *Map) Delete(k bpf.MapKey) error {
	_, err := m.delete(k, true)
	return err
}
15049
func (b *batch) Delete(key []byte) error {
	b.b.Delete(key)
	b.size++
	return nil
}
923473
func (s *DBStore) Delete(key string) (err error) {
	return s.db.Delete([]byte(key), nil)
}
1320541
func (c *Cache) Delete(key string) (err error) {
	return c.caches(c.Name, "items", key).Req("DELETE", nil, nil)
}
899324
func (n NamespacedKV) Delete(key string) {
	n.db.Delete(n.prefixedKey(key), nil)
}
501242
func (kv *KV) Delete(key []byte) error {
	return kv.db.Erase(gkv.Btos(key))
}
574660
func (s *redisStorage) Delete(key string) error {
	cmd := s.c.Del(key)
	return cmd.Err()
}
13154
func (d *Datastore) Delete(key ds.Key) (err error) {
	fn := d.KeyFilename(key)
	if !isFile(fn) {
		return ds.ErrNotFound
	}

	return os.Remove(fn)
}
1018399
func (c *Cache) Delete(keys [][]byte) {
	c.DeleteRange(keys, math.MinInt64, math.MaxInt64)
}
1189987
func (d *Failstore) Delete(k ds.Key) error {
	err := d.errfunc("delete")
	if err != nil {
		return err
	}

	return d.child.Delete(k)
}
1110064
func (s *CacheOnStorage) Delete(key interface{}) error {
	if err := s.storage.Delete(key); err != nil {
		return err
	}

	return s.cache.Delete(key)
}