// Keys returns a new Array object that may be used to inspect objects keys.
//
// Example:
//  object := NewObject(t, map[string]interface{}{"foo": 123, "bar": 456})
//  object.Keys().ContainsOnly("foo", "bar")
1351
func (o *Object) Keys() *Array {
	keys := []interface{}{}
	for k := range o.value {
		keys = append(keys, k)
	}
	return &Array{o.chain, keys}
}
471258
func (f *Field) keys() bool {
	f.mu.RLock()
	defer f.mu.RUnlock()
	return f.options.Keys
}
462569
func (l DocumentMetaSlice) Keys() []string {
	keys := make([]string, len(l))
	for i, m := range l {
		keys[i] = m.Key
	}
	return keys
}
886964
func (c *Client) Keys(pattern string) ([]string, error) {
	var ret []string
	err := c.command(
		&ret,
		[]byte("KEYS"),
		[]byte(pattern),
	)
	return ret, err
}
442041
func Keys(out interface{}) interface{} {
	value := redirectValue(reflect.ValueOf(out))
	valueType := value.Type()

	if value.Kind() == reflect.Map {
		keys := value.MapKeys()

		length := len(keys)

		resultSlice := reflect.MakeSlice(reflect.SliceOf(valueType.Key()), length, length)

		for i, key := range keys {
			resultSlice.Index(i).Set(key)
		}

		return resultSlice.Interface()
	}

	if value.Kind() == reflect.Struct {
		length := value.NumField()

		resultSlice := make([]string, length)

		for i := 0; i < length; i++ {
			resultSlice[i] = valueType.Field(i).Name
		}

		return resultSlice
	}

	panic(fmt.Sprintf("Type %s is not supported by Keys", valueType.String()))
}
443156
func (section *Section) Keys() []string {
	var keys []string
	for key := range section.values {
		keys = append(keys, key)
	}

	sort.Strings(keys)
	return keys
}
1019090
func (b *BigIP) Keys() (*Keys, error) {
	var keys Keys
	err, _ := b.getForEntity(&keys, uriSys, uriFile, uriSslKey)
	if err != nil {
		return nil, err
	}

	return &keys, nil
}
811681
func (s *Section) Keys() []*Key {
	keys := make([]*Key, len(s.keyList))
	for i := range s.keyList {
		keys[i] = s.Key(s.keyList[i])
	}
	return keys
}
146028
func (s *GlobalStore) keys(addr *common.Address, startKey []byte, limit int) (keys mock.Keys, err error) {
	iter := s.db.NewIterator(nil, nil)
	defer iter.Release()

	if limit <= 0 {
		limit = mock.DefaultLimit
	}

	prefix := []byte{indexForHashesPrefix}
	if addr != nil {
		prefix = indexForHashesPerNodePrefix(*addr)
	}
	if startKey != nil {
		if addr != nil {
			startKey = indexForHashesPerNode(*addr, startKey)
		} else {
			startKey = indexForHashes(startKey)
		}
	} else {
		startKey = prefix
	}

	ok := iter.Seek(startKey)
	if !ok {
		return keys, iter.Error()
	}
	for ; ok; ok = iter.Next() {
		k := iter.Key()
		if !bytes.HasPrefix(k, prefix) {
			break
		}
		key := append([]byte(nil), bytes.TrimPrefix(k, prefix)...)

		if len(keys.Keys) >= limit {
			keys.Next = key
			break
		}

		keys.Keys = append(keys.Keys, key)
	}
	return keys, iter.Error()
}
47974
func (m *MultiMap) Keys() []interface{} {
	keys := make([]interface{}, m.Size())
	count := 0
	for key, value := range m.m {
		for range value {
			keys[count] = key
			count++
		}
	}
	return keys
}
1136867
func (c *LRUExpireCache) Keys() []interface{} {
	c.lock.Lock()
	defer c.lock.Unlock()
	return c.cache.Keys()
}
1185575
func (c *asyncClient) Keys(arg0 string) (result FutureKeys, err Error) {
	arg0bytes := []byte(arg0)

	var resp *PendingResponse
	resp, err = c.conn.QueueRequest(&KEYS, [][]byte{arg0bytes})
	if err == nil {
		result = newFutureKeys(resp.future.(FutureBytes))
	}
	return result, err
}
701983
func (ps *PrefixScanner) Keys() (keys [][]byte, err error) {
	pre := ps.Prefix
	err = ps.db.View(func(tx *bolt.Tx) error {
		c := tx.Bucket(ps.BucketName).Cursor()
		for k, _ := c.Seek(pre); bytes.HasPrefix(k, pre); k, _ = c.Next() {
			keys = append(keys, k)
		}
		return nil
	})
	if err != nil {
		return nil, err
	}
	return keys, err
}
1127030
func keys(m map[string]string) (s []string) {
	for k := range m {
		s = append(s, k)
	}
	sort.Strings(s)
	return
}
615736
func (r *RedisStore) Keys(pattern string) ([]interface{}, error) {
	values, err := r.client.Keys(pattern).Result()

	if len(values) == 0 {
		return nil, err
	}

	newValues := make([]interface{}, len(values))

	for k, v := range values {
		newValues[k] = v
	}

	return newValues, err
}
873434
func Keys(inputMap cty.Value) (cty.Value, error) {
	return KeysFunc.Call([]cty.Value{inputMap})
}
1063505
func (c *ARC) Keys() []interface{} {
	keys := []interface{}{}
	for _, k := range c.keys() {
		_, err := c.GetIFPresent(k)
		if err == nil {
			keys = append(keys, k)
		}
	}
	return keys
}