// All returns a slice of strings containing all the keys currently
// in the MemoryStore.
169464
func (store *MemoryStore) All() []string {
	store.RLock()
	defer store.RUnlock()
	if !store.opened {
		ERROR.Println(STR, "Trying to use memory store, but not open")
		return nil
	}
	keys := []string{}
	for k := range store.messages {
		keys = append(keys, k)
	}
	return keys
}
940781
func (s ChocolateStorage) GetAll() []model.Chocolate {
	result := []model.Chocolate{}
	for key := range s.chocolates {
		result = append(result, *s.chocolates[key])
	}

	sort.Sort(byID(result))
	return result
}
371658
func (c *Cache) Keys() [][]byte {
	c.mu.RLock()
	store := c.store
	c.mu.RUnlock()
	return store.keys(true)
}
1016806
func (s *GlobalStore) Keys(startKey []byte, limit int) (keys mock.Keys, err error) {
	return s.keys(nil, startKey, limit)
}
1114710
func (store *KapacitorStore) All(ctx context.Context) ([]chronograf.Server, error) {
	if store.Kapacitor != nil {
		return []chronograf.Server{*store.Kapacitor}, nil
	}
	return nil, nil
}
561027
func (s *GlobalStore) Keys(startKey []byte, limit int) (keys mock.Keys, err error) {
	s.mu.RLock()
	defer s.mu.RUnlock()

	var i int
	if startKey != nil {
		i, _ = s.keyIndex(startKey)
	}
	total := len(s.keys)
	max := maxIndex(i, limit, total)
	keys.Keys = make([][]byte, 0, max-i)
	for ; i < max; i++ {
		keys.Keys = append(keys.Keys, append([]byte(nil), s.keys[i]...))
	}
	if total > max {
		keys.Next = s.keys[max]
	}
	return keys, nil
}
252274
func (d *Drain) All() []error {
	if d == nil || len(d.errors) == 0 {
		return nil
	}
	a := make([]error, 0, len(d.errors))
	return append(a, d.errors...)
}
1309682
func (k *PublicKeysService) All(uri *Hyperlink, uriParams M) (keys []Key, result *Result) {
	url, err := ExpandWithDefault(uri, &CurrentPublicKeyUrl, uriParams)
	if err != nil {
		return nil, &Result{Err: err}
	}

	result = k.client.get(url, &keys)
	return
}
981417
func (um *UserMap) All() []User {
	um.Lock()

	users := make([]User, len(um.Map))
	for _, user := range um.Map {
		users = append(users, user)
	}

	um.Unlock()
	return users
}
824374
func (s *stringStack) All() []string {
	sl := len(s.values)
	all := make([]string, sl)
	copy(all, s.values)
	return all
}
286479
func (p *KeyValueServiceClient) GetAll(keys []string) (r []string, err error) {
	if err = p.sendGetAll(keys); err != nil {
		return
	}
	return p.recvGetAll()
}
1046912
func (pd *DocumentIterator) All(document Document) (interface{}, error) {
	pd.loadInternal()

	documents := slice(document)
	err := pd.iterator.All(documents)
	if err != nil {
		return nil, err
	}

	return results(documents)
}
1020773
func (multi *OrganizationsStore) All(ctx context.Context) ([]chronograf.Organization, error) {
	all := []chronograf.Organization{}
	orgSet := map[string]struct{}{}

	ok := false
	var err error
	for _, store := range multi.Stores {
		var orgs []chronograf.Organization
		orgs, err = store.All(ctx)
		if err != nil {
			// If this Store is unable to return an array of orgs, skip to the
			// next Store.
			continue
		}
		ok = true // We've received a response from at least one Store
		for _, org := range orgs {
			// Enforce that the org has a unique ID
			// If the ID has been seen before, ignore the org
			if _, okay := orgSet[org.ID]; !okay { // We have a new org
				orgSet[org.ID] = struct{}{} // We just care that the ID is unique
				all = append(all, org)
			}
		}
	}
	if !ok {
		return nil, err
	}
	return all, nil
}
166170
func (rh *HashMap) All() ([]string, error) {
	conn := rh.pool.Get(rh.dbindex)
	result, err := redis.Values(conn.Do("KEYS", rh.id+":*"))
	strs := make([]string, len(result))
	idlen := len(rh.id)
	for i := 0; i < len(result); i++ {
		strs[i] = getString(result, i)[idlen+1:]
	}
	return strs, err
}
104208
func (sm StringMap) Keys() []string {
	keys := []string{}
	for k := range sm {
		keys = append(keys, k)
	}
	return keys
}
522639
func (h *HashMap) All() ([]string, error) {
	var (
		values []string
		value  string
	)
	rows, err := h.host.db.Query(fmt.Sprintf("SELECT %s FROM %s", ownerCol, h.table))
	if err != nil {
		return values, err
	}
	if rows == nil {
		return values, ErrNoAvailableValues
	}
	defer rows.Close()
	for rows.Next() {
		err = rows.Scan(&value)
		if !h.host.rawUTF8 {
			Decode(&value)
		}
		values = append(values, value)
		if err != nil {
			return values, err
		}
	}
	err = rows.Err()
	return values, err
}
272059
func (r *Registry) All(kind string) []mo.Entity {
	r.m.Lock()
	defer r.m.Unlock()

	var entities []mo.Entity
	for ref, val := range r.objects {
		if kind == "" || ref.Type == kind {
			if e, ok := val.(mo.Entity); ok {
				entities = append(entities, e)
			}
		}
	}

	return entities
}