// Delete a registration by name
// UnexpectedError - problem getting in database
// NotFound - no registration with the name was found
558339
func (c *Client) DeleteRegistrationByName(name string) error {
	conn := c.Pool.Get()
	defer conn.Close()

	id, err := redis.String(conn.Do("HGET", db.ExportCollection+":name", name))
	if err == redis.ErrNil {
		return db.ErrNotFound
	} else if err != nil {
		return err
	}

	return deleteRegistration(conn, id)
}
311458
func (c *Client) DeleteIndex(name string) *DeleteIndexService {
	builder := NewDeleteIndexService(c)
	builder.Index(name)
	return builder
}
1323916
func (db *DB) Delete(key []byte) (err error) {
	err = db.ldb.Delete(key, nil)
	if err != nil {
		metrics.GetOrRegisterCounter("DB.deleteFail", nil).Inc(1)
		return err
	}
	metrics.GetOrRegisterCounter("DB.delete", nil).Inc(1)
	return nil
}
478874
func (z *ZipArchive) DeleteName(name string) error {
	for i, f := range z.files {
		if f.Name == name {
			return z.DeleteIndex(i)
		}
	}
	return errors.New("entry with given name not found")
}
181123
func (db *Database) Delete() error {
	result := &struct {
		Error string `json:"error"`
		Ok    bool   `json:"ok"`
	}{}

	body, err := db.Req.Delete("")
	if err != nil {
		return err
	}

	err = json.Unmarshal(body, result)
	if err != nil {
		return err
	}

	if result.Error != "" {
		return errors.New(result.Error)
	}
	if !result.Ok {
		return errors.New("Couch returned failure when creating [" + db.Name + "]")
	}

	return nil
}
12229
func (cache autocertCache) Delete(ctx context.Context, name string) error {
	coll, closeColl := cache.coll()
	defer closeColl()
	err := coll.RemoveId(name)
	if err == nil || errors.Cause(err) == mgo.ErrNotFound {
		return nil
	}
	return errors.Annotatef(err, "cannot delete autocert key %q", name)
}
1288482
func (d *DataBagService) Delete(name string) (result *DataBag, err error) {
	path := fmt.Sprintf("data/%s", name)
	err = d.client.magicRequestDecoder("DELETE", path, nil, &result)
	return
}
1070554
func (s *REST) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error) {
	identity, _, user, _, _, mappingErr := s.getRelatedObjects(ctx, name, &metav1.GetOptions{})

	if mappingErr != nil {
		return nil, false, mappingErr
	}

	// Disassociate the identity with the user first
	// If this fails, Delete is re-entrant
	if removeIdentityFromUser(identity, user) {
		if _, err := s.userClient.Update(user); err != nil {
			return nil, false, err
		}
	}

	// Remove the user association from the identity last.
	// If this fails, log the error, but continue, because Delete is no longer re-entrant
	// At this point, the mapping for the identity no longer exists
	if unsetIdentityUser(identity) {
		if _, err := s.identityClient.Update(identity); err != nil {
			utilruntime.HandleError(fmt.Errorf("error removing user reference %s from identity %s: %v", user.Name, identity.Name, err))
		}
	}

	return &metav1.Status{Status: metav1.StatusSuccess}, true, nil
}
633960
func (mc MongoClient) deleteById(col string, id string) error {
	s := mc.getSessionCopy()
	defer s.Close()

	query, err := idToBsonM(id)
	if err != nil {
		return err
	}
	return errorMap(s.DB(mc.database.Name).C(col).Remove(query))
}
622906
func (filters Args) Del(name, value string) {
	if _, ok := filters.fields[name]; ok {
		delete(filters.fields[name], value)
	}
}
412206
func (e *events) Delete(name string) error {
	return e.client.Delete().
		NamespaceIfScoped(e.namespace, len(e.namespace) > 0).
		Resource("events").
		Name(name).
		Do().
		Error()
}
1365237
func (s *Store) Delete(ctx context.Context, name string) error {
	return s.delete(ctx, name, false)
}
899324
func (n NamespacedKV) Delete(key string) {
	n.db.Delete(n.prefixedKey(key), nil)
}
1267711
func (db *DB) Delete(name []byte) error {
	return db.Update(func(tx *bolt.Tx) error {
		return tx.DeleteBucket(name)
	})
}
102461
func (c *FakeServiceAccounts) Delete(name string, options *v1.DeleteOptions) error {
	_, err := c.Fake.
		Invokes(testing.NewDeleteAction(serviceaccountsResource, c.ns, name), &corev1.ServiceAccount{})

	return err
}
102757
func (f *FakeNamespaceDeleter) Delete(name string, opts *v1.DeleteOptions) error {
	f.NsDeleted = append(f.NsDeleted, name)
	return f.Err
}
368385
func (c *CustomersService) Delete(idOrUsername string) (*http.Response, error) {
	return c.DeleteWithContext(context.TODO(), idOrUsername)
}