// FindAll chocolates
192496
func (c ChocolateResource) FindAll(r api2go.Request) (api2go.Responder, error) {
	usersID, ok := r.QueryParams["usersID"]
	sweets := c.ChocStorage.GetAll()
	if ok {
		// this means that we want to show all sweets of a user, this is the route
		// /v0/users/1/sweets
		userID := usersID[0]
		// filter out sweets with userID, in real world, you would just run a different database query
		filteredSweets := []model.Chocolate{}
		user, err := c.UserStorage.GetOne(userID)
		if err != nil {
			return &Response{}, err
		}
		for _, sweetID := range user.ChocolatesIDs {
			sweet, err := c.ChocStorage.GetOne(sweetID)
			if err != nil {
				return &Response{}, err
			}
			filteredSweets = append(filteredSweets, sweet)
		}

		return &Response{Res: filteredSweets}, nil
	}
	return &Response{Res: sweets}, nil
}
459929
func (b *Backend) GetAll(c context.Context, t backend.GetAllTarget, path string, p backend.Params) (
	[]*config.Config, error) {

	items, err := b.B.GetAll(c, t, path, p)
	if err != nil {
		return nil, err
	}

	if !p.FormatSpec.Unformatted() {
		formatter, err := getFormatter(p.FormatSpec.Formatter)
		if err != nil {
			return nil, errors.Annotate(err, "failed to get formatter for %q, data %q",
				p.FormatSpec.Formatter, p.FormatSpec.Data).Err()
		}

		lme := errors.NewLazyMultiError(len(items))
		for i, item := range items {
			if err := b.formatItem(item, formatter, p.FormatSpec); err != nil {
				lme.Assign(i, err)
			}
		}

		if err := lme.Get(); err != nil {
			return nil, errors.Annotate(err, "failed to format items to %q, data %q",
				p.FormatSpec.Formatter, p.FormatSpec.Data).Err()
		}
	}
	return items, nil
}
751675
func (svc *S3Accessor) GetAll(ctx context.Context,
	ctor NewObjectConstructor) ([]interface{}, error) {

	listObjectInput := &s3.ListObjectsInput{
		Bucket: aws.String(svc.s3BucketName()),
	}

	listObjectResult, listObjectResultErr := svc.
		s3Svc(ctx).
		ListObjectsWithContext(ctx, listObjectInput)

	if listObjectResultErr != nil {
		return nil, listObjectResultErr
	}
	allObjects := make([]interface{}, 0)
	for _, eachObject := range listObjectResult.Contents {
		objectInstance := ctor()
		entryEntryErr := svc.Get(ctx, *eachObject.Key, objectInstance)
		if entryEntryErr != nil {
			return nil, entryEntryErr
		}
		allObjects = append(allObjects, objectInstance)
	}
	return allObjects, nil
}
861735
func (b *Backend) GetAll(c context.Context, t backend.GetAllTarget, path string, p backend.Params) ([]*config.Config, error) {
	key := Key{
		Schema:       Schema,
		ServiceURL:   b.keyServiceURL(c),
		Authority:    p.Authority,
		Op:           OpGetAll,
		Content:      p.Content,
		Path:         path,
		GetAllTarget: t,
		Formatter:    p.FormatSpec.Formatter,
		FormatData:   p.FormatSpec.Data,
	}
	value, err := b.CacheGet(c, key, b.loader)
	if err != nil {
		if b.FailOnError {
			log.Fields{
				log.ErrorKey: err,
				"authority":  p.Authority,
				"type":       t,
				"path":       path,
			}.Errorf(c, "(Hard Failure) failed to load cache value.")
			return nil, errors.Annotate(err, "").Err()
		}

		log.Fields{
			log.ErrorKey: err,
			"authority":  p.Authority,
			"type":       t,
			"path":       path,
		}.Warningf(c, "Failed to load cache value.")
		return b.B.GetAll(c, t, path, p)
	}
	return value.ConfigItems(), nil
}
615983
func (p *Packfile) GetAll() (storer.EncodedObjectIter, error) {
	return p.GetByType(plumbing.AnyObject)
}
408710
func (t *Tree) All() []*Elem {
	if t.Root == nil {
		return nil
	}
	found := t.Root.all(nil)
	return found
}
225943
func FindAll() []P {
	pss, err := ps.Processes()
	if err != nil {
		return nil
	}

	var wg sync.WaitGroup
	wg.Add(len(pss))
	found := make(chan P)

	for _, pr := range pss {
		pr := pr
		go func() {
			defer wg.Done()

			path, version, agent, ok, err := isGo(pr)
			if err != nil {
				// TODO(jbd): Return a list of errors.
			}
			if !ok {
				return
			}
			found <- P{
				PID:          pr.Pid(),
				PPID:         pr.PPid(),
				Exec:         pr.Executable(),
				Path:         path,
				BuildVersion: version,
				Agent:        agent,
			}
		}()
	}
	go func() {
		wg.Wait()
		close(found)
	}()
	var results []P
	for p := range found {
		results = append(results, p)
	}
	return results
}
309816
func (this Collection) FindAll(s interface{}) Collection {
    re := getRegexp(s)
    var result Collection
    for _, c := range this {
        result = append(result, c.FindAll(re)...)
    }

    return result
}
64891
func (this *Context) FindAll(re interface{}) Collection {
    r := getRegexp(re)

    matches := r.FindAllSubmatch(this.Bytes(), -1)

    names := make(map[string]int)

    for k, v := range r.SubexpNames() {
        if v != "" {
            names[v] = k
        }
    }

    result := make(Collection, len(matches))
    for i, match := range matches {
        result[i] = &Context {
            Parent: this,
            List: match,
            Names: names,
        }
    }

    return result
}
90658
func (this Collection) Find(s interface{}) *Context {
    re := getRegexp(s)

    for _, c := range this {
        cc := c.Find(re)
        if !cc.Empty() {
            return cc
        }
    }

    return NewDoc(nil)
}
1270093
func (s *DbSession) FindAll(query Q, document Document) (interface{}, error) {
	fn := func(q *mgo.Query, result interface{}) error {
		return q.All(result)
	}
	return s.executeFindAll(query, document, fn)
}
628165
func (set IdentifierSet) ContainsAll(i ...Identifier) bool {
	for _, v := range i {
		if !set.Contains(v) {
			return false
		}
	}
	return true
}
837857
func (s *session) FindFields(keys KeyList, container TableListContainer, fields ...string) error {
	action, err := s.find(keys, container, getOptions{}, fields)
	if err != nil {
		return s.catch("Find: "+action, err)
	}
	return nil
}
944126
func (c *CIDR) MatchesAll() bool {
	for _, wildcard := range CIDRMatchAll {
		if *c == wildcard {
			return true
		}
	}
	return false
}
936133
func (set LiteralFieldSet) ContainsAll(i ...LiteralField) bool {
	for _, v := range i {
		if !set.Contains(v) {
			return false
		}
	}
	return true
}
1170897
func (t *LaunchTemplate) findAllLaunchTemplates(c *fi.Context) ([]*ec2.LaunchTemplate, error) {
	var list []*ec2.LaunchTemplate

	cloud := c.Cloud.(awsup.AWSCloud)

	var next *string
	for {
		resp, err := cloud.EC2().DescribeLaunchTemplates(&ec2.DescribeLaunchTemplatesInput{
			NextToken: next,
		})
		if err != nil {
			return nil, err
		}
		for _, x := range resp.LaunchTemplates {
			list = append(list, x)
		}

		if resp.NextToken == nil {
			return list, nil
		}
		next = resp.NextToken
	}
}
875305
func (s *Session) GetAll() map[string]interface{} {
	items := make(map[string]interface{}, s.provider.db.Len(s.sid))
	s.mu.RLock()
	s.provider.db.Visit(s.sid, func(key string, value interface{}) {
		items[key] = value
	})
	s.mu.RUnlock()
	return items
}