Documentation
¶
Overview ¶
Package gliter implements iterators for GitLab objects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func All ¶
func All[T any, O any](ctx context.Context, getter func(opts *O, options ...gitlab.RequestOptionFunc) ([]T, *gitlab.Response, error), opts O, nextPage func(*O, int)) iter.Seq2[T, error]
All func iterates over all items fetched by the getter function, handling pagination automatically. It yields each item and stops when either an error occurs or the yield function returns false. The nextPage function is called with the current options and the next page number to continue pagination.
func AllWithID ¶
func AllWithID[T any, O any](ctx context.Context, id any, getter func(id any, opts *O, options ...gitlab.RequestOptionFunc) ([]T, *gitlab.Response, error), opts O, nextPage func(*O, int)) iter.Seq2[T, error]
AllWithID is a wrapper for All that includes an ID in the getter function. It is useful for fetching items that are related to a specific ID, such as merge requests within a project or group.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.