// List retrieves a list of registered routes.
760290
func (r *RoutesService) List(options *ListRoutesOptions) ([]*Route, *http.Response, error) {
	return r.ListWithContext(context.TODO(), options)
}
196835
func (s *Server) List(ctx context.Context, q *ClusterQuery) (*appv1.ClusterList, error) {
	clusterList, err := s.db.ListClusters(ctx)
	if err != nil {
		return nil, err
	}
	clustersByServer := make(map[string][]appv1.Cluster)
	for _, clust := range clusterList.Items {
		if s.enf.Enforce(ctx.Value("claims"), rbacpolicy.ResourceClusters, rbacpolicy.ActionGet, clust.Server) {
			clustersByServer[clust.Server] = append(clustersByServer[clust.Server], clust)
		}
	}
	servers := make([]string, 0)
	for server := range clustersByServer {
		servers = append(servers, server)
	}

	items := make([]appv1.Cluster, len(servers))
	err = util.RunAllAsync(len(servers), func(i int) error {
		clusters := clustersByServer[servers[i]]
		clust := clusters[0]
		warningMessage := ""
		if len(clusters) > 1 {
			warningMessage = fmt.Sprintf("There are %d credentials configured this cluster.", len(clusters))
		}
		if clust.ConnectionState.Status == "" {
			clust.ConnectionState = s.getConnectionState(ctx, clust, warningMessage)
		}
		items[i] = *redact(&clust)
		return nil
	})
	if err != nil {
		return nil, err
	}

	clusterList.Items = items
	return clusterList, err
}
32949
func (c *PreparedQuery) List(q *QueryOptions) ([]*PreparedQueryDefinition, *QueryMeta, error) {
	var out []*PreparedQueryDefinition
	qm, err := c.c.query("/v1/query", &out, q)
	if err != nil {
		return nil, nil, err
	}
	return out, qm, nil
}
1303296
func (l *LatencyInjector) List(ctx context.Context, prefix string) ([]string, error) {
	l.addLatency()
	return l.backend.List(ctx, prefix)
}
518694
func (c *TrackerController) List(ctx *app.ListTrackerContext) error {
	var trkrs []remoteworkitem.Tracker
	err := application.Transactional(c.db, func(appl application.Application) error {
		var err error
		trkrs, err = appl.Trackers().List(ctx)
		return err
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	res := &app.TrackerList{}
	res.Data = ConvertTrackers(ctx.Request, trkrs)
	return ctx.OK(res)
}
479502
func (r *KeyResource) List() ([]*Key, error) {
	keys := []*Key{}
	const path = "/user/keys"

	if err := r.client.do("GET", path, nil, &keys); err != nil {
		return nil, err
	}

	return keys, nil
}
1310527
func (d *driver) List(context context.Context, path string) ([]string, error) {
	var query *storage.Query
	query = &storage.Query{}
	query.Delimiter = "/"
	query.Prefix = d.pathToDirKey(path)
	list := make([]string, 0, 64)
	for {
		objects, err := storageListObjects(d.context(context), d.bucket, query)
		if err != nil {
			return nil, err
		}
		for _, object := range objects.Results {
			// GCS does not guarantee strong consistency between
			// DELETE and LIST operations. Check that the object is not deleted,
			// and filter out any objects with a non-zero time-deleted
			if object.Deleted.IsZero() && object.ContentType != uploadSessionContentType {
				list = append(list, d.keyToPath(object.Name))
			}
		}
		for _, subpath := range objects.Prefixes {
			subpath = d.keyToPath(subpath)
			list = append(list, subpath)
		}
		query = objects.Next
		if query == nil {
			break
		}
	}
	if path != "/" && len(list) == 0 {
		// Treat empty response as missing directory, since we don't actually
		// have directories in Google Cloud Storage.
		return nil, storagedriver.PathNotFoundError{Path: path}
	}
	return list, nil
}
1178100
func (c *ProvidersClient) List(ctx context.Context, opts *ProvidersListOpts) *ProviderIter {
	iter := ProviderIter{
		first: true,
		i:     -1,
	}

	p := "/providers/"

	var q url.Values
	if opts != nil {
		q = make(url.Values)
		if opts.Label != nil {
			q.Set("label", *opts.Label)
		}
	}

	var req *http.Request
	req, iter.err = c.backend.NewRequest(http.MethodGet, p, q, nil)
	if iter.err != nil {
		return &iter
	}

	_, iter.err = c.backend.Do(ctx, req, &iter.page, func(code int) error {
		if code == 500 {
			return &Error{}
		}
		return nil
	})
	return &iter
}
210609
func (s *TokensService) List(ctx context.Context, opt *TokensListOpts) (*token.TokenList, error) {
	tokenList := &token.TokenList{}
	return tokenList, s.client.List(ctx, tokensUrl, opt, tokenList)
}
105649
func (c *FeaturesController) List(ctx *app.ListFeaturesContext) error {
	return proxy.RouteHTTP(ctx, c.config.GetTogglesServiceURL())
}
276585
func (s ingressRouteNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.IngressRoute, err error) {
	err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
		ret = append(ret, m.(*v1alpha1.IngressRoute))
	})
	return ret, err
}
1193924
func (c *FilterController) List(ctx *app.ListFilterContext) error {
	var arr []*app.Filters
	arr = append(arr,
		&app.Filters{
			Attributes: &app.FilterAttributes{
				Title:       "Assignee",
				Description: "Filter by assignee",
				Type:        "users",
				Query:       fmt.Sprintf("filter[%s]={id}", filterKeyAssignee),
				Key:         filterKeyAssignee,
			},
			Type: "filters",
		},
		&app.Filters{
			Attributes: &app.FilterAttributes{
				Title:       "Creator",
				Description: "Filter by creator",
				Type:        "users",
				Query:       fmt.Sprintf("filter[%s]={id}", filterKeyCreator),
				Key:         filterKeyCreator,
			},
			Type: "filters",
		},
		&app.Filters{
			Attributes: &app.FilterAttributes{
				Title:       "Area",
				Query:       fmt.Sprintf("filter[%s]={id}", filterKeyArea),
				Key:         filterKeyArea,
				Description: "Filter by area",
				Type:        "areas",
			},
			Type: "filters",
		},
		&app.Filters{
			Attributes: &app.FilterAttributes{
				Title:       "Iteration",
				Query:       fmt.Sprintf("filter[%s]={id}", filterKeyIteration),
				Key:         filterKeyIteration,
				Description: "Filter by iteration",
				Type:        "iterations",
			},
			Type: "filters",
		},
		&app.Filters{
			Attributes: &app.FilterAttributes{
				Title:       "Type",
				Query:       fmt.Sprintf("filter[%s]={id}", filterKeyWorkItemType),
				Key:         filterKeyWorkItemType,
				Description: "Filter by type",
				Type:        "workitemtypes",
			},
			Type: "filters",
		},
		&app.Filters{
			Attributes: &app.FilterAttributes{
				Title:       "State",
				Query:       fmt.Sprintf("filter[%s]={id}", filterKeyState),
				Key:         filterKeyState,
				Description: "Filter by state",
				Type:        "state",
			},
			Type: "filters",
		},
		&app.Filters{
			Attributes: &app.FilterAttributes{
				Title:       "Label",
				Query:       fmt.Sprintf("filter[%s]={id}", filterKeyLabel),
				Key:         filterKeyLabel,
				Description: "Filter by label",
				Type:        "labels",
			},
			Type: "filters",
		},
		&app.Filters{
			Attributes: &app.FilterAttributes{
				Title:       "Title",
				Query:       fmt.Sprintf("filter[%s]={id}", filterKeyTitle),
				Key:         filterKeyTitle,
				Description: "Filter by title",
				Type:        "title", // not really used anywhere
			},
			Type: "filters",
		},
	)
	result := &app.FilterList{
		Data: arr,
	}
	// compute an ETag based on the type and query of each filter
	filterEtagData := make([]app.ConditionalRequestEntity, len(result.Data))
	for i, filter := range result.Data {
		filterEtagData[i] = FilterEtagData{
			Type:  filter.Attributes.Type,
			Query: filter.Attributes.Query,
		}
	}
	ctx.ResponseData.Header().Set(app.ETag, app.GenerateEntitiesTag(filterEtagData))
	// set now as the last modified date
	ctx.ResponseData.Header().Set(app.LastModified, app.ToHTTPTime(time.Now()))
	// cache-control
	ctx.ResponseData.Header().Set(app.CacheControl, c.config.GetCacheControlFilters())
	return ctx.OK(result)
}
1228993
func (p *Proxy) List() (data [][]string) {
	lumber.Trace("Proxy listing subscriptions...")
	p.RLock()
	data = p.subscriptions.ToSlice()
	p.RUnlock()

	return
}
54294
func (s *Session) List(q *QueryOptions) ([]*SessionEntry, *QueryMeta, error) {
	var entries []*SessionEntry
	qm, err := s.c.query("/v1/session/list", &entries, q)
	if err != nil {
		return nil, nil, err
	}
	return entries, qm, nil
}
1065818
func (b *AccountController) List(c *app.ListAccountContext) error {
	accounts := b.db.GetAccounts()
	res := make(app.AccountTinyCollection, len(accounts))
	for i, account := range accounts {
		a := &app.AccountTiny{
			ID:   account.ID,
			Href: app.AccountHref(account.ID),
			Name: account.Name,
		}
		res[i] = a
	}
	return c.OKTiny(res)
}
399827
func (c *EndpointsController) List(ctx *app.ListEndpointsContext) error {
	c.endpointsLock.Lock()
	defer c.endpointsLock.Unlock()
	if c.endpoints == nil {
		endpoints, err := getEndpoints(ctx, c.FileHandler)
		if err != nil || endpoints == nil {
			log.Error(ctx, map[string]interface{}{
				"err":  errs.WithStack(err),
				"file": embeddedSwaggerSpecFile,
			}, err.Error())
			return jsonapi.JSONErrorResponse(ctx, errs.WithStack(err))
		}
		c.endpoints = endpoints
	}
	return ctx.OK(&app.EndpointSingle{Data: c.endpoints})
}
862744
func (pts *PipelineTemplatesService) List(ctx context.Context) (pt []*PipelineTemplate, resp *APIResponse, err error) {
	apiVersion, err := pts.client.getAPIVersion(ctx, "admin/templates")
	if err != nil {
		return nil, nil, err
	}

	ptr := PipelineTemplatesResponse{}
	_, resp, err = pts.client.getAction(ctx, &APIClientRequest{
		Path:         "admin/templates",
		APIVersion:   apiVersion,
		ResponseBody: &ptr,
	})
	pt = ptr.Embedded.Templates

	return
}