func (client *CouchbaseCloudClient) ListUserPages(options *ListUsersOptions, fn func(Users, bool) bool) error {
	var localOpts ListUsersOptions
	if options != nil {
		localOpts = *options
	}

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

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

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

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