- Added the go-nanoid library for generating unique IDs, enhancing user ID management. - Refactored user provider methods to improve clarity and consistency, including updates to user retrieval and authentication processes. - Adjusted user model fields to align with new ID generation strategy, ensuring compliance with best practices. - Cleaned up code by removing obsolete test files and improving overall structure for better maintainability.
28 lines
790 B
Go
28 lines
790 B
Go
package user
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/yaoapp/gou/model"
|
|
"github.com/yaoapp/kun/maps"
|
|
)
|
|
|
|
// User List and Search
|
|
|
|
// GetUsers retrieves users by query parameters (compatible with Model.Get)
|
|
func (u *DefaultUser) GetUsers(ctx context.Context, param model.QueryParam) ([]maps.MapStr, error) {
|
|
// TODO: implement
|
|
return nil, nil
|
|
}
|
|
|
|
// PaginateUsers retrieves paginated list of users (compatible with Model.Paginate)
|
|
func (u *DefaultUser) PaginateUsers(ctx context.Context, param model.QueryParam, page int, pagesize int) (maps.MapStr, error) {
|
|
// TODO: implement
|
|
return nil, nil
|
|
}
|
|
|
|
// CountUsers returns total count of users with optional filters
|
|
func (u *DefaultUser) CountUsers(ctx context.Context, param model.QueryParam) (int64, error) {
|
|
// TODO: implement
|
|
return 0, nil
|
|
}
|