aboutsummaryrefslogtreecommitdiffhomepage
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/page/pagination.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/resources/page/pagination.go b/resources/page/pagination.go
index 9113b6062..4beb96e50 100644
--- a/resources/page/pagination.go
+++ b/resources/page/pagination.go
@@ -32,6 +32,18 @@ type PaginatorProvider interface {
Paginate(pages any, options ...any) (*Pager, error)
}
+var _ PaginatorProvider = (*PaginatorNotSupportedFunc)(nil)
+
+type PaginatorNotSupportedFunc func() error
+
+func (f PaginatorNotSupportedFunc) Paginate(pages any, options ...any) (*Pager, error) {
+ return nil, f()
+}
+
+func (f PaginatorNotSupportedFunc) Paginator(options ...any) (*Pager, error) {
+ return nil, f()
+}
+
// Pager represents one of the elements in a paginator.
// The number, starting on 1, represents its place.
type Pager struct {