Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commands ¶
type Commands struct {
UserLifecycleTransition *command.UserLifecycleTransitionCommand
BulkUserTransition *command.BulkUserTransitionCommand
BulkUserImport *command.BulkUserImportCommand
UserCreate *command.UserCreateCommand
UserUpdate *command.UserUpdateCommand
UserInvite *command.UserInviteCommand
UserRegistrationRequest *command.UserRegistrationRequestCommand
UserTokenValidate *command.UserTokenValidateCommand
UserTokenConsume *command.UserTokenConsumeCommand
UserPasswordResetRequest *command.UserPasswordResetRequestCommand
UserPasswordResetConfirm *command.UserPasswordResetConfirmCommand
UserPasswordReset *command.UserPasswordResetCommand
CreateRole *command.CreateRoleCommand
UpdateRole *command.UpdateRoleCommand
DeleteRole *command.DeleteRoleCommand
AssignRole *command.AssignRoleCommand
UnassignRole *command.UnassignRoleCommand
LogActivity *command.ActivityLogCommand
ProfileUpsert *command.ProfileUpsertCommand
PreferenceUpsert *command.PreferenceUpsertCommand
PreferenceDelete *command.PreferenceDeleteCommand
PreferenceUpsertMany *command.PreferenceUpsertManyCommand
PreferenceDeleteMany *command.PreferenceDeleteManyCommand
}
Commands exposes the service command handlers.
type Config ¶
type Config struct {
AuthRepository types.AuthRepository
InventoryRepository types.UserInventoryRepository
ActivityRepository types.ActivityRepository
RoleRegistry types.RoleRegistry
ActivitySink types.ActivitySink
ActivityEnricher activity.ActivityEnricher
ActivityEnrichmentStore activity.ActivityEnrichmentStore
ActivityEnrichmentErrorStrategy activity.EnrichmentErrorStrategy
ActivityEnrichmentErrorHandler activity.EnrichmentErrorHandler
EnrichmentScope activity.EnrichmentScope
EnrichmentWriteMode activity.EnrichmentWriteMode
EnrichmentEnabled bool
EnrichmentJobSchedule string
SessionIDKey string
Hooks types.Hooks
Clock types.Clock
IDGenerator types.IDGenerator
Logger types.Logger
TransitionPolicy types.TransitionPolicy
InviteTokenTTL time.Duration
SecureLinkManager types.SecureLinkManager
UserTokenRepository types.UserTokenRepository
PasswordResetRepository types.PasswordResetRepository
InviteLinkRoute string
RegistrationLinkRoute string
PasswordResetLinkRoute string
TokenScopeEnforcer types.ScopeEnforcer
ProfileRepository types.ProfileRepository
PreferenceRepository types.PreferenceRepository
PreferenceResolver PreferenceResolver
ScopeResolver types.ScopeResolver
AuthorizationPolicy types.AuthorizationPolicy
FeatureGate featuregate.FeatureGate
}
Config captures all required dependencies so callers can provide their own instances (bun.DB, cached repositories, hooks, etc.).
type PreferenceResolver ¶
type PreferenceResolver interface {
Resolve(ctx context.Context, input preferences.ResolveInput) (types.PreferenceSnapshot, error)
}
PreferenceResolver resolves scoped preferences for queries.
type Queries ¶
type Queries struct {
UserInventory *query.UserInventoryQuery
RoleList *query.RoleListQuery
RoleDetail *query.RoleDetailQuery
RoleAssignments *query.RoleAssignmentsQuery
ActivityFeed *query.ActivityFeedQuery
ActivityStats *query.ActivityStatsQuery
ProfileDetail *query.ProfileQuery
Preferences *query.PreferenceQuery
}
Queries exposes read-model helpers.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the entry point for go-users. It wires repositories, registries, hooks, and command/query facades supplied by the host application.
func (*Service) ActivitySink ¶
func (s *Service) ActivitySink() types.ActivitySink
ActivitySink returns the configured sink so transports can emit activity records for auxiliary workflows (e.g. CRUD controllers).
func (*Service) HealthCheck ¶
HealthCheck exercises the registered dependencies to ensure the service can be used by upstream transports (REST/gRPC/jobs). Future implementations will ping the repositories/hooks; for now we just surface missing config.
func (*Service) ScopeGuard ¶
ScopeGuard exposes the guard instance used internally so transports can reuse the same resolver/policy combination for HTTP adapters.