// All returns all sources from the directory
500483
func (d *Sources) All(ctx context.Context) ([]chronograf.Source, error) {
	files, err := d.ReadDir(d.Dir)
	if err != nil {
		return nil, err
	}

	sources := []chronograf.Source{}
	for _, file := range files {
		if path.Ext(file.Name()) != SrcExt {
			continue
		}
		var source chronograf.Source
		if err := d.Load(path.Join(d.Dir, file.Name()), &source); err != nil {
			var fmtErr = fmt.Errorf("error loading source 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 {
			sources = append(sources, source)
		}
	}
	return sources, nil
}
754591
func (r *Router) All(path string, fn http.HandlerFunc) *Router {
	r.Route(path).All(fn)
	return r
}
43875
func (se *StateEngine) All(addr string) error {
	points, err := se.prepare(addr)

	if err != nil {
		return err
	}

	return se.trajectory(points, false)
}
1178762
func (m *GenericDriver) All() ([]MigrationRecord, error) {
	entries := []MigrationRecord{}

	rows, err := m.DB.Query(m.Dialect.AllSQL())

	if err != nil {
		return []MigrationRecord{}, err
	}

	for rows.Next() {
		var (
			version       float64
			description   string
			checksum      string
			appliedAt     int64
			executionTime float64
		)

		rows.Scan(
			&version,
			&description,
			&checksum,
			&appliedAt,
			&executionTime,
		)

		entry := MigrationRecord{
			Version:       version,
			Description:   description,
			Checksum:      checksum,
			AppliedAt:     time.Unix(appliedAt, 0),
			ExecutionTime: time.Duration(executionTime),
		}

		entries = append(entries, entry)
	}

	rows.Close()

	return entries, nil
}
330142
func (r *ReleasesService) All() (releases []Release, result *Result) {
	result = r.client.get(r.URL, &releases)
	return
}
532231
func (s *MappingsStore) All(ctx context.Context) ([]chronograf.Mapping, error) {
	var mappings []chronograf.Mapping
	err := s.each(ctx, func(m *chronograf.Mapping) {
		mappings = append(mappings, *m)
	})

	if err != nil {
		return nil, err
	}

	return mappings, nil
}
285603
func (i *Index) All() []*Result {
	res := make([]*Result, len(i.charts))
	j := 0
	for name, ch := range i.charts {
		parts := strings.Split(name, verSep)
		res[j] = &Result{
			Name:  parts[0],
			Chart: ch,
		}
		j++
	}
	return res
}
1092912
func (a *AnnotationStore) All(ctx context.Context, start, stop time.Time) ([]chronograf.Annotation, error) {
	return a.queryAnnotations(ctx, fmt.Sprintf(AllAnnotations, start.UnixNano(), stop.UnixNano()))
}
979508
func (r *RepositoriesService) All(uri *Hyperlink, params M) (repos []Repository,
	result *Result) {
	if uri == nil && len(params) == 0 {
		uri = &UserRepositoriesURL
	} else if uri == nil {
		uri = &AllRepositoriesURL
	}
	url, err := uri.Expand(params)
	if err != nil {
		return nil, &Result{Err: err}
	}
	result = r.client.get(url, &repos)
	return
}
498087
func (mod Mod) All() []string {
	all := make(map[string]bool)
	for _, p := range mod.Changed {
		all[p] = true
	}
	for _, p := range mod.Added {
		all[p] = true
	}
	return _keys(all)
}
1138212
func (u *UsersService) All() (users []User, result *Result) {
	result = u.client.get(u.URL, &users)
	return
}
1258551
func (d *Dashboards) All(ctx context.Context) ([]chronograf.Dashboard, error) {
	files, err := d.ReadDir(d.Dir)
	if err != nil {
		return nil, err
	}

	dashboards := []chronograf.Dashboard{}
	for _, file := range files {
		if path.Ext(file.Name()) != DashExt {
			continue
		}
		var dashboard chronograf.Dashboard
		if err := d.Load(path.Join(d.Dir, file.Name()), &dashboard); err != nil {
			continue // We want to load all files we can.
		} else {
			dashboards = append(dashboards, dashboard)
		}
	}
	return dashboards, nil
}
353826
func (multi *SourcesStore) All(ctx context.Context) ([]chronograf.Source, error) {
	all := []chronograf.Source{}
	sourceSet := map[int]struct{}{}

	ok := false
	var err error
	for _, store := range multi.Stores {
		var sources []chronograf.Source
		sources, err = store.All(ctx)
		if err != nil {
			// If this Store is unable to return an array of sources, skip to the
			// next Store.
			continue
		}
		ok = true // We've received a response from at least one Store
		for _, s := range sources {
			// Enforce that the source has a unique ID
			// If the source has been seen before, don't override what we already have
			if _, okay := sourceSet[s.ID]; !okay { // We have a new Source!
				sourceSet[s.ID] = struct{}{} // We just care that the ID is unique
				all = append(all, s)
			}
		}
	}
	if !ok {
		return nil, err
	}
	return all, nil
}
745234
func (t Target) all() []string {
	all := t.initial
	for _, name := range t.dependencies {
		all = append(all, name)
	}
	sort.Strings(all)
	return all
}
139005
func (s *ServersStore) All(ctx context.Context) ([]chronograf.Server, error) {
	var srcs []chronograf.Server
	if err := s.client.db.View(func(tx *bolt.Tx) error {
		var err error
		srcs, err = s.all(ctx, tx)
		if err != nil {
			return err
		}
		return nil
	}); err != nil {
		return nil, err
	}

	return srcs, nil

}
1047723
func GetAllSubDirs(rootPath string) ([]string, error) {
	if !IsDir(rootPath) {
		return nil, errors.New("not a directory or does not exist: " + rootPath)
	}
	return statDir(rootPath, "", true, true, false)
}
972545
func (c *ConfigLookup) All() map[string]types.AuthConfig {
	if c.ConfigFile == nil {
		return map[string]types.AuthConfig{}
	}
	return c.ConfigFile.AuthConfigs
}