// SaveFilterID to memory.
347880
func (s *InMemoryStore) SaveFilterID(userID, filterID string) {
	s.Filters[userID] = filterID
}
888790
func ExternalTokenFilterByIdentityID(identityID uuid.UUID) func(db *gorm.DB) *gorm.DB {
	return func(db *gorm.DB) *gorm.DB {
		return db.Where("identity_id = ?", identityID)
	}
}
266522
func (api *PacketFilterAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
810845
func (api *ArchiveAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
1140761
func (b *Bus) AddEnqueueFilter(ID string, f func(Event) bool, delay time.Duration) {
	b.mutex.RLock()
	oldFilter, ok := b.enqueueFilters[ID]
	b.mutex.RUnlock()

	if ok {
		if oldFilter.timer != nil {
			oldFilter.timer.Stop()
		}
	}

	var timer *time.Timer
	if delay != 0 {
		timer = time.NewTimer(delay)
		go func() {
			<-timer.C
			b.RemoveEnqueueFilter(ID)
		}()
	}

	b.mutex.Lock()
	b.enqueueFilters[ID] = filterInfo{
		filter: f,
		timer:  timer,
	}
	b.mutex.Unlock()
}
1072052
func (api *ProductPrivateHostAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
548351
func (api *ProductLicenseAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
519672
func storeFilter(dbTx database.Tx, block *btcutil.Block, f *gcs.Filter,
	filterType wire.FilterType) error {
	if uint8(filterType) > maxFilterType {
		return errors.New("unsupported filter type")
	}

	// Figure out which buckets to use.
	fkey := cfIndexKeys[filterType]
	hkey := cfHeaderKeys[filterType]
	hashkey := cfHashKeys[filterType]

	// Start by storing the filter.
	h := block.Hash()
	filterBytes, err := f.NBytes()
	if err != nil {
		return err
	}
	err = dbStoreFilterIdxEntry(dbTx, fkey, h, filterBytes)
	if err != nil {
		return err
	}

	// Next store the filter hash.
	filterHash, err := builder.GetFilterHash(f)
	if err != nil {
		return err
	}
	err = dbStoreFilterIdxEntry(dbTx, hashkey, h, filterHash[:])
	if err != nil {
		return err
	}

	// Then fetch the previous block's filter header.
	var prevHeader *chainhash.Hash
	ph := &block.MsgBlock().Header.PrevBlock
	if ph.IsEqual(&zeroHash) {
		prevHeader = &zeroHash
	} else {
		pfh, err := dbFetchFilterIdxEntry(dbTx, hkey, ph)
		if err != nil {
			return err
		}

		// Construct the new block's filter header, and store it.
		prevHeader, err = chainhash.NewHash(pfh)
		if err != nil {
			return err
		}
	}

	fh, err := builder.MakeHeaderForFilter(f, *prevHeader)
	if err != nil {
		return err
	}
	return dbStoreFilterIdxEntry(dbTx, hkey, h, fh[:])
}
1332589
func (api *CDROMAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
413708
func CompressFilter(c *Controller, fc []Filter) {
	if c.Response.Out.internalHeader.Server != nil && Config.BoolDefault("results.compressed", false) {
		if c.Response.Status != http.StatusNoContent && c.Response.Status != http.StatusNotModified {
			if found, compressType, compressWriter := detectCompressionType(c.Request, c.Response); found {
				writer := CompressResponseWriter{
					ControllerResponse: c.Response,
					OriginalWriter:     c.Response.GetWriter(),
					compressWriter:     compressWriter,
					compressionType:    compressType,
					headersWritten:     false,
					closeNotify:        make(chan bool, 1),
					closed:             false,
				}
				// Swap out the header with our own
				writer.Header = NewBufferedServerHeader(c.Response.Out.internalHeader.Server)
				c.Response.Out.internalHeader.Server = writer.Header
				if w, ok := c.Response.GetWriter().(http.CloseNotifier); ok {
					writer.parentNotify = w.CloseNotify()
				}
				c.Response.SetWriter(&writer)
			}
		} else {
			compressLog.Debug("CompressFilter: Compression disabled for response ", "status", c.Response.Status)
		}
	}
	fc[0](c, fc[1:])
}
18952
func SaveUser(host, token, id string, doc map[string]interface{}) (*map[string]interface{}, error) {
	path := variables.APIPathUser
	path = strings.Replace(path, ":id", id, 1)
	doc["_id"] = id
	return GenericRequest(host, path, token, doc)
}
1076943
func (api *IPAddressAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
569999
func (api *IPv6NetAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
1195653
func (a *FilteredAdapter) SavePolicy(model model.Model) error {
	if a.filtered {
		return errors.New("cannot save a filtered policy")
	}
	return a.Adapter.SavePolicy(model)
}
1107487
func (s *DescribeDimensionKeysInput) SetFilter(v map[string]*string) *DescribeDimensionKeysInput {
	s.Filter = v
	return s
}
362910
func (s *Selection) FilterFunction(f func(int, *Selection) bool) *Selection {
	return pushStack(s, winnowFunction(s, f, true))
}
738802
func (api *SSHKeyAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}