// List lists the buildclient using the OpenShift client.
544
func (c *ClientBuildConfigLister) List(label labels.Selector) ([]*buildv1.BuildConfig, error) {
	list, err := c.client.BuildConfigs(metav1.NamespaceAll).List(metav1.ListOptions{LabelSelector: label.String()})
	return buildConfigListToPointerArray(list), err
}
1169483
func (f *fsClient) List(isRecursive, isIncomplete bool, showDir DirOpt) <-chan *clientContent {
	contentCh := make(chan *clientContent)
	filteredCh := make(chan *clientContent)

	if isRecursive {
		if showDir == DirNone {
			go f.listRecursiveInRoutine(contentCh)
		} else {
			go f.listDirOpt(contentCh, isIncomplete, showDir)
		}
	} else {
		go f.listInRoutine(contentCh)
	}

	// This function filters entries from any  listing go routine
	// created previously. If isIncomplete is activated, we will
	// only show partly uploaded files,
	go func() {
		for c := range contentCh {
			if isIncomplete {
				if !strings.HasSuffix(c.URL.Path, partSuffix) {
					continue
				}
				// Strip part suffix
				c.URL.Path = strings.Split(c.URL.Path, partSuffix)[0]
			} else {
				if strings.HasSuffix(c.URL.Path, partSuffix) {
					continue
				}
			}
			// Send to filtered channel
			filteredCh <- c
		}
		defer close(filteredCh)
	}()

	return filteredCh
}
123196
func (p *Project) List() ([]types.Container, error) {
	filters := filters.NewArgs()
	for key, value := range p.Labels {
		filters.Add("label", fmt.Sprintf("%s=%s", key, value))
	}
	containers, err := p.Client.ContainerList(context.Background(), types.ContainerListOptions{
		Filters: filters,
	})
	if err != nil {
		return nil, err
	}
	return containers, nil
}
322795
func (s *DeploysService) List(options *ListOptions) ([]Deploy, *Response, error) {
	deploys := new([]Deploy)

	reqOptions := &RequestOptions{QueryParams: options.toQueryParamsMap()}

	resp, err := s.client.Request("GET", s.apiPath(), reqOptions, deploys)

	for _, deploy := range *deploys {
		deploy.client = s.client
	}

	return *deploys, resp, err
}
180719
func (cs ClientsService) List(query Query, token string) ([]Client, error) {
	requestPath := url.URL{
		Path: "/oauth/clients",
		RawQuery: url.Values{
			"filter": []string{query.Filter},
			"sortBy": []string{query.SortBy},
		}.Encode(),
	}

	resp, err := newNetworkClient(cs.config).MakeRequest(network.Request{
		Method:                "GET",
		Path:                  requestPath.String(),
		Authorization:         network.NewTokenAuthorization(token),
		AcceptableStatusCodes: []int{http.StatusOK},
	})
	if err != nil {
		return []Client{}, translateError(err)
	}

	var document documents.ClientListResponse
	err = json.Unmarshal(resp.Body, &document)
	if err != nil {
		return []Client{}, MalformedResponseError{err}
	}

	var list []Client
	for _, c := range document.Resources {
		list = append(list, newClientFromDocument(c))
	}

	return list, nil
}
1101165
func (r *Remote) List(o *ListOptions) (rfs []*plumbing.Reference, err error) {
	s, err := newUploadPackSession(r.c.URLs[0], o.Auth)
	if err != nil {
		return nil, err
	}

	defer ioutil.CheckClose(s, &err)

	ar, err := s.AdvertisedReferences()
	if err != nil {
		return nil, err
	}

	allRefs, err := ar.AllReferences()
	if err != nil {
		return nil, err
	}

	refs, err := allRefs.IterReferences()
	if err != nil {
		return nil, err
	}

	var resultRefs []*plumbing.Reference
	refs.ForEach(func(ref *plumbing.Reference) error {
		resultRefs = append(resultRefs, ref)
		return nil
	})

	return resultRefs, nil
}
654017
func (g *GKEClusterLister) List(projectID, zone string) (*container.ListClustersResponse, error) {
	return g.svc.Projects.Zones.Clusters.List(projectID, zone).Do()
}
467859
func (f FakeClusterLister) List(projectID, zone string) (*container.ListClustersResponse, error) {
	return f.Resp, f.Err
}
574967
func (f FakeLister) List(opts api.ListOptions) (*api.ServiceList, error) {
	return f.SvcList, f.Err
}
845318
func (js *JobsService) ListFromBuild(buildId uint) ([]Job, *http.Response, error) {
	u, err := urlWithOptions(fmt.Sprintf("/builds/%d", buildId), nil)
	if err != nil {
		return nil, nil, err
	}

	req, err := js.client.NewRequest("GET", u, nil, nil)
	if err != nil {
		return nil, nil, err
	}

	var buildResp getBuildResponse
	resp, err := js.client.Do(req, &buildResp)
	if err != nil {
		return nil, resp, err
	}

	return buildResp.Jobs, resp, err
}
251548
func (s *Service) BuildList(ctx context.Context, appIdentity string, lr *ListRange) (BuildListResult, error) {
	var build BuildListResult
	return build, s.Get(ctx, &build, fmt.Sprintf("/apps/%v/builds", appIdentity), nil, lr)
}
203183
func (o *Organization) ListBuilds(ctx context.Context, projectUUID string, opts ...PaginationOption) (BuildList, Response, error) {
	path, err := paginate(fmt.Sprintf("/organizations/%s/projects/%s/builds", o.UUID, projectUUID), opts...)
	if err != nil {
		return BuildList{}, Response{}, errors.Wrap(err, "unable to list builds")
	}

	body, resp, err := o.client.request(ctx, "GET", path, nil)
	if err != nil {
		return BuildList{}, resp, errors.Wrap(err, "unable to list builds")
	}

	var builds BuildList
	if err = json.Unmarshal(body, &builds); err != nil {
		return BuildList{}, resp, errors.Wrap(err, "unable to unmarshal response into BuildList")
	}

	return builds, resp, nil
}
3887
func (f *Registry) List() []Description {
	names := make([]string, 0, len(f.facades))
	for name := range f.facades {
		names = append(names, name)
	}
	sort.Strings(names)
	descriptions := make([]Description, 0, len(f.facades))
	for _, name := range names {
		facades := f.facades[name]
		description := descriptionFromVersions(name, facades)
		if len(description.Versions) > 0 {
			descriptions = append(descriptions, description)
		}
	}
	return descriptions
}
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})
}
703789
func (s *ServicesClient) List(ctx context.Context, orgIDs, projectIDs, teamIDs []identity.ID, names []string) ([]envelope.Service, error) {
	v := &url.Values{}
	for _, id := range orgIDs {
		v.Add("org_id", id.String())
	}
	for _, id := range projectIDs {
		v.Add("project_id", id.String())
	}
	for _, id := range teamIDs {
		v.Add("team_id", id.String())
	}
	for _, n := range names {
		v.Add("name", n)
	}

	var services []envelope.Service
	err := s.client.RoundTrip(ctx, "GET", "/services", v, nil, &services)
	return services, err
}
1267440
func List(c *deis.Client, appID string, results int) ([]api.Build, int, error) {
	u := fmt.Sprintf("/v2/apps/%s/builds/", appID)
	body, count, reqErr := c.LimitedRequest(u, results)

	if reqErr != nil && !deis.IsErrAPIMismatch(reqErr) {
		return []api.Build{}, -1, reqErr
	}

	var builds []api.Build
	if err := json.Unmarshal([]byte(body), &builds); err != nil {
		return []api.Build{}, -1, err
	}

	return builds, count, reqErr
}
1100807
func (s *Server) List(ctx context.Context, q *ApplicationQuery) (*appv1.ApplicationList, error) {
	appList, err := s.appclientset.ArgoprojV1alpha1().Applications(s.ns).List(metav1.ListOptions{})
	if err != nil {
		return nil, err
	}
	newItems := make([]appv1.Application, 0)
	for _, a := range appList.Items {
		if s.enf.Enforce(ctx.Value("claims"), rbacpolicy.ResourceApplications, rbacpolicy.ActionGet, appRBACName(a)) {
			newItems = append(newItems, a)
		}
	}
	newItems = argoutil.FilterByProjects(newItems, q.Projects)
	for i := range newItems {
		app := newItems[i]
		newItems[i] = app
	}
	appList.Items = newItems
	return appList, nil
}