// List all public, private, and privileged templates.
11103
func (c *Client) ListTemplates(p *ListTemplatesParameter) ([]*Template, error) {
	obj, err := c.Request("listTemplates", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.([]*Template), err
}
473881
func (s GitignoresService) List(ctx context.Context) ([]string, *Response, error) {
	req, err := s.client.NewRequest("GET", "gitignore/templates", nil)
	if err != nil {
		return nil, nil, err
	}

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

	return availableTemplates, resp, nil
}
1333430
func (c *CredentialsClient) List(ctx context.Context, opts *CredentialsListOpts) *CredentialIter {
	iter := CredentialIter{
		first: true,
		i:     -1,
	}

	p := "/credentials"

	var q url.Values
	if opts != nil {
		q = make(url.Values)
		if opts.ResourceID != nil {
			for _, v := range *opts.ResourceID {
				b, err := v.MarshalText()
				if err != nil {
					return &iter
				}
				q.Add("resource_id", string(b))
			}
		}

		if opts.ProjectID != nil {
			b, err := opts.ProjectID.MarshalText()
			if err != nil {
				return &iter
			}
			q.Set("project_id", string(b))
		}
	}

	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 {
		return &Error{}
	})
	return &iter
}
581543
func AddSourceTemplates(t *template.Template) {
	template.Must(t.Parse(`{{define "weblistcss"}}` + weblistPageCSS + `{{end}}`))
	template.Must(t.Parse(`{{define "weblistjs"}}` + weblistPageScript + `{{end}}`))
}
572590
func (s *Action) TemplatesPrint(ctx context.Context, c *cli.Context) error {
	tree, err := s.Store.TemplateTree(ctx)
	if err != nil {
		return ExitError(ctx, ExitList, err, "failed to list templates: %s", err)
	}
	fmt.Fprintln(stdout, tree.Format(0))
	return nil
}
575523
func (m *MockRenderedJobListArchive) List() templatescompiler.RenderedJobList {
	ret := m.ctrl.Call(m, "List")
	ret0, _ := ret[0].(templatescompiler.RenderedJobList)
	return ret0
}
583756
func (api *API) ListPrivateNetworkServers(pn_id string) ([]Identity, error) {
	result := []Identity{}
	url := createUrl(api, privateNetworkPathSegment, pn_id, "servers")
	err := api.Client.Get(url, &result, http.StatusOK)
	if err != nil {
		return nil, err
	}
	return result, nil
}
766510
func (c *FakeOAuthClientAuthorizations) List(opts v1.ListOptions) (result *oauth.OAuthClientAuthorizationList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootListAction(oauthclientauthorizationsResource, oauthclientauthorizationsKind, opts), &oauth.OAuthClientAuthorizationList{})
	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &oauth.OAuthClientAuthorizationList{ListMeta: obj.(*oauth.OAuthClientAuthorizationList).ListMeta}
	for _, item := range obj.(*oauth.OAuthClientAuthorizationList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
74075
func (c *Client) ListPrivateNetworksForServer(id string) (nets []PrivateNetwork, err error) {
	var netMap map[string]PrivateNetwork
	if err := c.get(`server/private_networks?SUBID=`+id, &netMap); err != nil {
		return nil, err
	}

	for _, net := range netMap {
		nets = append(nets, net)
	}
	sort.Sort(privateNetworks(nets))
	return nets, nil
}
758575
func (o *L2Domain) EgressACLTemplates(info *bambou.FetchingInfo) (EgressACLTemplatesList, *bambou.Error) {

	var list EgressACLTemplatesList
	err := bambou.CurrentSession().FetchChildren(o, EgressACLTemplateIdentity, &list, info)
	return list, err
}
1277331
func (s *podTemplateLister) List(selector labels.Selector) (ret []*v1.PodTemplate, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.PodTemplate))
	})
	return ret, err
}
1124195
func (r *AppPackageService) PublicList() *AppPackagePublicListCall {
	c := &AppPackagePublicListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	return c
}
195067
func (templateApi *TemplateApi) ListWithOptions(options map[string]string) ([]Template, error) {
	data, err := templateApi.entityService.List(options)
	if err != nil {
		return nil, err
	}
	return parseTemplateList(data), nil
}
872380
func (a *AzureClusterLister) List() (*containerservice.ListResult, error) {
	bearerAuthorizer, err := NewBearerAuthorizer(a.Config, azure.PublicCloud.ResourceManagerEndpoint)
	if err != nil {
		log.Printf("Error trying to create Bearer Authorizer: %s", err)
		return nil, err
	}

	csClient := containerservice.NewContainerServicesClient(a.Config.SubscriptionID)
	csClient.Authorizer = bearerAuthorizer
	listResult, err := csClient.List()
	if err != nil {
		log.Printf("Error trying to fetch Azure Cluster List: %s\n", err)
		return nil, err
	}
	return &listResult, nil
}
434648
func (p *partial) template() (*Template, error) {
	if p.tpl == nil {
		var err error

		p.tpl, err = Parse(p.source)
		if err != nil {
			return nil, err
		}
	}

	return p.tpl, nil
}
979966
func (o *Enterprise) L2DomainTemplates(info *bambou.FetchingInfo) (L2DomainTemplatesList, *bambou.Error) {

	var list L2DomainTemplatesList
	err := bambou.CurrentSession().FetchChildren(o, L2DomainTemplateIdentity, &list, info)
	return list, err
}
357155
func (s *VPCService) ListPrivateGateways(p *ListPrivateGatewaysParams) (*ListPrivateGatewaysResponse, error) {
	resp, err := s.cs.newRequest("listPrivateGateways", p.toURLValues())
	if err != nil {
		return nil, err
	}

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

	return &r, nil
}