// DeleteAllProxies deletes all proxies
432523
func (c *Client) DeleteAllProxies() error {
	_, err := c.Delete(c.Endpoint("proxies"))
	if err != nil {
		return trace.Wrap(err)
	}
	return nil
}
1328664
func (fs *Filespace) RemoveAll(subPath string) error {
	return fs.root.Remove(subPath, false)
}
1282510
func (l *State) Proxies() map[string]*ManagedProxy {
	l.RLock()
	defer l.RUnlock()

	m := make(map[string]*ManagedProxy)
	for id, p := range l.managedProxies {
		m[id] = p
	}
	return m
}
239337
func (f Firewall) deleteAllSecRulesOnList(list string) error {
	// get all security rules associated with this list
	secrules, err := f.getSecRules(list)
	if err != nil {
		return errors.Trace(err)
	}
	// delete everything
	for _, rule := range secrules {
		err := f.client.DeleteSecRule(rule.Name)
		if err != nil {
			if api.IsNotFound(err) {
				continue
			}
			return errors.Trace(err)
		}
	}
	return nil
}
497642
func DeleteAllObjects(
	ctx context.Context,
	bucket gcs.Bucket) error {
	bundle := syncutil.NewBundle(ctx)

	// List all of the objects in the bucket.
	objects := make(chan *gcs.Object, 100)
	bundle.Add(func(ctx context.Context) error {
		defer close(objects)
		return ListPrefix(ctx, bucket, "", objects)
	})

	// Strip everything but the name.
	objectNames := make(chan string, 10e3)
	bundle.Add(func(ctx context.Context) (err error) {
		defer close(objectNames)
		for o := range objects {
			select {
			case <-ctx.Done():
				err = ctx.Err()
				return

			case objectNames <- o.Name:
			}
		}

		return
	})

	// Delete the objects in parallel.
	const parallelism = 64
	for i := 0; i < parallelism; i++ {
		bundle.Add(func(ctx context.Context) error {
			for objectName := range objectNames {
				err := bucket.DeleteObject(
					ctx,
					&gcs.DeleteObjectRequest{
						Name: objectName,
					})

				if err != nil {
					return err
				}
			}

			return nil
		})
	}

	return bundle.Join()
}
826841
func (api *ProxyLBAPI) DeleteCertificates(id int64) (bool, error) {
	var (
		method = "DELETE"
		uri    = fmt.Sprintf("%s/%d/proxylb/sslcertificate", api.getResourceURL(), id)
	)
	return api.baseAPI.modify(method, uri, nil)
}
913833
func (client *Client) Proxies() (map[string]*Proxy, error) {
	resp, err := http.Get(client.endpoint + "/proxies")
	if err != nil {
		return nil, err
	}

	err = checkError(resp, http.StatusOK, "Proxies")
	if err != nil {
		return nil, err
	}

	proxies := make(map[string]*Proxy)
	err = json.NewDecoder(resp.Body).Decode(&proxies)
	if err != nil {
		return nil, err
	}
	for _, proxy := range proxies {
		proxy.client = client
		proxy.created = true
	}

	return proxies, nil
}
1231077
func (si *SolrInterface) DeleteAll() (*SolrUpdateResponse, error) {
	params := &url.Values{}
	params.Add("commit", "true")
	return si.Delete(M{"query": "*:*"}, params)
}
712500
func (c *Client) ScrubAllRegistrations() (err error) {
	conn := c.Pool.Get()
	defer conn.Close()

	return unlinkCollection(conn, db.ExportCollection)
}
1301361
func (proxier *Proxier) cleanupStaleStickySessions() {
	proxier.mu.Lock()
	defer proxier.mu.Unlock()
	servicePortNameMap := make(map[proxy.ServicePortName]bool)
	for name := range proxier.serviceMap {
		servicePortName := proxy.ServicePortName{
			NamespacedName: types.NamespacedName{
				Namespace: name.Namespace,
				Name:      name.Name,
			},
			Port: name.Port,
		}
		if servicePortNameMap[servicePortName] == false {
			// ensure cleanup sticky sessions only gets called once per serviceportname
			servicePortNameMap[servicePortName] = true
			proxier.loadBalancer.CleanupStaleStickySessions(servicePortName)
		}
	}
}
1095411
func (s *PresenceService) DeleteAllNamespaces() error {
	return s.DeleteRange(context.TODO(), backend.Key(namespacesPrefix), backend.RangeEnd(backend.Key(namespacesPrefix)))
}
619564
func (s HTTPStore) RemoveAll() error {
	url, err := s.buildMetaURL("")
	if err != nil {
		return err
	}
	req, err := http.NewRequest("DELETE", url.String(), nil)
	if err != nil {
		return err
	}
	resp, err := s.roundTrip.RoundTrip(req)
	if err != nil {
		return NetworkError{Wrapped: err}
	}
	defer resp.Body.Close()
	return translateStatusToError(resp, "DELETE metadata for GUN endpoint")
}
1157467
func (s *PresenceService) DeleteProxy(name string) error {
	key := backend.Key(proxiesPrefix, name)
	return s.Delete(context.TODO(), key)
}
798627
func (mp *MockPeerCCSupport) RemoveAll() error {
	mp.ccStream = make(map[string]*MockCCComm)
	return nil
}
1171344
func (svc *DynamoAccessor) DeleteAll(ctx context.Context) error {
	var deleteErr error
	input := &dynamodb.ScanInput{
		TableName: aws.String(svc.dynamoTableName()),
	}

	scanHandler := func(output *dynamodb.ScanOutput, lastPage bool) bool {
		writeDeleteRequests := make([]*dynamodb.WriteRequest, len(output.Items))
		for index, eachItem := range output.Items {
			keyID := ""
			stringVal, stringValOk := eachItem[attrID]
			if stringValOk && stringVal.S != nil {
				keyID = *(stringVal.S)
			}
			writeDeleteRequests[index] = &dynamodb.WriteRequest{
				DeleteRequest: &dynamodb.DeleteRequest{
					Key: dynamoKeyValueAttrMap(keyID),
				},
			}
		}
		input := &dynamodb.BatchWriteItemInput{
			RequestItems: map[string][]*dynamodb.WriteRequest{
				svc.dynamoTableName(): writeDeleteRequests,
			},
		}
		_, deleteErr = svc.dynamoSvc(ctx).BatchWriteItem(input)
		return deleteErr == nil
	}

	scanErr := svc.dynamoSvc(ctx).ScanPagesWithContext(ctx, input, scanHandler)
	if scanErr != nil {
		return scanErr
	}
	return deleteErr
}
411622
func (s *AccessService) DeleteAllRoles() error {
	return s.DeleteRange(context.TODO(), backend.Key(rolesPrefix), backend.RangeEnd(backend.Key(rolesPrefix)))
}
963069
func (s *DeleteLabelsInput) SetDeleteAll(v bool) *DeleteLabelsInput {
	s.DeleteAll = &v
	return s
}