// ClearObjectStoreWithParams - Clears all entries from an object store.
545552
func (c *IndexedDB) ClearObjectStoreWithParams(v *IndexedDBClearObjectStoreParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "IndexedDB.clearObjectStore", Params: v})
}
11532
func (s *ImageStoreService) NewUpdateCloudToUseObjectStoreParams(provider string) *UpdateCloudToUseObjectStoreParams {
	p := &UpdateCloudToUseObjectStoreParams{}
	p.p = make(map[string]interface{})
	p.p["provider"] = provider
	return p
}
639307
func (c Client) RemoveObjects(bucketName string, objectsCh <-chan string) <-chan RemoveObjectError {
	return c.RemoveObjectsWithContext(context.Background(), bucketName, objectsCh)
}
511444
func (s *ImageStoreService) UpdateCloudToUseObjectStore(p *UpdateCloudToUseObjectStoreParams) (*UpdateCloudToUseObjectStoreResponse, error) {
	resp, err := s.cs.newRequest("updateCloudToUseObjectStore", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r UpdateCloudToUseObjectStoreResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
491457
func NewDeleteObjectStoreEntriesArgs(securityOrigin string, databaseName string, objectStoreName string, keyRange KeyRange) *DeleteObjectStoreEntriesArgs {
	args := new(DeleteObjectStoreEntriesArgs)
	args.SecurityOrigin = securityOrigin
	args.DatabaseName = databaseName
	args.ObjectStoreName = objectStoreName
	args.KeyRange = keyRange
	return args
}
784788
func (r *Response) ClearInternalBuffer() {

	if r == nil || r.internalByteBuffer == nil {
		return
	}

	r.internalByteBuffer.Reset()
}
1127690
func deleteNamespaceFromSubjects(subjectRecordStore cache.Store, subjects []string, namespace string) {
	for _, subject := range subjects {
		obj, exists, _ := subjectRecordStore.GetByKey(subject)
		if exists {
			subjectRecord := obj.(*subjectRecord)
			delete(subjectRecord.namespaces, namespace)
			if len(subjectRecord.namespaces) == 0 {
				subjectRecordStore.Delete(subjectRecord)
			}
		}
	}
}
94157
func (ds *datastore) DeleteObject(kvObject KVObject) error {
	if ds.sequential {
		ds.Lock()
		defer ds.Unlock()
	}

	// cleanup the cache first
	if ds.cache != nil {
		// If persistent store is skipped, sequencing needs to
		// happen in cache.
		ds.cache.del(kvObject, kvObject.Skip())
	}

	if kvObject.Skip() {
		return nil
	}

	return ds.store.Delete(Key(kvObject.Key()...))
}
1335974
func (r *Repository) DeleteObject(hash plumbing.Hash) error {
	los, ok := r.Storer.(storer.LooseObjectStorer)
	if !ok {
		return ErrLooseObjectsNotSupported
	}

	return los.DeleteLooseObject(hash)
}
957708
func (ck *MaintenanceWindowDelete) DeleteParams() map[string]string {
	m := map[string]string{
		"maintenanceids": ck.MaintenanceIDs,
	}

	return m
}
1029534
func (s *sandbox) unsetAndRemoveSandboxStorage(path string) error {
	span, _ := s.trace("unsetAndRemoveSandboxStorage")
	span.SetTag("path", path)
	defer span.Finish()

	if _, ok := s.storages[path]; ok {
		removeSbs, err := s.unSetSandboxStorage(path)
		if err != nil {
			return err
		}

		if removeSbs {
			if err := s.removeSandboxStorage(path); err != nil {
				return err
			}
		}

		return nil
	}
	return grpcStatus.Errorf(codes.NotFound, "Sandbox storage with path %s not found", path)
}
1159032
func (r User_Permission_Group) RemoveBulkResourceObjects(resourceObjects []datatypes.Entity, resourceTypeKeyName *string) (resp bool, err error) {
	params := []interface{}{
		resourceObjects,
		resourceTypeKeyName,
	}
	err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "removeBulkResourceObjects", params, &r.Options, &resp)
	return
}
1043643
func (c Client) RemoveObjectsWithContext(ctx context.Context, bucketName string, objectsCh <-chan string) <-chan RemoveObjectError {
	errorCh := make(chan RemoveObjectError, 1)

	// Validate if bucket name is valid.
	if err := s3utils.CheckValidBucketName(bucketName); err != nil {
		defer close(errorCh)
		errorCh <- RemoveObjectError{
			Err: err,
		}
		return errorCh
	}
	// Validate objects channel to be properly allocated.
	if objectsCh == nil {
		defer close(errorCh)
		errorCh <- RemoveObjectError{
			Err: ErrInvalidArgument("Objects channel cannot be nil"),
		}
		return errorCh
	}

	// Generate and call MultiDelete S3 requests based on entries received from objectsCh
	go func(errorCh chan<- RemoveObjectError) {
		maxEntries := 1000
		finish := false
		urlValues := make(url.Values)
		urlValues.Set("delete", "")

		// Close error channel when Multi delete finishes.
		defer close(errorCh)

		// Loop over entries by 1000 and call MultiDelete requests
		for {
			if finish {
				break
			}
			count := 0
			var batch []string

			// Try to gather 1000 entries
			for object := range objectsCh {
				batch = append(batch, object)
				if count++; count >= maxEntries {
					break
				}
			}
			if count == 0 {
				// Multi Objects Delete API doesn't accept empty object list, quit immediately
				break
			}
			if count < maxEntries {
				// We didn't have 1000 entries, so this is the last batch
				finish = true
			}

			// Generate remove multi objects XML request
			removeBytes := generateRemoveMultiObjectsRequest(batch)
			// Execute GET on bucket to list objects.
			resp, err := c.executeMethod(ctx, "POST", requestMetadata{
				bucketName:       bucketName,
				queryValues:      urlValues,
				contentBody:      bytes.NewReader(removeBytes),
				contentLength:    int64(len(removeBytes)),
				contentMD5Base64: sumMD5Base64(removeBytes),
				contentSHA256Hex: sum256Hex(removeBytes),
			})
			if resp != nil {
				if resp.StatusCode != http.StatusOK {
					e := httpRespToErrorResponse(resp, bucketName, "")
					errorCh <- RemoveObjectError{ObjectName: "", Err: e}
				}
			}
			if err != nil {
				for _, b := range batch {
					errorCh <- RemoveObjectError{ObjectName: b, Err: err}
				}
				continue
			}

			// Process multiobjects remove xml response
			processRemoveMultiObjectsResponse(resp.Body, batch, errorCh)

			closeResponse(resp)
		}
	}(errorCh)
	return errorCh
}
1352211
func (c resettableComponent) ClearSentData() {
	c.IComponent.ClearSentData()
	for _, counter := range c.counters {
		counter.Clear()
	}
}
355689
func (c Client) RemoveObject(bucketName, objectName string) error {
	// Input validation.
	if err := s3utils.CheckValidBucketName(bucketName); err != nil {
		return err
	}
	if err := s3utils.CheckValidObjectName(objectName); err != nil {
		return err
	}
	// Execute DELETE on objectName.
	resp, err := c.executeMethod(context.Background(), "DELETE", requestMetadata{
		bucketName:       bucketName,
		objectName:       objectName,
		contentSHA256Hex: emptySHA256Hex,
	})
	defer closeResponse(resp)
	if err != nil {
		return err
	}
	if resp != nil {
		// if some unexpected error happened and max retry is reached, we want to let client know
		if resp.StatusCode != http.StatusNoContent {
			return httpRespToErrorResponse(resp, bucketName, objectName)
		}
	}

	// DeleteObject always responds with http '204' even for
	// objects which do not exist. So no need to handle them
	// specifically.
	return nil
}
1018950
func (c *Client) UpdateCloudToUseObjectStore(p *UpdateCloudToUseObjectStoreParameter) (*ImageStore, error) {
	obj, err := c.Request("updateCloudToUseObjectStore", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*ImageStore), err
}
400358
func (pool *ObjectPool) Clear(ctx context.Context) {
	p, ok := pool.idleObjects.PollFirst().(*PooledObject)

	for ok {
		pool.destroy(ctx, p)
		p, ok = pool.idleObjects.PollFirst().(*PooledObject)
	}
}