pager

package
v0.12.80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultPager

type DefaultPager struct {
	// contains filtered or unexported fields
}

DefaultPager implements the Pager interface with standard pagination logic

func NewDefaultPager

func NewDefaultPager() *DefaultPager

NewDefaultPager creates a new DefaultPager with default values

func NewPager

func NewPager(cfg *config.ServiceConfig) *DefaultPager

NewPager creates a new DefaultPager with configurable values

func (*DefaultPager) PaginateUserRoles

func (p *DefaultPager) PaginateUserRoles(allUserRoles []*graph.UserRoles, page *graph.PageInput, totalCount int) ([]*graph.UserRoles, *graph.PageInfo)

PaginateUserRoles applies pagination logic to the user roles list and returns the paginated slice and PageInfo

func (*DefaultPager) PaginateUsers added in v0.10.1

func (p *DefaultPager) PaginateUsers(allUsers []*graph.User, page *graph.PageInput, totalCount int) ([]*graph.User, *graph.PageInfo)

PaginateUsers applies pagination logic to the users list and returns the paginated slice and PageInfo

type Pager

type Pager interface {
	// PaginateUserRoles applies pagination to a slice of user roles
	PaginateUserRoles(allUserRoles []*graph.UserRoles, page *graph.PageInput, totalCount int) ([]*graph.UserRoles, *graph.PageInfo)

	// PaginateUsers applies pagination to a slice of users
	PaginateUsers(allUsers []*graph.User, page *graph.PageInput, totalCount int) ([]*graph.User, *graph.PageInfo)
}

Pager provides pagination functionality for slices

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL