Some checks failed
CI / Build & Test (push) Failing after 1m31s
- Add user management endpoints (list/create/get/update/delete) with pagination and search - Add dashboard stats endpoint with tenant/user/online counts and growth metrics - Add tenant resolver middleware for multi-tenant request scoping - Add i18n kernel with zh/en message files and AcceptLanguage middleware - Add WebSocket hub/handler for real-time communication - Add job scheduler kernel with cron support - Add plugin sandbox for isolated execution - Add storage kernel (local filesystem) - Add event bus kernel for pub/sub - Add cache kernel abstraction - Add database migration runner and version upgrade checker - Add rate limiting middleware with Redis backend - Add SQL migrations for rbac, audit_logs, settings, notifications, examples - Extend user repository with list/delete/count operations - Register all module routes with tenant resolver
17 lines
755 B
Go
17 lines
755 B
Go
package domain
|
|
|
|
import "context"
|
|
|
|
type UserRepository interface {
|
|
Create(ctx context.Context, user *User) error
|
|
FindByID(ctx context.Context, tenantID string, id uint) (*User, error)
|
|
FindByEmail(ctx context.Context, tenantID string, email string) (*User, error)
|
|
FindByUsername(ctx context.Context, tenantID string, username string) (*User, error)
|
|
Update(ctx context.Context, user *User) error
|
|
List(ctx context.Context, tenantID string, page, pageSize int, search string, status *int) ([]User, int64, error)
|
|
Delete(ctx context.Context, tenantID string, id uint) error
|
|
Count(ctx context.Context, tenantID string) (int64, error)
|
|
CountAll(ctx context.Context) (int64, error)
|
|
ListAll(ctx context.Context, page, pageSize int) ([]User, int64, error)
|
|
}
|