func (client *CouchbaseCloudClient) ListClusterPages(opts *ListClustersOptions, fn func(Clusters, bool) bool) error {
	var localOpts ListClustersOptions
	if opts != nil {
		localOpts = *opts
	}

	for {
		clouds, err := client.ListClusters(&localOpts)
		if err != nil {
			return err
		}

		if len(clouds.Data) == 0 {
			return nil
		}

		cont := fn(clouds.Data, clouds.Cursor.Pages.Last >= clouds.Cursor.Pages.Page)
		if !cont {
			return nil
		}

		localOpts.Page++
	}
}
// ListClusterPages allows iterating over all the clusters. For every page of cluster items it will call the callback
// and pass the page worth of clouds as well as a boolean that indicates whether is is the last page or not. The
// function iterates over all the pages either until the callback returns false, the REST endpoint returns an error
// or it runs out of pages.
ListClusterPages allows iterating over all the clusters. For every page of cluster items it will call the callback
and pass the page worth of clouds as well as a boolean that indicates whether is is the last page or not. The
function iterates over all the pages either until the callback returns false, the REST endpoint returns an error
or it runs out of pages.
// ListClusterPages allows iterating over all the clusters . For every page of cluster items it will call the callback // and pass the page worth of clouds as well as a boolean that indicates whether is is the last page or not . The // function iterates over all the pages either until the callback returns false the REST endpoint returns an error // or it runs out of pages .
func (client *CouchbaseCloudClient) ListClusterPages(opts *ListClustersOptions, fn func(Clusters, bool) bool) error {
	var localOpts ListClustersOptions
	if opts != nil {
		localOpts = *opts
	}
	for {
		clouds, err := client.ListClusters(&localOpts)
		if err != nil {
			return err
		}
		if len(clouds.Data) == 0 {
			return nil
		}
		cont := fn(clouds.Data, clouds.Cursor.Pages.Last >= clouds.Cursor.Pages.Page)
		if !cont {
			return nil
		}
		localOpts.Page++
	}
}
func ( client * CouchbaseCloudClient ) ListClusterPages ( opts * ListClustersOptions , fn func ( Clusters , bool ) bool ) error { var localOpts ListClustersOptions if opts != nil { localOpts = * opts } for { clouds , err := client . ListClusters ( & localOpts ) if err != nil { return err } if len ( clouds . Data ) == 0 { return nil } cont := fn ( clouds . Data , clouds . Cursor . Pages . Last >= clouds . Cursor . Pages . Page ) if ! cont { return nil } localOpts . Page ++ } }
ListClusterPages allows iterating over all the clusters.
ListClusterPages allows iterating over all the clusters .