// List lists an app's config.
333252
func List(c *client.Client, app string) (api.Config, error) {
	u := fmt.Sprintf("/v1/apps/%s/config/", app)

	body, err := c.BasicRequest("GET", u, nil)

	if err != nil {
		return api.Config{}, err
	}

	config := api.Config{}
	if err = json.Unmarshal([]byte(body), &config); err != nil {
		return api.Config{}, err
	}

	return config, nil
}
1099453
func (pm *poolManager) List() ([]*storage.Config, error) {
	settings, err := pm.settings.ListSettings(globalKeyPrefix)
	if err != nil {
		return nil, errors.Annotate(err, "listing pool settings")
	}
	var result []*storage.Config
	for _, attrs := range settings {
		cfg, err := pm.configFromSettings(attrs)
		if err != nil {
			return nil, errors.Trace(err)
		}
		result = append(result, cfg)
	}
	return result, nil
}
119257
func List(c *cli.Context) {
	// this will create the config dir if it does not already exist
	cfg, err := config.New()
	if err != nil {
		log.Fatal(err)
	}

	var parsers []string
	var parserStatus string

	if c.Bool("r") {
		parsers = getRemoteParsers(cfg.DownloadServerURL)
		parserStatus = "available"
	} else {
		parsers = getInstalledParsers()
		parserStatus = "installed"
	}

	if len(parsers) == 0 {
		fmt.Println("no parser", parserStatus)
		return
	}

	fmt.Println(parserStatus, "parsers:")
	for _, parser := range parsers {
		fmt.Println("  * ", parser)
	}
}
1142445
func (d *Deployments) List(q *QueryOptions) ([]*Deployment, *QueryMeta, error) {
	var resp []*Deployment
	qm, err := d.client.query("/v1/deployments", &resp, q)
	if err != nil {
		return nil, nil, err
	}
	sort.Sort(DeploymentIndexSort(resp))
	return resp, qm, nil
}
449704
func (t *LinodeConfigService) List(linodeId int, configId int) (*LinodeConfigListResponse, error) {
	u := &url.Values{}
	if configId > 0 {
		u.Add("ConfigID", strconv.Itoa(configId))
	}
	u.Add("LinodeID", strconv.Itoa(linodeId))
	v := LinodeConfigListResponse{}
	if err := t.client.do("linode.config.list", u, &v.Response); err != nil {
		return nil, err
	}

	v.LinodeConfigs = make([]LinodeConfig, 5)
	if err := json.Unmarshal(v.RawData, &v.LinodeConfigs); err != nil {
		return nil, err
	}
	return &v, nil
}
78392
func (cs *RPCService) List(r *http.Request, args *ListArgs, reply *ListReply) error {
	cfgs, err := cs.Configs(args)
	if err != nil {
		return err
	}
	for _, v := range cfgs {
		reply.Configs = append(reply.Configs, v)
	}
	return nil
}
40531
func (f FakeClusterLister) List() (*containerservice.ListResult, error) {
	return f.Resp, f.Err
}
1228816
func (c *Client) AppList() ([]*ct.App, error) {
	var apps []*ct.App
	return apps, c.Get("/apps", &apps)
}
140541
func (s *PodStore) List() []*v1.Pod {
	objects := s.Store.List()
	pods := make([]*v1.Pod, 0)
	for _, o := range objects {
		pods = append(pods, o.(*v1.Pod))
	}
	return pods
}
872239
func (v *View) List(ctx context.Context, prefix string) ([]string, error) {
	if err := v.sanityCheck(prefix); err != nil {
		return nil, err
	}
	return v.backend.List(ctx, v.expandKey(prefix))
}
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
}
1107123
func (s *SitesService) List(options *ListOptions) ([]Site, *Response, error) {
	sites := new([]Site)

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

	resp, err := s.client.Request("GET", "/sites", reqOptions, sites)

	for _, site := range *sites {
		site.client = s.client
		site.Deploys = &DeploysService{client: s.client, site: &site}
	}

	return *sites, resp, err
}
269322
func (self *Zone) List() ([]*ZoneInfoBase, error) {
	var res []interface{}
	params := []interface{}{self.Key}
	if err := self.Call("domain.zone.list", params, &res); err != nil {
		return nil, err
	}

	zones := make([]*ZoneInfoBase, 0)
	for _, r := range res {
		zone := ToZoneInfoBase(r.(map[string]interface{}))
		zones = append(zones, zone)
	}
	return zones, nil
}
281160
func (c *LabelController) List(ctx *app.ListLabelContext) error {
	err := application.Transactional(c.db, func(appl application.Application) error {
		labels, err := appl.Labels().List(ctx, ctx.SpaceID)
		if err != nil {
			return err
		}
		res := &app.LabelList{}
		res.Data = ConvertLabels(appl, ctx.Request, labels)
		return ctx.OK(res)
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	return nil
}
395353
func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &v1beta1.MutatingWebhookConfigurationList{})
	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &v1beta1.MutatingWebhookConfigurationList{ListMeta: obj.(*v1beta1.MutatingWebhookConfigurationList).ListMeta}
	for _, item := range obj.(*v1beta1.MutatingWebhookConfigurationList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
191426
func (d *driver) List(ctx context.Context, path string) ([]string, error) {
	var files []string

	prefix := d.swiftPath(path)
	if prefix != "" {
		prefix += "/"
	}

	opts := &swift.ObjectsOpts{
		Prefix:    prefix,
		Delimiter: '/',
	}

	objects, err := d.Conn.ObjectsAll(d.Container, opts)
	for _, obj := range objects {
		files = append(files, strings.TrimPrefix(strings.TrimSuffix(obj.Name, "/"), d.swiftPath("/")))
	}

	if err == swift.ContainerNotFound || (len(objects) == 0 && path != "/") {
		return files, storagedriver.PathNotFoundError{Path: path}
	}
	return files, err
}
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
}