// AppsList lists apps on the Deis controller.
769752
func AppsList(results int) error {
	c, err := client.New()

	if err != nil {
		return err
	}

	if results == defaultLimit {
		results = c.ResponseLimit
	}

	apps, count, err := apps.List(c, results)

	if err != nil {
		return err
	}

	fmt.Printf("=== Apps%s", limitCount(len(apps), count))

	sort.Sort(apps)
	for _, app := range apps {
		fmt.Println(app.ID)
	}
	return nil
}
1157002
func (c *Client) DomainList(appIdentity string, lr *ListRange) ([]Domain, error) {
	req, err := c.NewRequest("GET", "/apps/"+appIdentity+"/domains", nil, nil)
	if err != nil {
		return nil, err
	}

	if lr != nil {
		lr.SetHeader(req)
	}

	var domainsRes []Domain
	return domainsRes, c.DoReq(req, &domainsRes)
}
345975
func (s *Service) AppWebhookList(ctx context.Context, appIdentity string, lr *ListRange) (AppWebhookListResult, error) {
	var appWebhook AppWebhookListResult
	return appWebhook, s.Get(ctx, &appWebhook, fmt.Sprintf("/apps/%v/webhooks", appIdentity), nil, lr)
}
1025862
func (c *Client) ReleaseList(appIdentity string, lr *ListRange) ([]Release, error) {
	req, err := c.NewRequest("GET", "/apps/"+appIdentity+"/releases", nil, nil)
	if err != nil {
		return nil, err
	}

	if lr != nil {
		lr.SetHeader(req)
	}

	var releasesRes []Release
	return releasesRes, c.DoReq(req, &releasesRes)
}
106533
func Convert_v1_DaemonSetList_To_apps_DaemonSetList(in *v1.DaemonSetList, out *apps.DaemonSetList, s conversion.Scope) error {
	return autoConvert_v1_DaemonSetList_To_apps_DaemonSetList(in, out, s)
}
993697
func List(c *client.Client, appID string) ([]string, error) {
	body, err := c.BasicRequest("GET", fmt.Sprintf("/v1/apps/%s/perms/", appID), nil)

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

	var users api.PermsAppResponse
	if err = json.Unmarshal([]byte(body), &users); err != nil {
		return []string{}, err
	}

	return users.Users, nil
}
569415
func (ds *resourcesUnitDataStore) ListResources() (resource.ApplicationResources, error) {
	return ds.resources.ListResources(ds.unit.ApplicationName())
}
1291392
func Convert_v1beta1_StatefulSetList_To_apps_StatefulSetList(in *v1beta1.StatefulSetList, out *apps.StatefulSetList, s conversion.Scope) error {
	return autoConvert_v1beta1_StatefulSetList_To_apps_StatefulSetList(in, out, s)
}
951190
func List(c *deis.Client, appID string) (api.Whitelist, error) {
	u := fmt.Sprintf("/v2/apps/%s/whitelist/", appID)
	res, reqErr := c.Request("GET", u, nil)
	if reqErr != nil && !deis.IsErrAPIMismatch(reqErr) {
		return api.Whitelist{}, reqErr
	}
	defer res.Body.Close()

	whitelist := api.Whitelist{}
	if err := json.NewDecoder(res.Body).Decode(&whitelist); err != nil {
		return api.Whitelist{}, err
	}

	return whitelist, reqErr
}
579242
func List(cmd *cli.Cmd) {
	var a []application.Application

	all := cmd.BoolOpt("a all", false, "List all applications, including archived")

	cmd.Action = func() {
		resp, body, errs := application.List()

		if errs != nil {
			log.Fatalf("Could not retrieve applications: %s", errs)
		}

		if resp.StatusCode != 200 {
			log.Fatalf("Could not retrieve applications: %s", resp.Status)
		}

		err := json.Unmarshal([]byte(body), &a)

		if err != nil {
			log.Fatal(err)
		}

		printAppBrief(a, *all)
	}
}
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)
}
1303812
func (c *FakeAppProjects) List(opts v1.ListOptions) (result *v1alpha1.AppProjectList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewListAction(appprojectsResource, appprojectsKind, c.ns, opts), &v1alpha1.AppProjectList{})

	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &v1alpha1.AppProjectList{ListMeta: obj.(*v1alpha1.AppProjectList).ListMeta}
	for _, item := range obj.(*v1alpha1.AppProjectList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
1011033
func (s *Server) ListApps(ctx context.Context, q *RepoAppsQuery) (*RepoAppsResponse, error) {
	if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceRepositories, rbacpolicy.ActionGet, q.Repo); err != nil {
		return nil, err
	}
	repo, err := s.db.GetRepository(ctx, q.Repo)
	if err != nil {
		if errStatus, ok := status.FromError(err); ok && errStatus.Code() == codes.NotFound {
			repo = &appsv1.Repository{
				Repo: q.Repo,
			}
		} else {
			return nil, err
		}
	}

	// Test the repo
	conn, repoClient, err := s.repoClientset.NewRepoServerClient()
	if err != nil {
		return nil, err
	}
	defer util.Close(conn)

	revision := q.Revision
	if revision == "" {
		revision = "HEAD"
	}

	paths, err := s.listAppsPaths(ctx, repoClient, repo, revision, "")
	if err != nil {
		return nil, err
	}
	items := make([]*AppInfo, 0)
	for appFilePath, appType := range paths {
		items = append(items, &AppInfo{Path: path.Dir(appFilePath), Type: string(appType)})
	}
	return &RepoAppsResponse{Items: items}, nil
}
476545
func (c *Client) ProviderList() ([]*ct.Provider, error) {
	var providers []*ct.Provider
	return providers, c.Get("/providers", &providers)
}
1206725
func Convert_v1_StatefulSetList_To_apps_StatefulSetList(in *v1.StatefulSetList, out *apps.StatefulSetList, s conversion.Scope) error {
	return autoConvert_v1_StatefulSetList_To_apps_StatefulSetList(in, out, s)
}
1350133
func (s *ServerRPC) ServiceList(ctx context.Context, req *types.ServiceListRequest) (*types.ServiceListResponse, error) {
	services, err := s.daemon.GetServices(req.PodID)
	if err != nil {
		return nil, err
	}

	return &types.ServiceListResponse{
		Services: services,
	}, nil
}
1179562
func (s *appProjectLister) List(selector labels.Selector) (ret []*v1alpha1.AppProject, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1alpha1.AppProject))
	})
	return ret, err
}