You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.1 KiB
��
33 lines
1.1 KiB
��
package user
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
sharedtypes "knowfoolery/backend/shared/domain/types"
|
|
)
|
|
|
|
// ListFilter controls user listing behavior.
|
|
type ListFilter struct {
|
|
Email string
|
|
DisplayName string
|
|
CreatedAfter *time.Time
|
|
CreatedBefore *time.Time
|
|
IncludeDeleted bool
|
|
}
|
|
|
|
// Repository defines persistence behavior for users.
|
|
type Repository interface {
|
|
EnsureSchema(ctx context.Context) error
|
|
Create(ctx context.Context, user *User) (*User, error)
|
|
GetByID(ctx context.Context, id string) (*User, error)
|
|
GetByEmail(ctx context.Context, email string) (*User, error)
|
|
GetByZitadelUserID(ctx context.Context, zitadelUserID string) (*User, error)
|
|
UpdateProfile(ctx context.Context, id string, displayName string, consent ConsentRecord) (*User, error)
|
|
MarkEmailVerified(ctx context.Context, id string) (*User, error)
|
|
SoftDelete(ctx context.Context, id string, actorUserID string) error
|
|
List(ctx context.Context, pagination sharedtypes.Pagination, filter ListFilter) ([]*User, int64, error)
|
|
AuditLogsByUserID(ctx context.Context, id string) ([]AuditLogEntry, error)
|
|
WriteAuditLog(ctx context.Context, entry AuditLogEntry) error
|
|
}
|