// List runs the list action.
492001
func (c *EventsController) List(ctx *app.ListWorkItemEventsContext) error {
	var eventList event.List
	err := application.Transactional(c.db, func(appl application.Application) error {
		var err error
		eventList, err = appl.Events().List(ctx, ctx.WiID)
		if err != nil {
			return errs.Wrap(err, "list events model failed")
		}
		if ctx.RevisionID != nil {
			eventList = eventList.FilterByRevisionID(*ctx.RevisionID)
		}
		return nil
	})

	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}

	var convertedEvents []*app.Event
	return ctx.ConditionalEntities(eventList, c.config.GetCacheControlEvents, func() error {
		convertedEvents, err = ConvertEvents(ctx, c.db, ctx.Request, eventList, ctx.WiID)
		if err != nil {
			return jsonapi.JSONErrorResponse(ctx, errs.Wrapf(err, "failed to convert events"))
		}
		return ctx.OK(&app.EventList{
			Data: convertedEvents,
		})
	})
}
1132755
func (c *FakeRoutes) List(opts v1.ListOptions) (result *route.RouteList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewListAction(routesResource, routesKind, c.ns, opts), &route.RouteList{})

	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &route.RouteList{ListMeta: obj.(*route.RouteList).ListMeta}
	for _, item := range obj.(*route.RouteList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
1335507
func (r *TasksService) List() *TasksListCall {
	c := &TasksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	return c
}
1372007
func (r *UnitStateService) List() *UnitStateListCall {
	c := &UnitStateListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	return c
}
1164044
func (r *ASCIIRenderer) List(out *bytes.Buffer, text func() bool, flags int) {
	r.listLevel++
	out.WriteString(linebreak)
	text()
	r.listLevel--
}
555782
func (c *SpaceTemplateController) List(ctx *app.ListSpaceTemplateContext) error {
	res := &app.SpaceTemplateList{}
	err := application.Transactional(c.db, func(appl application.Application) error {
		templates, err := appl.SpaceTemplates().List(ctx)
		if err != nil {
			log.Error(ctx, map[string]interface{}{
				"err": err,
			}, "failed to list space templates")
			return err
		}
		return ctx.ConditionalEntities(templates, c.config.GetCacheControlSpaceTemplates, func() error {
			res.Data = ConvertSpaceTemplates(appl, ctx.Request, templates)
			return nil
		})
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	return ctx.OK(res)
}
1097645
func (c *FakeEvents) List(opts v1.ListOptions) (result *corev1.EventList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &corev1.EventList{})

	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &corev1.EventList{ListMeta: obj.(*corev1.EventList).ListMeta}
	for _, item := range obj.(*corev1.EventList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
1132193
func (lw *ListWatch) List(options api.ListOptions) (runtime.Object, error) {
	return lw.ListFunc(options)
}
1365163
func (e *events) List(opts api.ListOptions) (*api.EventList, error) {
	result := &api.EventList{}
	err := e.client.Get().
		NamespaceIfScoped(e.namespace, len(e.namespace) > 0).
		Resource("events").
		VersionedParams(&opts, api.Scheme).
		Do().
		Into(result)
	return result, err
}
177305
func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *appsv1.ControllerRevisionList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &appsv1.ControllerRevisionList{})

	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &appsv1.ControllerRevisionList{ListMeta: obj.(*appsv1.ControllerRevisionList).ListMeta}
	for _, item := range obj.(*appsv1.ControllerRevisionList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
286706
func List(baseURL string, resourceType string) (*jsh.Document, *http.Response, error) {
	request, err := ListRequest(baseURL, resourceType)
	if err != nil {
		return nil, nil, err
	}

	return Do(request, jsh.ListMode)
}
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
}
28620
func (d *DevTools) List(ctx context.Context) ([]*Target, error) {
	resp, err := d.httpGet(ctx, "/json/list")
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	if resp.StatusCode != http.StatusOK {
		return nil, parseError("List", resp.Body)
	}

	var t []*Target
	return t, json.NewDecoder(resp.Body).Decode(&t)
}
136720
func (r *Runc) List(context context.Context) ([]*Container, error) {
	data, err := cmdOutput(r.command(context, "list", "--format=json"), false)
	if err != nil {
		return nil, err
	}
	var out []*Container
	if err := json.Unmarshal(data, &out); err != nil {
		return nil, err
	}
	return out, nil
}
137668
func (s *ServicesService) List(options *ListServicesOptions) ([]*Service, *http.Response, error) {
	return s.ListWithContext(context.TODO(), options)
}
162
func (c *SpaceController) List(ctx *app.ListSpaceContext) error {
	_, err := login.ContextIdentity(ctx)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrUnauthorized(err.Error()))
	}
	offset, limit := computePagingLimits(ctx.PageOffset, ctx.PageLimit)

	var response app.SpaceList
	txnErr := application.Transactional(c.db, func(appl application.Application) error {
		spaces, cnt, err := appl.Spaces().List(ctx.Context, &offset, &limit)
		if err != nil {
			return err
		}
		entityErr := ctx.ConditionalEntities(spaces, c.config.GetCacheControlSpaces, func() error {
			count := int(cnt)
			spaceData, err := ConvertSpacesFromModel(ctx.Request, spaces, IncludeBacklogTotalCount(ctx.Context, c.db))
			if err != nil {
				return err
			}
			response = app.SpaceList{
				Links: &app.PagingLinks{},
				Meta:  &app.SpaceListMeta{TotalCount: count},
				Data:  spaceData,
			}
			setPagingLinks(response.Links, buildAbsoluteURL(ctx.Request), len(spaces), offset, limit, count)
			return nil
		})
		if entityErr != nil {
			return entityErr
		}

		return nil
	})
	if txnErr != nil {
		return jsonapi.JSONErrorResponse(ctx, txnErr)
	}
	return ctx.OK(&response)
}
1137548
func (r *Rets) List() string {
	s := join(r.ToParams(), func(p *Param) string { return p.Name + " " + p.Type }, ", ")
	if len(s) > 0 {
		s = "(" + s + ")"
	}
	return s
}