// All is all Roles in influx
545833
func (c *RolesStore) All(ctx context.Context) ([]chronograf.Role, error) {
	all, err := c.Ctrl.Roles(ctx, nil)
	if err != nil {
		return nil, err
	}

	return all.ToChronograf(), nil
}
408710
func (t *Tree) All() []*Elem {
	if t.Root == nil {
		return nil
	}
	found := t.Root.all(nil)
	return found
}
43875
func (se *StateEngine) All(addr string) error {
	points, err := se.prepare(addr)

	if err != nil {
		return err
	}

	return se.trajectory(points, false)
}
720737
func (s *SourcesStore) All(ctx context.Context) ([]chronograf.Source, error) {
	return s.AllF(ctx)
}
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...)
}
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
}
1002154
func (s *PositionService) All() (*bitfinex.PositionSnapshot, error) {
	req, err := s.requestFactory.NewAuthenticatedRequest("positions")
	if err != nil {
		return nil, err
	}
	raw, err := s.Request(req)

	if err != nil {
		return nil, err
	}

	os, err := bitfinex.NewPositionSnapshotFromRaw(raw)
	if err != nil {
		return nil, err
	}

	return os, nil
}
747309
func (this *Server) All(path string, fn ...func(*Request, *Response, func())) {
	for _, verb := range httphelp.Methods {
		this.Verb(verb, path, fn...)
	}
}
560722
func (a *AuthorizationsService) All() (auths []Authorization, result *Result) {
	result = a.client.get(a.URL, &auths)
	return
}
942208
func (query Query) All(record interface{}) error {
	_, err := query.repo.adapter.All(query, record, query.repo.logger...)
	return err
}
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
}
330142
func (r *ReleasesService) All() (releases []Release, result *Result) {
	result = r.client.get(r.URL, &releases)
	return
}
740109
func (g *GistsService) All(uri *Hyperlink, uriParams M) (gists []Gist, result *Result) {
	url, err := ExpandWithDefault(uri, &GistsURL, uriParams)
	if err != nil {
		return nil, &Result{Err: err}
	}

	result = g.client.get(url, &gists)
	return
}
51187
func (r *CollaboratorsService) All(uri *Hyperlink, params M) (users []User,
	result *Result) {
	if uri == nil {
		uri = &CollaboratorsURL
	}
	url, err := uri.Expand(params)
	if err != nil {
		return nil, &Result{Err: err}
	}
	result = r.client.get(url, &users)
	return
}
724788
func (s *Service) findAllTasks(ctx context.Context, tx Tx, filter influxdb.TaskFilter) ([]*influxdb.Task, int, error) {
	var ts []*influxdb.Task

	taskBucket, err := tx.Bucket(taskBucket)
	if err != nil {
		return nil, 0, ErrUnexpectedTaskBucketErr(err)
	}

	c, err := taskBucket.Cursor()
	if err != nil {
		return nil, 0, ErrUnexpectedTaskBucketErr(err)
	}
	// we can filter by orgID
	if filter.After != nil {

		key, err := taskKey(*filter.After)
		if err != nil {
			return nil, 0, err
		}
		// ignore the key:val returned in this seek because we are starting "after"
		// this key
		c.Seek(key)
	} else {
		k, v := c.First()
		if k == nil {
			return ts, len(ts), nil
		}

		t := &influxdb.Task{}
		if err := json.Unmarshal(v, t); err != nil {
			return nil, 0, ErrInternalTaskServiceError(err)
		}
		latestCompleted, err := s.findLatestCompletedTime(ctx, tx, t.ID)
		if err != nil {
			return nil, 0, err
		}
		if !latestCompleted.IsZero() {
			t.LatestCompleted = latestCompleted.Format(time.RFC3339)
		} else {
			t.LatestCompleted = t.CreatedAt
		}
		// insert the new task into the list
		ts = append(ts, t)
	}

	// if someone has a limit of 1
	if len(ts) >= filter.Limit {
		return ts, len(ts), nil
	}

	for {
		k, v := c.Next()
		if k == nil {
			break
		}
		t := &influxdb.Task{}
		if err := json.Unmarshal(v, t); err != nil {
			return nil, 0, ErrInternalTaskServiceError(err)
		}
		latestCompleted, err := s.findLatestCompletedTime(ctx, tx, t.ID)
		if err != nil {
			return nil, 0, err
		}
		if !latestCompleted.IsZero() {
			t.LatestCompleted = latestCompleted.Format(time.RFC3339)
		} else {
			t.LatestCompleted = t.CreatedAt
		}
		// insert the new task into the list
		ts = append(ts, t)

		// Check if we are over running the limit
		if len(ts) >= filter.Limit {
			break
		}
	}
	return ts, len(ts), err
}
528082
func (s *SourcesStore) All(ctx context.Context) ([]chronograf.Source, error) {
	err := validRole(ctx)
	if err != nil {
		return nil, err
	}

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

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

	return sources, 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
}