Documentation
¶
Overview ¶
Package users is the official user management module: admin user management (approval, suspension, soft delete, admin creation), self-service profile (email, password, name, custom fields, data export, account deletion), and profile pictures over the handler surface core mounts explicitly.
Index ¶
- Constants
- type Module
- func (m *Module) AdminManifest() kernel.AdminExtensionManifest
- func (m *Module) Init(_ kernel.Kernel) error
- func (m *Module) Name() string
- func (m *Module) Optional() []string
- func (m *Module) ProfileHandler() *api.ProfileHandler
- func (m *Module) ProfilePictureHandler() *api.ProfilePictureHandler
- func (m *Module) Requires() []string
- func (m *Module) Shutdown() error
- func (m *Module) UserManagementHandler() *api.UserManagementHandler
- func (m *Module) Version() string
- type Option
- func WithAccountDeletionService(service *userdomain.AccountDeletionService) Option
- func WithAdminCreateUserService(service *userdomain.AdminCreateUserService) Option
- func WithLogger(logger kernel.Logger) Option
- func WithMailer(mailer api.Mailer) Option
- func WithProfilePictureService(service *profilepicture.Service) Option
- func WithProfilePictureURLBuilder(builder func(string) string) Option
- func WithProfileService(service *userdomain.ProfileService) Option
- func WithSoftDeleteStore(store api.SoftDeleteStore) Option
- func WithUserFieldsProvider(provider UserFieldsProvider) Option
- func WithUserManagementService(service *userdomain.UserManagementService) Option
- func WithUserStore(store api.UserStore) Option
- type UserFieldsProvider
Constants ¶
const Name = "users"
Name is the registry key for this module.
const Version = "0.1.0"
Version is the module version reported via Module.Version.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module is the users kernel module.
func New ¶
New builds the module, adopting the composition root's wiring. The handlers are built once here so every realm serves the same instances.
func (*Module) AdminManifest ¶
func (m *Module) AdminManifest() kernel.AdminExtensionManifest
AdminManifest declares this module's admin-shell extensions. The Users navigation surface is static SPA chrome today, so the module declares no menu entries, settings sections, or editor extensions.
func (*Module) Init ¶
Init wires the module. The handlers are already built by New; Init only validates presence.
func (*Module) Optional ¶
Optional lists soft dependencies. There are none: every collaborator is either adopted or required.
func (*Module) ProfileHandler ¶
func (m *Module) ProfileHandler() *api.ProfileHandler
ProfileHandler exposes the self-service profile handler for core mounting. Same explicit-mount deviation as the management surface.
func (*Module) ProfilePictureHandler ¶
func (m *Module) ProfilePictureHandler() *api.ProfilePictureHandler
ProfilePictureHandler exposes the profile picture handler for core mounting. Same explicit-mount deviation as the management surface.
func (*Module) Requires ¶
Requires lists hard dependencies. Users is a leaf: every collaborator is adopted, matching the retired wrapper edge.
func (*Module) UserManagementHandler ¶
func (m *Module) UserManagementHandler() *api.UserManagementHandler
UserManagementHandler exposes the user management handler for core mounting. Core mounts it explicitly (rather than via RouteProvider) because the surface spans the admin group, which a single RegisterRoutes call cannot express.
type Option ¶
type Option func(*Module)
Option configures a Module. The composition root supplies every option; direct construction without options yields a standalone module whose handlers serve nil services (they must not be invoked unconfigured).
func WithAccountDeletionService ¶
func WithAccountDeletionService(service *userdomain.AccountDeletionService) Option
WithAccountDeletionService adopts the account deletion service.
func WithAdminCreateUserService ¶
func WithAdminCreateUserService(service *userdomain.AdminCreateUserService) Option
WithAdminCreateUserService adopts the admin user creation service.
func WithLogger ¶
WithLogger attaches the module logger. Without one handler failures are dropped (discard sink).
func WithMailer ¶
WithMailer adopts the account-email mailer.
func WithProfilePictureService ¶
func WithProfilePictureService(service *profilepicture.Service) Option
WithProfilePictureService adopts the profile picture service.
func WithProfilePictureURLBuilder ¶
WithProfilePictureURLBuilder adopts the filename-to-URL builder.
func WithProfileService ¶
func WithProfileService(service *userdomain.ProfileService) Option
WithProfileService adopts the self-service profile service.
func WithSoftDeleteStore ¶
func WithSoftDeleteStore(store api.SoftDeleteStore) Option
WithSoftDeleteStore adopts the soft-delete store.
func WithUserFieldsProvider ¶
func WithUserFieldsProvider(provider UserFieldsProvider) Option
WithUserFieldsProvider adopts the user field schema provider for self-service profile editing.
func WithUserManagementService ¶
func WithUserManagementService(service *userdomain.UserManagementService) Option
WithUserManagementService adopts the admin user management service.
func WithUserStore ¶
WithUserStore adopts the user store for handler-level lookups.
type UserFieldsProvider ¶
type UserFieldsProvider interface {
GetUserFields() []customfield.FieldSchema
GetUserSystemFields() []customfield.FieldSchema
}
UserFieldsProvider provides user field schema access for self-service profile editing. The core post-type service satisfies it structurally.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package admin owns this module's admin-shell manifest: the declarative UI the single admin SPA renders for user management.
|
Package admin owns this module's admin-shell manifest: the declarative UI the single admin SPA renders for user management. |
|
Package testutil provides the kernel fixture module tests run against.
|
Package testutil provides the kernel fixture module tests run against. |