// GetDataForKey returns data for given key.
163710
func (c *DbClient) GetDataForKey(key string) (*decoder.FileDataEntry, bool) {
	c.Lock()
	defer c.Unlock()

	for _, file := range c.db {
		value, ok := file[key]
		if ok {
			return &decoder.FileDataEntry{
				Key:   key,
				Value: value.data,
			}, true
		}
	}
	return nil, false
}
618217
func (m *Metric) GetKey() string {
	if m == nil || m.Key == nil {
		return ""
	}
	return *m.Key
}
1046101
func getKey(s, key string) string {
	for _, keyEqualsValue := range strings.Split(s, ",") {
		keyValue := strings.SplitN(keyEqualsValue, "=", 2)
		if len(keyValue) == 2 && keyValue[0] == key {
			return keyValue[1]
		}
	}
	return ""
}
791443
func groupKeyFor(key lease.Key) groupKey {
	return groupKey{
		namespace: key.Namespace,
		modelUUID: key.ModelUUID,
	}
}
492333
func (e *Error) GetData(key DataKey) interface{} {
	if e.data != nil {
		val, ok := e.data[key]
		if ok {
			return val
		}
		if boolWrapper(e.data[disableInheritance], false) {
			return nil
		}
	}
	return e.class.data[key]
}
558349
func (f Format) ValueForKey(key FormatKey) interface{} {
	switch key {
	case FormatItagKey:
		return f.Itag
	case FormatExtensionKey:
		return f.Extension
	case FormatResolutionKey:
		return f.Resolution
	case FormatVideoEncodingKey:
		return f.VideoEncoding
	case FormatAudioEncodingKey:
		return f.AudioEncoding
	case FormatAudioBitrateKey:
		return f.AudioBitrate
	default:
		if f.meta != nil {
			return f.meta[string(key)]
		}
		return nil
	}
}
1190178
func (s *LedisStore) Get(key interface{}) interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()

	return s.data[key]
}
1233848
func (s *MemoryKeyStore) GetKey(ski []byte) (bccsp.Key, error) {
	key, ok := s.store[hex.EncodeToString(ski)]
	if !ok {
		return nil, fmt.Errorf("Key not found [%s]", ski)
	}
	return key, nil
}
694095
func (c *DbClient) GetDataForPrefix(prefix string) []*decoder.FileDataEntry {
	c.Lock()
	defer c.Unlock()

	var keyValues []*decoder.FileDataEntry
	for _, file := range c.db {
		for key, value := range file {
			if strings.HasPrefix(key, prefix) {
				keyValues = append(keyValues, &decoder.FileDataEntry{
					Key:   key,
					Value: value.data,
				})
			}
		}
	}
	return keyValues
}
201864
func (c *CloudAPI) GetKey(keyName string) (*cloudapi.Key, error) {
	if err := c.ProcessFunctionHook(c, keyName); err != nil {
		return nil, err
	}

	for _, key := range c.keys {
		if key.Name == keyName {
			return &key, nil
		}
	}

	return nil, fmt.Errorf("Key %s not found", keyName)
}
747131
func (c *DbClient) GetDataForFile(path string) []*decoder.FileDataEntry {
	c.Lock()
	defer c.Unlock()

	var keyValues []*decoder.FileDataEntry
	if dbKeyValues, ok := c.db[path]; ok {
		for key, value := range dbKeyValues {
			keyValues = append(keyValues, &decoder.FileDataEntry{
				Key:   key,
				Value: value.data,
			})
		}
	}
	return keyValues
}
358966
func getKey(resourceType string, alertType int64, resourceID string) string {
	return filepath.Join(kvdbKey, resourceType, strconv.FormatInt(alertType, 16), resourceID)
}
1016968
func (c *MemcacheClient) GetKey(k cache.Keyer) ([]byte, time.Time, error) {
	cacheItem, err := c.client.Get(k.Key())
	if err != nil {
		if err == memcache.ErrCacheMiss {
			// Don't log on cache miss
			return []byte{}, time.Time{}, cache.ErrNotCached
		} else {
			c.logger.Log("err", errors.Wrap(err, "Fetching tag from memcache"))
			return []byte{}, time.Time{}, err
		}
	}
	deadlineTime := binary.BigEndian.Uint32(cacheItem.Value)
	return cacheItem.Value[4:], time.Unix(int64(deadlineTime), 0), nil
}
1309362
func (s *MemcacheStore) Get(key interface{}) interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()

	return s.data[key]
}
529457
func (c *ClassifierDeserializer) GetJSONForKey(key string, v interface{}) error {
	b, err := c.GetBytesForKey(key)
	if err != nil {
		return err
	}
	return json.Unmarshal(b, v)
}
1204715
func (d *NullDatastore) Get(key Key) (value []byte, err error) {
	return nil, ErrNotFound
}
1040551
func (q *LevelHistoryDBQueryExecutor) GetHistoryForKey(namespace string, key string) (commonledger.ResultsIterator, error) {

	if ledgerconfig.IsHistoryDBEnabled() == false {
		return nil, errors.New("history database not enabled")
	}

	var compositeStartKey []byte
	var compositeEndKey []byte
	compositeStartKey = historydb.ConstructPartialCompositeHistoryKey(namespace, key, false)
	compositeEndKey = historydb.ConstructPartialCompositeHistoryKey(namespace, key, true)

	// range scan to find any history records starting with namespace~key
	dbItr := q.historyDB.db.GetIterator(compositeStartKey, compositeEndKey)
	return newHistoryScanner(compositeStartKey, namespace, key, dbItr, q.blockStore), nil
}