sorter

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultUserSorter

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

DefaultUserSorter provides the default implementation for user sorting

func (*DefaultUserSorter) SortUserRoles

func (s *DefaultUserSorter) SortUserRoles(userRoles []*graph.UserRoles, sortBy *graph.SortByInput)

SortUserRoles sorts the user roles list based on the sortBy parameter If sortBy is nil, defaults to sorting by LastName in ascending order

func (*DefaultUserSorter) SortUsers added in v0.10.1

func (s *DefaultUserSorter) SortUsers(users []*graph.User, sortBy *graph.SortByInput)

SortUsers sorts the users list based on the sortBy parameter If sortBy is nil, defaults to sorting by LastName in ascending order

type UserSorter

type UserSorter interface {
	// SortUserRoles sorts a slice of UserRoles based on the provided sort criteria
	// If sortBy is nil, applies default sorting (LastName ASC)
	SortUserRoles(userRoles []*graph.UserRoles, sortBy *graph.SortByInput)

	// SortUsers sorts a slice of Users based on the provided sort criteria
	// If sortBy is nil, applies default sorting (LastName ASC)
	SortUsers(users []*graph.User, sortBy *graph.SortByInput)
}

UserSorter defines the interface for sorting user-related data

func NewUserSorter

func NewUserSorter() UserSorter

NewUserSorter creates a new instance of DefaultUserSorter with default values

func NewUserSorterWithConfig

func NewUserSorterWithConfig(cfg *config.ServiceConfig) UserSorter

NewUserSorterWithConfig creates a new instance of DefaultUserSorter with configurable values

Jump to

Keyboard shortcuts

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