// List lists the clients in the Chef server.
//
// Chef API docs: https://docs.chef.io/api_chef_server.html#clients
498196
func (e *ApiClientService) List() (data ApiClientListResult, err error) {
	err = e.client.magicRequestDecoder("GET", "clients", nil, &data)
	return
}
1209075
func List(c *client.Client, results int) (api.Users, int, error) {
	body, count, err := c.LimitedRequest("/v1/users/", results)

	if err != nil {
		return []api.User{}, -1, err
	}

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

	return users, count, nil
}
1243461
func (c *CustomersService) List(options *ListCustomersOptions) ([]*Customer, *http.Response, error) {
	return c.ListWithContext(context.TODO(), options)
}
43385
func (e *NodeService) List() (data map[string]string, err error) {
	err = e.client.magicRequestDecoder("GET", "nodes", nil, &data)
	return
}
483356
func (c *Client) List(resource string, resp interface{}, options ...RequestOptions) (count, total int, err error) {
	url := buildURL(c.apiBase, &Request{Resource: resource})
	req, err := createRequest("GET", url, nil, nil, options...)
	if err != nil {
		return count, total, err
	}

	c.Lock()
	defer c.Unlock()
	return c.httpClient.Send(req).Read(resp).Call()
}
607702
func (c *client) ServerList() ([]*Server, error) {
	var out []*Server
	uri := fmt.Sprintf(pathServers, c.addr)
	err := c.get(uri, &out)
	return out, err
}
831998
func (c *coreDNS) list(key string) ([]SrvRecord, error) {
	ctx, cancel := context.WithTimeout(context.Background(), defaultContextTimeout)
	r, err := c.etcdClient.Get(ctx, key, etcd.WithPrefix())
	defer cancel()
	if err != nil {
		return nil, err
	}
	if r.Count == 0 {
		key = strings.TrimSuffix(key, etcdPathSeparator)
		r, err = c.etcdClient.Get(ctx, key)
		if err != nil {
			return nil, err
		}
		if r.Count == 0 {
			return nil, ErrNoEntriesFound
		}
	}

	var srvRecords []SrvRecord
	for _, n := range r.Kvs {
		var srvRecord SrvRecord
		if err = json.Unmarshal([]byte(n.Value), &srvRecord); err != nil {
			return nil, err
		}
		srvRecord.Key = strings.TrimPrefix(string(n.Key), key)
		srvRecord.Key = strings.TrimSuffix(srvRecord.Key, srvRecord.Host)

		// Skip non-bucket entry like for a key
		// /skydns/net/miniocloud/10.0.0.1 that may exist as
		// dns entry for the server (rather than the bucket
		// itself).
		if srvRecord.Key == "" {
			continue
		}

		srvRecord.Key = msgUnPath(srvRecord.Key)
		srvRecords = append(srvRecords, srvRecord)

	}
	if len(srvRecords) == 0 {
		return nil, ErrNoEntriesFound
	}
	sort.Slice(srvRecords, func(i int, j int) bool {
		return srvRecords[i].Key < srvRecords[j].Key
	})
	return srvRecords, nil
}
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
}
92992
func (c *Client) ClientList() ([]string, error) {
	v, err := c.execOnFirst(false, "CLIENT LIST")
	if err != nil {
		return nil, err
	}
	switch v.(type) {
	case string:
		return strings.Split(v.(string), "\n"), nil
	}
	return nil, ErrServerError
}
1066680
func (ps *PluginsService) List(ctx context.Context) (*PluginsResponse, *APIResponse, error) {
	apiVersion, err := ps.client.getAPIVersion(ctx, "admin/plugin_info")
	if err != nil {
		return nil, nil, err
	}
	pr := PluginsResponse{}
	_, resp, err := ps.client.getAction(ctx, &APIClientRequest{
		Path:         "admin/plugin_info",
		ResponseBody: &pr,
		APIVersion:   apiVersion,
	})

	return &pr, resp, err
}
1173523
func (c *Client) List() ([]hostmgr.Host, error) {
	list := []hostmgr.Host{}

	resp, err := http.Get(fmt.Sprintf("%s://%s:%d/admin/hosts", c.Scheme, c.Host, c.Port))
	if err != nil {
		return list, microerror.Mask(err)
	}
	defer resp.Body.Close()

	if resp.StatusCode > 399 {
		return nil, microerror.Mask(fmt.Errorf("invalid status code '%d'", resp.StatusCode))
	}
	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return list, microerror.Mask(err)
	}

	err = json.Unmarshal(body, &list)
	if err != nil {
		return list, microerror.Mask(err)
	}

	return list, nil
}
1141032
func (c *Client) List() ([]params.Block, error) {
	var blocks params.BlockResults
	if err := c.facade.FacadeCall("List", nil, &blocks); err != nil {
		return nil, errors.Trace(err)
	}

	var all []params.Block
	var allErr params.ErrorResults
	for _, result := range blocks.Results {
		if result.Error != nil {
			allErr.Results = append(allErr.Results, params.ErrorResult{result.Error})
			continue
		}
		all = append(all, result.Result)
	}
	return all, allErr.Combine()
}
137668
func (s *ServicesService) List(options *ListServicesOptions) ([]*Service, *http.Response, error) {
	return s.ListWithContext(context.TODO(), options)
}
362054
func List(c *deis.Client, app string) (api.AppSettings, error) {
	u := fmt.Sprintf("/v2/apps/%s/settings/", app)

	res, reqErr := c.Request("GET", u, nil)
	if reqErr != nil {
		return api.AppSettings{}, reqErr
	}
	defer res.Body.Close()

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

	return settings, reqErr
}
916525
func (c *Client) List(name string) ([]os.FileInfo, error) {
	return c.ListN(name, 0)
}
1022658
func (s *DomainsService) List() ([]Domain, *Response, error) {
	path := domainAction("List")
	returnedDomains := domainListWrapper{}

	payload := newPayLoad(s.client.CommonParams)
	res, err := s.client.post(path, payload, &returnedDomains)
	if err != nil {
		return []Domain{}, res, err
	}

	domains := []Domain{}

	if returnedDomains.Status.Code != "1" {
		return domains, nil, fmt.Errorf("Could not get domains: %s", returnedDomains.Status.Message)
	}

	for _, domain := range returnedDomains.Domains {
		domains = append(domains, domain)
	}

	return domains, res, nil
}
472554
func (s *Service) OAuthClientList(ctx context.Context, lr *ListRange) (OAuthClientListResult, error) {
	var oauthClient OAuthClientListResult
	return oauthClient, s.Get(ctx, &oauthClient, fmt.Sprintf("/oauth/clients"), nil, lr)
}