// All returns all orgs from the directory
436694
func (o *Organizations) All(ctx context.Context) ([]chronograf.Organization, error) {
	files, err := o.ReadDir(o.Dir)
	if err != nil {
		return nil, err
	}

	orgs := []chronograf.Organization{}
	for _, file := range files {
		if path.Ext(file.Name()) != OrgExt {
			continue
		}
		var org chronograf.Organization
		if err := o.Load(path.Join(o.Dir, file.Name()), &org); err != nil {
			continue // We want to load all files we can.
		} else {
			orgs = append(orgs, org)
		}
	}
	return orgs, nil
}
506981
func (t *TeamsService) All(uri *Hyperlink, uriParams M) (
	teams []Team, result *Result) {
	url, err := ExpandWithDefault(uri, &OrganizationTeamsURL, uriParams)
	if err != nil {
		return []Team(nil), &Result{Err: err}
	}
	result = t.client.get(url, &teams)
	return
}
1278943
func (s *StatusesService) All() (statuses []Status, result *Result) {
	result = s.client.get(s.URL, &statuses)
	return
}
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
}
1312883
func (s *DashboardsStore) All(ctx context.Context) ([]chronograf.Dashboard, error) {
	err := validOrganization(ctx)
	if err != nil {
		return nil, err
	}

	ds, err := s.store.All(ctx)
	if err != nil {
		return nil, err
	}

	// This filters dashboards without allocating
	// https://github.com/golang/go/wiki/SliceTricks#filtering-without-allocating
	dashboards := ds[:0]
	for _, d := range ds {
		if d.Organization == s.organization {
			dashboards = append(dashboards, d)
		}
	}

	return dashboards, nil
}
1228316
func (t *IfNode) All() []Node {
	return []Node{t.Cond, t.Body, t.Else}
}
373450
func (c *ServiceConfigs) All() map[string]*ServiceConfig {
	c.mu.RLock()
	defer c.mu.RUnlock()
	return c.m
}
56334
func (ts *tagStore) All(ctx context.Context) ([]string, error) {
	var tags []string

	pathSpec, err := pathFor(manifestTagPathSpec{
		name: ts.repository.Named().Name(),
	})
	if err != nil {
		return tags, err
	}

	entries, err := ts.blobStore.driver.List(ctx, pathSpec)
	if err != nil {
		switch err := err.(type) {
		case storagedriver.PathNotFoundError:
			return tags, distribution.ErrRepositoryUnknown{Name: ts.repository.Named().Name()}
		default:
			return tags, err
		}
	}

	for _, entry := range entries {
		_, filename := path.Split(entry)
		tags = append(tags, filename)
	}

	return tags, nil
}
351831
func (s *scopeStack) All() map[string]Value {
	res := make(map[string]Value)
	for _, scope := range s.scopes {
		for k, v := range scope {
			res[k] = v
		}
	}
	return res
}
942208
func (query Query) All(record interface{}) error {
	_, err := query.repo.adapter.All(query, record, query.repo.logger...)
	return err
}
926770
func (n *node) All(to interface{}, options ...func(*index.Options)) error {
	opts := index.NewOptions()
	for _, fn := range options {
		fn(opts)
	}

	query := newQuery(n, nil).Limit(opts.Limit).Skip(opts.Skip)
	if opts.Reverse {
		query.Reverse()
	}

	err := query.Find(to)
	if err != nil && err != ErrNotFound {
		return err
	}

	if err == ErrNotFound {
		ref := reflect.ValueOf(to)
		results := reflect.MakeSlice(reflect.Indirect(ref).Type(), 0, 0)
		reflect.Indirect(ref).Set(results)
	}
	return nil
}
1288015
func (c *ClientOperations) All(fn string, args ...interface{}) {
	c.e.callGroupMethod(c.relay, "Global", fn, args...)
}
757922
func (s *Layouts) All(ctx context.Context) ([]chronograf.Layout, error) {
	all := []chronograf.Layout{}
	layoutSet := map[string]chronograf.Layout{}
	ok := false
	var err error
	for _, store := range s.Stores {
		var layouts []chronograf.Layout
		layouts, err = store.All(ctx)
		if err != nil {
			// Try to load as many layouts as possible
			continue
		}
		ok = true
		for _, l := range layouts {
			// Enforce that the layout has a unique ID
			// If the layout has been seen before then skip
			if _, okay := layoutSet[l.ID]; !okay {
				layoutSet[l.ID] = l
				all = append(all, l)
			}
		}
	}
	if !ok {
		return nil, err
	}
	return all, nil
}
1321374
func (d *Kapacitors) All(ctx context.Context) ([]chronograf.Server, error) {
	files, err := d.ReadDir(d.Dir)
	if err != nil {
		return nil, err
	}

	kapacitors := []chronograf.Server{}
	for _, file := range files {
		if path.Ext(file.Name()) != KapExt {
			continue
		}
		var kapacitor chronograf.Server
		if err := d.Load(path.Join(d.Dir, file.Name()), &kapacitor); err != nil {
			var fmtErr = fmt.Errorf("error loading kapacitor configuration from %v:\n%v", path.Join(d.Dir, file.Name()), err)
			d.Logger.Error(fmtErr)
			continue // We want to load all files we can.
		} else {
			kapacitors = append(kapacitors, kapacitor)
		}
	}
	return kapacitors, nil
}
43875
func (se *StateEngine) All(addr string) error {
	points, err := se.prepare(addr)

	if err != nil {
		return err
	}

	return se.trajectory(points, false)
}
1242209
func (t *stringTree) DoAll(f func(v string) error) error {
	return t.container.root.doAll(func(dn *node) error {
		return f(dn.content.value().(string))
	})
}
176702
func (adapter *Adapter) All(query grimoire.Query, doc interface{}, loggers ...grimoire.Logger) (int, error) {
	statement, args := NewBuilder(adapter.Config).Find(query)
	count, err := adapter.Query(doc, statement, args, loggers...)
	return int(count), err
}