func (client *CouchbaseCloudClient) ListProjectPages(opts *ListProjectsOptions, fn func(Projects, bool) bool) error {
	var localOpts ListProjectsOptions
	if opts != nil {
		localOpts = *opts
	}

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

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

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

		localOpts.Page++
	}
}
// ListProjectPages allows iterating over all the projects. For every page of project items it will call the callback
// and pass the page worth of projects 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.
ListProjectPages allows iterating over all the projects. For every page of project items it will call the callback
and pass the page worth of projects 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.
// ListProjectPages allows iterating over all the projects . For every page of project items it will call the callback // and pass the page worth of projects 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) ListProjectPages(opts *ListProjectsOptions, fn func(Projects, bool) bool) error {
	var localOpts ListProjectsOptions
	if opts != nil {
		localOpts = *opts
	}
	for {
		projects, err := client.ListProjects(&localOpts)
		if err != nil {
			return err
		}
		if len(projects.Data) == 0 {
			return nil
		}
		cont := fn(projects.Data, projects.Cursor.Pages.Last >= projects.Cursor.Pages.Page)
		if !cont {
			return nil
		}
		localOpts.Page++
	}
}
func ( client * CouchbaseCloudClient ) ListProjectPages ( opts * ListProjectsOptions , fn func ( Projects , bool ) bool ) error { var localOpts ListProjectsOptions if opts != nil { localOpts = * opts } for { projects , err := client . ListProjects ( & localOpts ) if err != nil { return err } if len ( projects . Data ) == 0 { return nil } cont := fn ( projects . Data , projects . Cursor . Pages . Last >= projects . Cursor . Pages . Page ) if ! cont { return nil } localOpts . Page ++ } }
ListProjectPages allows iterating over all the projects.
ListProjectPages allows iterating over all the projects .