Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListAll ¶
func ListAll[T any](ctx context.Context, listFunc func(ctx context.Context, pageNum int) (Response[T], *http.Response, error)) ([]T, error)
ListAll invokes the given pagination list function multiple times until the total count of responses is gathered. Once done, all paginated responses are returned. If an error occurs, the first error occurrence will be returned.
This is taken over from https://github.com/mongodb/terraform-provider-mongodbatlas/blob/a5581ebb274dbcaffd43d330c5bfbbb329cae51d/internal/common/dsschema/page_request.go#L14-L31.
Types ¶
Click to show internal directories.
Click to hide internal directories.