// ListFetchedFeeds list fetched feeds information
496279
func ListFetchedFeeds(driver db.DB) (jsonMetas, xmlMetas []models.FeedMeta, err error) {
	lastMetas, err := driver.GetFetchedFeedMetas()
	if err != nil {
		return nil, nil, fmt.Errorf("Failed to get Meta: %s", err)
	}
	if len(lastMetas) == 0 {
		log.Infof("No feeds found")
		return
	}

	xmlYears, jsonYears := map[int]bool{}, map[int]bool{}
	for _, meta := range lastMetas {
		if !checkNvdURL(meta.URL) {
			continue
		}
		y, xml, err := nvdFeedURLToYear(meta.URL)
		if err != nil {
			return nil, nil, err
		}
		if xml {
			xmlYears[y] = true
		} else {
			jsonYears[y] = true
		}
	}

	xmlY, jsonY := []int{}, []int{}
	for y := range xmlYears {
		xmlY = append(xmlY, y)
	}
	for y := range jsonYears {
		jsonY = append(jsonY, y)
	}

	xmlMetas, err = FetchLatestFeedMeta(driver, xmlY, true)
	if err != nil {
		return nil, nil, err
	}
	jsonMetas, err = FetchLatestFeedMeta(driver, jsonY, false)
	if err != nil {
		return nil, nil, err
	}
	return
}
332775
func (s *RPCServer) ListThreads(arg ListThreadsIn, out *ListThreadsOut) (err error) {
	out.Threads, err = s.debugger.Threads()
	return err
}
294645
func (db *BytesConnectionRedis) ListKeys(match string) (keyval.BytesKeyIterator, error) {
	if db.closed {
		return nil, fmt.Errorf("ListKeys(%s) called on a closed connection", match)
	}
	return listKeys(db, match, nil, nil)
}
461760
func (n *hdfsObjects) ListObjects(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (loi minio.ListObjectsInfo, err error) {
	getObjectInfo := func(ctx context.Context, bucket, entry string) (minio.ObjectInfo, error) {
		return n.GetObjectInfo(ctx, bucket, entry, minio.ObjectOptions{})
	}

	return minio.ListObjects(ctx, n, bucket, prefix, marker, delimiter, maxKeys, n.listPool, n.listDirFactory(), getObjectInfo, getObjectInfo)
}
420223
func (s *HostService) ListDedicatedHosts(p *ListDedicatedHostsParams) (*ListDedicatedHostsResponse, error) {
	resp, err := s.cs.newRequest("listDedicatedHosts", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListDedicatedHostsResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
805592
func (l *s3Objects) ListBuckets(ctx context.Context) ([]minio.BucketInfo, error) {
	buckets, err := l.Client.ListBuckets()
	if err != nil {
		return nil, minio.ErrorRespToObjectError(err)
	}

	b := make([]minio.BucketInfo, len(buckets))
	for i, bi := range buckets {
		b[i] = minio.BucketInfo{
			Name:    bi.Name,
			Created: bi.CreationDate,
		}
	}

	return b, err
}
154512
func (c *Client) ListAffinityGroupTypes(p *ListAffinityGroupTypesParameter) ([]*AffinityGroupType, error) {
	obj, err := c.Request("listAffinityGroupTypes", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.([]*AffinityGroupType), err
}
326603
func (pdb *BrokerWatcher) ListKeys(prefix string) (keyval.BytesKeyIterator, error) {
	keys, qm, err := pdb.client.KV().Keys(pdb.prefixKey(prefix), "", nil)
	if err != nil {
		return nil, err
	}

	return &bytesKeyIterator{len: len(keys), keys: keys, prefix: pdb.prefix, lastIndex: qm.LastIndex}, nil
}
185337
func (c *CloudAPI) ListFabricNetworks(vlanID int16) ([]cloudapi.FabricNetwork, error) {
	vlan, err := c.getFabricWrapper(vlanID)
	if err != nil {
		return nil, err
	}

	out := []cloudapi.FabricNetwork{}
	for _, network := range vlan.Networks {
		out = append(out, *network)
	}

	return out, nil
}
1144138
func (f *JSON) JSONFeed() *JSONFeed {
	feed := &JSONFeed{
		Version:     jsonFeedVersion,
		Title:       f.Title,
		Description: f.Description,
	}

	if f.Link != nil {
		feed.HomePageUrl = f.Link.Href
	}
	if f.Author != nil {
		feed.Author = &JSONAuthor{
			Name: f.Author.Name,
		}
	}
	for _, e := range f.Items {
		feed.Items = append(feed.Items, newJSONItem(e))
	}
	return feed
}
18542
func (b *fastStatBucket) ListObjects(
	ctx context.Context,
	req *gcs.ListObjectsRequest) (listing *gcs.Listing, err error) {
	// Fetch the listing.
	listing, err = b.wrapped.ListObjects(ctx, req)
	if err != nil {
		return
	}

	// Note anything we found.
	b.insertMultiple(listing.Objects)

	return
}
174315
func (c *Client) ListWAFs(i *ListWAFsInput) ([]*WAF, error) {
	if i.Service == "" {
		return nil, ErrMissingService
	}

	if i.Version == 0 {
		return nil, ErrMissingVersion
	}

	path := fmt.Sprintf("/service/%s/version/%d/wafs", i.Service, i.Version)
	resp, err := c.Get(path, nil)
	if err != nil {
		return nil, err
	}

	data, err := jsonapi.UnmarshalManyPayload(resp.Body, wafType)
	if err != nil {
		return nil, err
	}

	wafs := make([]*WAF, len(data))
	for i := range data {
		typed, ok := data[i].(*WAF)
		if !ok {
			return nil, fmt.Errorf("got back a non-WAF response")
		}
		wafs[i] = typed
	}
	return wafs, nil
}
1301239
func (s *GistsService) ListForks(ctx context.Context, id string) ([]*GistFork, *Response, error) {
	u := fmt.Sprintf("gists/%v/forks", id)
	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	var gistForks []*GistFork
	resp, err := s.client.Do(ctx, req, &gistForks)
	if err != nil {
		return nil, resp, err
	}

	return gistForks, resp, nil
}
1114683
func (pdb *BytesBrokerWatcherEtcd) ListKeys(prefix string) (keyval.BytesKeyIterator, error) {
	return listKeysInternal(pdb.Logger, pdb.kv, pdb.opTimeout, prefix)
}
1244942
func (g *GistsService) ListForks(uri *Hyperlink, uriParams M) (gistForks []GistFork, result *Result) {
	url, err := ExpandWithDefault(uri, &GistsForksURL, uriParams)
	if err != nil {
		return nil, &Result{Err: err}
	}

	result = g.client.get(url, &gistForks)
	return
}
734630
func ListFollowing(c *context.APIContext) {
	u := GetUserByParams(c)
	if c.Written() {
		return
	}
	listUserFollowing(c, u)
}
451115
func (c *Conn) ListTubes() ([]string, error) {
	r, err := c.cmd(nil, nil, nil, "list-tubes")
	if err != nil {
		return nil, err
	}
	body, err := c.readResp(r, true, "OK")
	return parseList(body), err
}